<div dir="ltr">A single profile can send to any number of gateways.<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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</div><div><action application="bridge" data="sofia/gateway/<span style="font-size:13px;font-family:arial,sans-serif">Sip_Provider_A/12345"/></span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px"><action application="bridge" data="sofia/gateway/Sip_Provider_B/12345"/></span></div><div><br></div><div>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.</div>
<div><br></div><div>Steve</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 July 2014 14:48, Louie Liu <span dir="ltr"><<a href="mailto:lliu@multinet.net.au" target="_blank">lliu@multinet.net.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p style="margin-left:38.25pt"><u></u><span>1.<span style="font:7.0pt "Times New Roman""> </span></span><u></u>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? <u></u><u></u></p>
<p style="margin-left:38.25pt"><u></u><span>2.<span style="font:7.0pt "Times New Roman""> </span></span><u></u>What is the rtp-ip and sip-ip in the external.xml file? Should that be the local IP of my sip server? <u></u><u></u></p>
<p style="margin-left:38.25pt"><u></u><span>3.<span style="font:7.0pt "Times New Roman""> </span></span><u></u>What do I need to change in my dialplan so that I can reference the Sip_Provider_B? an example would be good.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">External.xml<u></u><u></u></p><div style="border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt"><p class="MsoNormal" style="border:none;padding:0cm"> <param name="sip-port" value="$${external_sip_port}"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="dialplan" value="XML"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="context" value="public"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="rtp-ip" value="$${local_ip_v4}"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="sip-ip" value="$${local_ip_v4}"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="ext-rtp-ip" value="1.2.3.4"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="ext-sip-ip" value="1.2.3.4"/><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">External/sip_provider_A.xml<u></u><u></u></p>
<div style="border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt"><p class="MsoNormal" style="border:none;padding:0cm"> <gateway name="Sip_Provider_A"><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm">
<param name="username" value="xxx"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="password" value="xxx"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="from-user" value="03xxxxxxx"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="from-domain" value="x.y.z"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="auth-username" value="yyyyy"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="realm" value="<a href="http://bwas02.voip.izzz.zz.au" target="_blank">bwas02.voip.izzz.zz.au</a>"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="proxy" value="<a href="http://sipconnect.voip.zzzz.zz.au" target="_blank">sipconnect.voip.zzzz.zz.au</a>"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="register" value="true"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="register-transport" value="udp"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="context" value="public"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> </gateway> <u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">External/sip_provider_B.xml<u></u><u></u></p><div style="border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt"><p class="MsoNormal" style="border:none;padding:0cm">
<gateway name="Sip_Provider_B"><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="username" value="aaa"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm">
<param name="password" value="bbb"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="from-user" value="03xxxxxxx"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="from-domain" value="x.y.z"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="auth-username" value="yyyyy"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="realm" value="<a href="http://bwas02.voip.izzz.zz.au" target="_blank">bwas02.voip.izzz.zz.au</a>"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm">
<param name="proxy" value="<a href="http://sipconnect.voip.zzzz.zz.au" target="_blank">sipconnect.voip.zzzz.zz.au</a>"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm">
<param name="register" value="true"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> <param name="register-transport" value="udp"/><u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0cm"> <param name="context" value="public"/><u></u><u></u></p><p class="MsoNormal" style="border:none;padding:0cm"> </gateway> <u></u><u></u></p>
</div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Cheers,<u></u><u></u></p><p class="MsoNormal">Louie<u></u><u></u></p></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>