If you have a SIP account from a carrier, you can configure the SIP to dial an external phone. The SIP account (or the device providing the account) is referred to as the SIP gateway in FreeSWITCH. Adding a gateway only needs to create an XML file in conf/sip_profiles/external/, with a name that can be randomly used, such as Gw1.xml, and then enter the following code in the file:
<gateway name= "GW1" >
<param name= "Realm" value= "SIP server address, either IP or IP: port number"/>
<param name= "username" value= "SIP user name"/>
<param name= "password" value= "password"/>
</gateway>
If you need additional parameters for your SIP gateway, you can refer to Example.xml in the same directory, but generally the above parameters are sufficient. You can restart FreeSWITCH, or execute the following command to use it:
freeswitch> Sofia Profile External rescan
Show the registration status of the gateway:
freeswitch> Sofia Status
If the state of the gateway GW1 is displayed as reged, it indicates that it is properly registered to the gateway. You can use the command first to try to see if the gateway is working properly:
Freeswitch> originate Sofia/gateway/gw1/xxxxxx &echo
The above command through the gateway GW1 call number xxxxxx (may be your mobile phone number), the call number to answer the call, FreeSWITCH will execute the ECHO program, you should be able to hear their own echo.
Configure a SIP gateway to dial an external phone