This page holds information about the external profile, which is supplied by Freeswitch default environment.
By default FreeSWITCH supplies an external profile that runs on port 5080. The external profile handles external or outbound registrations to a SIP provider.
The SIP provider sends calls to you, and you send calls to your provider, through the external profile. The external profile allows anonymous calling, which is required as your provider will never authenticate with you to send you a call.
The external profile (conf/sip_profiles/external.xml) supplied with FreeSWITCH is a great starting place for learning about two very important variables that aid in NAT traversal. These are:
The external_ variables are configured in conf/vars.xml. The external profile is important because if port forwarding were to be setup, you would be able to cleanly send and receive information from the port in a fashion that would allow you to have other devices registering with this instance of FreeSWITCH. This allows you to cleanly break through NAT.
If you would like to have communication of this nature then you should consider copying the external profile and creating a dedicated profile specific to your purpose and setup port forwarding such that that profile can send and receive with external entities. The copied version of the external profile will require very little modification other than changing the port that is used. See General NAT example scenarios. Remember, when you change this reference all devices wishing to use this context must reference it accordingly. So if you create a profile called external5090 and want to make a call from it then you should reference it as:
Please note: in some instances you may want to just copy the external profile and create a new profile that will be used exclusively for the associated gateways. Don't forget that doing this will require you to change the port from say 5080 to 5090, or whatever is available on your systems. Also, you will have to setup port-forwarding rules. You can create as many dedicated profiles as you have resources for.
Switch to Switch Communication
Attempting to get two switching systems communicating over the internet is really easy, but for many newer users a daunting task. Here is a general layout of what we are talking about.
- Setup port forwarding on port 5080 (or whichever port your are using this dedicated profile on) allowing both TCP and UDP traffic through.
- Do this to both FreeSWITCH instances.
- Within the conf/sip_profiles/outbound.xml modify the ext-sip-ip and ext-rtp-ip variables to reflect your public IP address.
- Restart FreeSWITCH.
- Test communication by originating a call from 192.168.0.4 above:
Switch with External SoftPhone
- Copy the external.xmlprofile and create a new profile named external5090.xml. This will be a dedicated profile, for exclusive use to these softphones that are registering to FreeSWITCH.
- Change the profile name to something unique, like
- Change the SIP port the profile is listening on to
<param name="sip-port" value="5090"/>
- Make sure to setup port forwarding on your Firewall/NAT device for TCP/UDP on 5090.
- Within the conf/sip_profiles/external5090.xml modify the ext-sip-ip and ext-rtp-ip variables to reflect your public IP address.
- Restart FreeSWITCH.
- Reference the caller from your FreeSWITCH system as:
sofia/external5090/<caller extension>@x.x.x.x:5090<-- What goes in x.x.x.x? externalUA IP? Domain?
Switch with Internal Phone
- Register your phone on the default port 5060 profile. As you may have noted, this profile does not use ext-sip-ip and ext-rtp-ip.
- Make sure that your outbound calls reference the external profile which will allow you to break through the NAT/Firewall and communicate accordingly.