Multi gateways in profile
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
You'll have to look closer, unless the remote calls you back at the registered contact, or includes the params that it registered with there is no way to match it. /b On Fri, Oct 12, 2018 at 5:38 PM Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
https://freeswitch.org/confluence/display/FREESWITCH/Gateways+Configuration [image: image.png] Hope this helps. сб, 13 окт. 2018 г. в 1:43, Mickael Hubert <mickael@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
it works only if the gateway does outbound registration (for GW1 in your case). If you want track inbound calls for non registering gateways, then you need to match them by remote IP. On Sat, 13 Oct 2018 at 01:17, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi Mickael, <gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway> Did you try to set variables on your gateway and use it in your dialplan? Srigo Kana On 13 Oct 2018, 00:31, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi Thanks a lot ! I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate. But how Can I do math with IP please ? ++ Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi, For ip addr matching: <condition field="network_addr" expression="^192\.168\.1\.1$"/> Alternatively, If you want some variables populated on incoming call from a given IP the same way as with registered gateways, you can define a directory user entry (with "cidr" param to allow ip-auth) and define the your variables there. For example: <user id="GW2" cidr="2.2.2.2/32"> <variables> <variable name="accountcode" value="GW2"/> <variable name="call_limit" value="10"/> <variable name="max_ringtime" value="45"/> </variables> </user> Hope this helps! Best Regards, -- Vallimamod Abdullah SIP Solutions vma@sip.solutions linkedin.com/in/vallimamod .
On 13 Oct 2018, at 22:11, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit : Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote: 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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Thanks Valli ;) and thanks all too ! it works like a charm ! I can easily mix filter by gateway and by IP ;) ++ Le dim. 14 oct. 2018 à 23:34, Vallimamod Abdullah <vma@vallimamod.org> a écrit :
Hi,
For ip addr matching: <condition field="network_addr" expression="^192\.168\.1\.1$"/>
Alternatively, If you want some variables populated on incoming call from a given IP the same way as with registered gateways, you can define a directory user entry (with "cidr" param to allow ip-auth) and define the your variables there. For example:
<user id="GW2" cidr="2.2.2.2/32"> <variables> <variable name="accountcode" value="GW2"/> <variable name="call_limit" value="10"/> <variable name="max_ringtime" value="45"/> </variables> </user>
Hope this helps!
Best Regards, -- Vallimamod Abdullah SIP Solutions vma@sip.solutions linkedin.com/in/vallimamod .
On 13 Oct 2018, at 22:11, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit : Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote: 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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Why you can't set the same variable in both gateways profile: In gw1: <variable name="incoming_gw" value="gw1"/> In gw2: <variable name="incoming_gw" value="gw2"/> And check in your dialplan if incoming_gw is set to gw1 OR gw2? Srigo Kana On 14 Oct 2018, 18:33, at 18:33, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
------------------------------------------------------------------------
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi Srigo, for my case, I have gateway without REGISTER (it's IP peering) In this case, when a incoming call arrives into FS, it does not find the good gateway and all variables into gateway conf are not populate ++ Le lun. 15 oct. 2018 à 18:55, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Why you can't set the same variable in both gateways profile:
In gw1:
<variable name="incoming_gw" value="gw1"/>
In gw2:
<variable name="incoming_gw" value="gw2"/>
And check in your dialplan if incoming_gw is set to gw1 OR gw2?
Srigo Kana On 14 Oct 2018, at 18:33, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
------------------------------
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
What if you create gateway with ip and without registration? Maybe FS will pair it and you can put variable. Just a thought. On Tue, 16 Oct 2018, 16:29 Mickael Hubert, <mickael@winlux.fr> wrote:
Hi Srigo, for my case, I have gateway without REGISTER (it's IP peering)
In this case, when a incoming call arrives into FS, it does not find the good gateway and all variables into gateway conf are not populate
++
Le lun. 15 oct. 2018 à 18:55, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Why you can't set the same variable in both gateways profile:
In gw1:
<variable name="incoming_gw" value="gw1"/>
In gw2:
<variable name="incoming_gw" value="gw2"/>
And check in your dialplan if incoming_gw is set to gw1 OR gw2?
Srigo Kana On 14 Oct 2018, at 18:33, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
------------------------------
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
It won’t ;) On Tue, Oct 16, 2018 at 2:03 PM Gregor Nanger <gregor@infomedia.si> wrote:
What if you create gateway with ip and without registration? Maybe FS will pair it and you can put variable. Just a thought.
On Tue, 16 Oct 2018, 16:29 Mickael Hubert, <mickael@winlux.fr> wrote:
Hi Srigo, for my case, I have gateway without REGISTER (it's IP peering)
In this case, when a incoming call arrives into FS, it does not find the good gateway and all variables into gateway conf are not populate
++
Le lun. 15 oct. 2018 à 18:55, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Why you can't set the same variable in both gateways profile:
In gw1:
<variable name="incoming_gw" value="gw1"/>
In gw2:
<variable name="incoming_gw" value="gw2"/>
And check in your dialplan if incoming_gw is set to gw1 OR gw2?
Srigo Kana On 14 Oct 2018, at 18:33, Mickael Hubert <mickael@winlux.fr> wrote:
Hi Thanks a lot !
I think the best way (maybe only way) it's to match with from IP. It's sure when inbound call arrives from GW2, any variables in gateway configuration aren't populate.
But how Can I do math with IP please ?
++
Le sam. 13 oct. 2018 18:26, Srigo Kanapathipillai <ksrigo@gmail.com> a écrit :
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
------------------------------
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
Will NOT work unless the remote calls back the exact registered contact or pass back the params on the contact. On Sat, Oct 13, 2018 at 11:26 AM Srigo Kanapathipillai <ksrigo@gmail.com> wrote:
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
Hi even if i check by source IP ? Ex: <condition field="network_addr" expression="^192\.168\.1\.1$"/> Le dim. 14 oct. 2018 18:34, Brian West <brian@freeswitch.com> a écrit :
Will NOT work unless the remote calls back the exact registered contact or pass back the params on the contact.
On Sat, Oct 13, 2018 at 11:26 AM Srigo Kanapathipillai <ksrigo@gmail.com> wrote:
Hi Mickael,
<gateway> ..params... <variables> <variable name="inbound_var_name" value="this is inbound" direction="inbound"/> <variable name="outbound_var_name" value="this is outbound" direction="outbound"/> <variable name="both_var_name" value="this on any direction"/> </variables> </gateway>
Did you try to set variables on your gateway and use it in your dialplan?
Srigo Kana On 13 Oct 2018, at 00:31, Mickael Hubert <mickael@winlux.fr> wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
--
Brian West | Co-founder and Developer
Need Commercial support? email sales@freeswitch.com
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g>
Email: brian@freeswitch.com
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/>
[image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch> _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
participants (7)
-
Brian West
-
Gregor Nanger
-
Marc Quore
-
Mickael Hubert
-
Srigo Kanapathipillai
-
Tihomir Culjaga
-
Vallimamod Abdullah