Archive for January 16th, 2014

FreeSWITCH: dial through VoIP provider

Thursday, January 16th, 2014

Register against megavoip.com sbc:
Add a file sip.megavoip.com.xml to /usr/local/freeswitch/conf/sip_profiles/external/ to dial through Megavoip.com:

fs-megavoip

Register against multifon.ru sbc:
Add a file multifon.xml to /usr/local/freeswitch/conf/sip_profiles/external/ to dial through multifon.ru:

fs-multifon

Now it’s time to check if the REGISTER is OK.
Execute in the FS CLI:

freeswitch@internal> sofia status
Name Type Data State
=================================================================================================
external profile sip:mod_sofia@10.145.13.21:5080 RUNNING (0)
external::example.com gateway sip:joeuser@example.com NOREG
external::sip.megavoip.com gateway sip:megavoip_username@sip.megavoip.com REGED
external::multifon gateway sip:79221234567@sbc.multifon.ru REGED
10.145.13.21 alias internal ALIASED
internal profile sip:mod_sofia@10.145.13.21:5060 RUNNING (0)
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)
=================================================================================================
3 profiles 1 alias

or:
freeswitch@internal> sofia status gateway
Profile::Gateway-Name Data State IB Calls(F/T) OB Calls(F/T)
=================================================================================================
external::example.com sip:joeuser@example.com NOREG 0/0 0/0
external::sip.megavoip.com sip:megavoip_username@sip.megavoip.com REGED 0/0 0/0
external::multifon sip:79221234567@sbc.multifon.ru REGED 0/1 0/0
=================================================================================================
3 gateways: Inbound(Failed/Total): 0/1,Outbound(Failed/Total):0/0

or with more info:
freeswitch@internal> sofia status gateway sip.megavoip.com
...

Dial through (let’s dial via megavoip.com):

Add to /usr/local/freeswitch/conf/dialplan/default.xml to the beginning of ‘default’ context:

fs-dial-through

FreeSWITCH and Asterisk: equivalent commands

Thursday, January 16th, 2014

fs_cli -l 5 = console loglevel 5

sofia global siptrace on|off = calls debug

console loglevel help
console loglevel [0-7] = core set verbose X

sofia profile default start

sofia status profile internal
sofia status profile internal reg = sip show peers. Show devices, registered against your FreeSWITCH
list_users = sip show peers. Show devices, registered against your FreeSWITCH

sofia profile internal rescan = sip reload (not sure! Command below is BETTER!)
sofia profile external restart reloadxml = equivalent of ‘sip reload’. Execute after editing /usr/local/freeswitch/conf/sip_profiles/external (or internal)

F6 = dialplan reload
reloadxml

xml_locate dialplan = dialplan show

reload mod_sofia

http://wiki.freeswitch.org/wiki/Rosetta_stone