Configure Call-labs with FreeSWITCH
In order to configure Call-Labs with FreeSWITCH, please follow the following guide:
1. Create a new Gateway
First create a file your /etc/freeswitch/sip_profiles/external/call_labs.conf
You can simply edit this file using a command like “sudo vi /etc/freeswitch/sip_profiles/external/call_labs.conf”
Copy the following:
<include>
<gateway name="voip.call-labs.com">
<!--/// account username *required* ///-->
<param name="username" value="YOUR_ACCOUNT_NUMBER"/>
<!--/// auth realm: *optional* same as gateway name, if blank ///-->
<!--<param name="realm" value="asterlink.com"/>-->
<!--/// username to use in from: *optional* same as username, if blank ///-->
<param name="from-user" value="YOUR_ACCOUNT_NUMBER"/>
<!--/// domain to use in from: *optional* same as realm, if blank ///-->
<param name="from-domain" value="voip.call-labs.com"/>
<!--/// account password *required* ///-->
<param name="password" value="YOUR_SIP_PASSWORD"/>
<!--/// extension for inbound calls: *optional* same as username, if blank ///-->
<!--<param name="extension" value="cluecon"/>-->
<!--/// proxy host: *optional* same as realm, if blank ///-->
<!--<param name="proxy" value="asterlink.com"/>-->
<!--/// send register to this proxy: *optional* same as proxy, if blank ///-->
<!--<param name="register-proxy" value="mysbc.com"/>-->
<!--/// expire in seconds: *optional* 3600, if blank ///-->
<!--<param name="expire-seconds" value="60"/>-->
<!--/// do not register ///-->
<param name="register" value="true"/>
<!-- which transport to use for register -->
<!--<param name="register-transport" value="udp"/>-->
<!--How many seconds before a retry when a failure or timeout occurs -->
<!--<param name="retry-seconds" value="30"/>-->
<!--Use the callerid of an inbound call in the from field on outbound calls via this gateway -->
<!--<param name="caller-id-in-from" value="false"/>-->
<!--extra sip params to send in the contact-->
<!--<param name="contact-params" value="tport=tcp"/>-->
<!--send an options ping every x seconds, failure will unregister and/or mark it down-->
<!--<param name="ping" value="25"/>-->
</gateway>
</include>
Replace YOUR_ACCOUNT_NUMBER and YOUR_SIP_PASSWORD, by the SIP account provided to you from Call-Labs.
The lines in bold are almost certainly required by your carrier and FreeSWITCH, the remaining parameters can be uncommented and used, if required by your carrier. The XML syntax for comments are denoted by lines that begin ““.
2. LOAD THE NEW CONFIGURATION
Finally we need to load the new configuration, and check the trunk is registered.
The FreeSWITCH console is accessed by typing “fs_cli” at the command prompt.
You should now see the FreeSWITCH CLI, so now reload the FreeSWITCH configuration with the following command:
sofia profile external restart reloadxml
When complete, check the trunk has registered with the following command.
3. Check the Status FreeSWITCH
sofia status
Against the name of the trunk you configured in the XML file, you should see REGED (registered) at the end of the line.
To exit the Freeswitch CLI, do CTRL D, or /exit