A single profile can send to any number of gateways. You only need multiple profiles if you need to listen in multiple places, usually to handle either multiple IP addresses or different configurations on different ports. sip-ip and rtp-ip are the local IP of the server where you're receiving packets. It must be a real address, 0.0.0.0 (ie any address) isn't valid. If you're behind NAT they should be the internal IP, there are settings such as ext-sip-ip and ext-rtp-ip for handling NAT traversal. How to select the gateway to use will be very dependant on your use-case. However in general, you pick the destination gateway in the dialstring you bridge with, eg <action application="bridge" data="sofia/gateway/Sip_Provider_A/12345"/> <action application="bridge" data="sofia/gateway/Sip_Provider_B/12345"/> How you pick it is up to you, but as some examples you could set it as a variable in the user directory or based on conditions in the dialstring, you could use mod_distributor, mod_lcr etc, or try each in sequence as above. Steve On 23 July 2014 14:48, Louie Liu <lliu@multinet.net.au> wrote:
Hi,
There is requirement for me to add multiple sip gateways to Freeswitch, the first sip gateway uses the external.xml in sip profile to route traffic to Sip provider A. The second sip gateway will use a different UA to route traffic to Sip provider B. Here are my questions:
1. Do I need to create another external.xml with its own ip and port which point to the Sip Provider B? if that’s case, what do I need to change in the sip profile external.xml file?
2. What is the rtp-ip and sip-ip in the external.xml file? Should that be the local IP of my sip server?
3. What do I need to change in my dialplan so that I can reference the Sip_Provider_B? an example would be good.
External.xml
<param name="sip-port" value="$${external_sip_port}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="1.2.3.4"/>
<param name="ext-sip-ip" value="1.2.3.4"/>
External/sip_provider_A.xml
<gateway name="Sip_Provider_A">
<param name="username" value="xxx"/>
<param name="password" value="xxx"/>
<param name="from-user" value="03xxxxxxx"/>
<param name="from-domain" value="x.y.z"/>
<param name="auth-username" value="yyyyy"/>
<param name="realm" value="bwas02.voip.izzz.zz.au"/>
<param name="proxy" value="sipconnect.voip.zzzz.zz.au"/>
<param name="register" value="true"/>
<param name="register-transport" value="udp"/>
<param name="context" value="public"/>
</gateway>
External/sip_provider_B.xml
<gateway name="Sip_Provider_B">
<param name="username" value="aaa"/>
<param name="password" value="bbb"/>
<param name="from-user" value="03xxxxxxx"/>
<param name="from-domain" value="x.y.z"/>
<param name="auth-username" value="yyyyy"/>
<param name="realm" value="bwas02.voip.izzz.zz.au"/>
<param name="proxy" value="sipconnect.voip.zzzz.zz.au"/>
<param name="register" value="true"/>
<param name="register-transport" value="udp"/>
<param name="context" value="public"/>
</gateway>
Cheers,
Louie
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org