<div dir="ltr"><div>
<a href="https://freeswitch.org/confluence/display/FREESWITCH/Gateways+Configuration">https://freeswitch.org/confluence/display/FREESWITCH/Gateways+Configuration</a> <br></div><div><br></div><div><div><img src="cid:ii_jn6nnoq10" alt="image.png" width="559" height="196"><br></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div>Hope this helps.<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">сб, 13 окт. 2018 г. в 1:43, Mickael Hubert <<a href="mailto:mickael@winlux.fr">mickael@winlux.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi guys,</div><div>I want to identify source of inbounds calls. <br></div><div>In my external profile I have two gateways:</div><div><br></div><div>- One with REGISTER method</div><div>- One without REGISTER method (IP to IP), only iptables filtering<br></div><div><br></div><div><span style="font-family:monospace,monospace"><gateways><br>      <gateway name="GW1"><br>        <param name="from-domain" value="**********"/><br>        <param name="caller-id-in-from" value="true"/><br>        <param name="proxy" value="1.1.1.1"/><br>        <param name="register" value="true"/><br>        <param name="username" value="**************"/><br>        <param name="password" value="****************"/><br>        <param name="expire-seconds" value="3600"/><br>        <param name="retry-seconds" value="30"/><br>        <param name="ping" value="25"/><br>      </gateway><br>      <gateway name="GW2"><br>        <param name="from-domain" value="*********"/><br>        <param name="caller-id-in-from" value="true"/><br>        <param name="proxy" value="2.2.2.2"/><br>        <param name="register" value="false"/><br>        <param name="retry-seconds" value="30"/><br>        <param name="ping" value="25"/><br>      </gateway><br>    </gateways></span></div><div><br><span style="font-family:monospace,monospace"></span></div><div>In my dialplan I have this conf:</div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><condition field="${sip_gateway}"  expression="GW1" break="never"><br>   <action application="set" data="number_dest=${destination_number}" /><br>   <action application="execute_extension" data="to-private XML from-gw1"/><br></condition><br><condition field="${sip_gateway}"  expression="GW2" break="never"><br>   <action application="set" data="number_dest=${destination_number}" /><br>   <action application="execute_extension" data="to-<span style="font-family:monospace,monospace">private</span> XML from-gw2"/><br></condition><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div>When a call arrives throught GW1 (REGISTERED), ${sip_gateway} is populate with "GW1" perfect !. But when another call arrives throught GW2 (not REGISTERED), ${sip_gateway} is empty.</div><div><br></div><div>Please, how can I identify the source gateway where calls arrive ? maybe it's not a good way to do that ?<br></div><div><br></div><div>thanks in advance<span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><br></span></span></span></span></div></div></div></div>
_________________________________________________________________________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>