...
Outgoing call: from FreeSwitch SIP extension 3002 1000 to the gateway through relay 10001008;
Incoming call: call from an outside line to the gateway, through SIP trunk 1000 1020 to FreeSwitch, and then send the call to the 3002 1000 SIP extension through FreeSwitch;
...
Enter the directory of FreeSWITCH’s default configuration directory, add the gateway’s configuration in /etc/freeswitch/directory/default/10001008.xml
vi /etc/freeswitch/directory/default/10001008.xml
<include>
<user id="10001008">
<params>
<param name="password" value="10001008"/>
<param name="vm-password" value="10001008"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="10001008"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="10001008"/>
<variable name="effective_caller_id_number" value="10001008"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
parameter name | value |
---|---|
user id | 10001008 |
password | 10001008 |
effective_caller_id_name | 10001008 |
effective_caller_id_number | 10001008 |
Step 2.Creat extension 3002 1000 in Freeswtich
Copy 10001008.xml file to 30021000.xml in /etc/freeswitch/directory/default/ . Replace all 1000 to 3002
<include>
<user id="30021000">
<params>
<param name="password" value="30021000"/>
<param name="vm-password" value="30021000"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="30021000"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 30021000"/>
<variable name="effective_caller_id_number" value="30021000"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
parameter name | value |
---|---|
user id | 30021000 |
password | 30021000 |
Step 3.Dialing Rules in FreeSWITCH
Outbound rules realize dialing “9+destination number ” to the remote partypart, and 9 can be replaced by any other digital.
...
Inbound rules realize all incoming calls transfer to SIP extension 10171000.
Edit the outband dialplan in /etc/freeswitch/dialplan/public/00_inbound_did.xml.
<include>
<extension name="public_did">
<condition field="destination_number" expression="^(.+)$1020">
<action application="set" data="domain_name=$${domain}"/>
<action application="transfer" data="3002 1000 XML default"/>
</condition>
</extension>
</include>
parameter name | value |
---|---|
expression | ^(.+)$1020 |
data | 3002 1000 XML default |
Step 4. Set Network Parameters in Web
...
Please select “SIP—>SIP Endpoints—>Add New SIP Endpoint” to set SIP trunk 1008 and endpoint 1020. The following figure shows detail information about how to set it.
...
parameter name | value |
---|---|
name | 10001008 |
user name | 10001008 |
password | 10001008 |
hostname or IP Address | 172.16.8.184, your PBX IP |
...
Taking advantage of SIP software such as Xlite, eyeBeam to register a SIP extension(10171000). After all above steps, you can try to make calls and send SMS.
...
Test call:
Incoming call test: Dial the number of port 1 2.5 on the gateway via your mobile to see if 3002 1000 will ring. If 3002 1000 rings, it means your configuration is successful; unless, it means there is something wrong with your configuration, please check it.
Outgoing call test: Dial your mobile number on 3002 1000 extension registered in a software phone. If your mobile rings, it means your configuration is ok; unless, please check your configuration.