[Freeswitch-users] How to set a variable for a call going from gateway?

Peter Olsson peter.olsson at visionutveckling.se
Fri Mar 23 17:12:49 MSK 2012


I don't think this works, at least not for unregistered gateways.

You will probably need to do it like this (replace the example IP with the remote IP of the gateway);


<condition field="network_addr" expression="^192\.168\.1\.1$"/>
 ....
</condition>

________________________________
Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] för "Гришин В.С." [Vladislav.Grishin at vts24.ru]
Skickat: den 23 mars 2012 15:02
Cc: FreeSWITCH-users at lists.freeswitch.org
Ämne: [Freeswitch-users] How to set a variable for a call going from gateway?

After I read a http://wiki.freeswitch.com/wiki/Sofia.conf.xml#Variables

I configured FS

[root at freeswitch1 external]# more /usr/local/freeswitch/conf/sip_profiles/external/SMG-1016M.xml
</include>
  <gateway name="SMG-1016M">
    <param name="realm" value="10.10.10.1"/>
    <param name="register" value="false"/>
    <param name="caller-id-in-from" value="true"/>
    <param name="ping" value="25"/>
    <variables>
        <variable name="SMG-1016M_inbound_var_name"  data="this_is_inbound_call"  direction="inbound"/>
        <variable name="SMG-1016M_outbound_var_name" data="this_is_outbound_call" direction="outbound"/>
        <variable name="SMG-1016M_both_var_name"     data="this_on_any_direction_call"/>
     </variables>
  </gateway>
</include>
[root at freeswitch1 external]#

I insert the info application into public context of dialplan before a transfer application? make call but don't see variables (SMG-1016M_inbound_var_name,SMG-1016M_outbound_var_name,SMG-1016M_both_var_name)
in fs_cli.

I want to see variable = <gateway name="SMG-1016M"> into dialplan for each gateway in (single) external sip profile. How it to make?

Vladislav Grishin


!DSPAM:4f6c816232767275610573!


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list