[Freeswitch-users] Multi gateways in profile

Marc Quore marquore at gmail.com
Fri Oct 12 23:41:09 UTC 2018


 https://freeswitch.org/confluence/display/FREESWITCH/Gateways+Configuration

[image: image.png]
Hope this helps.


сб, 13 окт. 2018 г. в 1:43, Mickael Hubert <mickael at winlux.fr>:

> Hi guys,
> I want to identify source of inbounds calls.
> In my external profile I have two gateways:
>
> - One with REGISTER method
> - One without REGISTER method (IP to IP), only iptables filtering
>
> <gateways>
>       <gateway name="GW1">
>         <param name="from-domain" value="**********"/>
>         <param name="caller-id-in-from" value="true"/>
>         <param name="proxy" value="1.1.1.1"/>
>         <param name="register" value="true"/>
>         <param name="username" value="**************"/>
>         <param name="password" value="****************"/>
>         <param name="expire-seconds" value="3600"/>
>         <param name="retry-seconds" value="30"/>
>         <param name="ping" value="25"/>
>       </gateway>
>       <gateway name="GW2">
>         <param name="from-domain" value="*********"/>
>         <param name="caller-id-in-from" value="true"/>
>         <param name="proxy" value="2.2.2.2"/>
>         <param name="register" value="false"/>
>         <param name="retry-seconds" value="30"/>
>         <param name="ping" value="25"/>
>       </gateway>
>     </gateways>
>
> In my dialplan I have this conf:
>
> <condition field="${sip_gateway}"  expression="GW1" break="never">
>    <action application="set" data="number_dest=${destination_number}" />
>    <action application="execute_extension" data="to-private XML from-gw1"/>
> </condition>
> <condition field="${sip_gateway}"  expression="GW2" break="never">
>    <action application="set" data="number_dest=${destination_number}" />
>    <action application="execute_extension" data="to-private XML
> from-gw2"/>
> </condition>
>
> 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.
>
> Please, how can I identify the source gateway where calls arrive ? maybe
> it's not a good way to do that ?
>
> thanks in advance
> _________________________________________________________________________
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20181013/0a74cab8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 10996 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20181013/0a74cab8/attachment-0001.png>


More information about the FreeSWITCH-users mailing list