You can configure sip gateway.
Configuring a sip gateway allows you to connect with outside carriers or other SIP machines.
Gateways are associated with SIP profiles because FreeSWITCH needs to know which IP and port to send traffic to and from in relation to the carrier.
First, you'll need to add a gateway to your SIP profile. Let's assume you're using the default FreeSWITCH configuration. In this case, we'll create a gateway that is attached to the default external profile.
- Create a file in the conf/sip_profiles/external/ directory named after your gateway
Add the following content (note that even if you are not registering, a username and password is required) but replace the highlighted items with your own provider:
<gateway name="providerA">
<param name="realm" value="sip.domain.com"/>
<param name="username" value="testuser"/>
<param name="password" value="test"/>
<param name="register" value="true"/>
</gateway>
You will access the gateway by using the bridge application with sofia/gateway/
providerA/number , such as sofia/gateway/providerA/4158867999 . You
can do this in any dialplan you are using. In this example, edit your dialplan (typically
the default dialplan in conf/dialplan/default.xml ) and add code to utilize
the gateway:
action application="bridge" data="sofia/gateway/providerA/$1"
Issue a reloadxml command in your FreeSWITCH CLI after making the
mentioned changes.