[Freeswitch-users] Unable to access variables set in directory from the dialplan

Iskren Hadzhinedev iskren.hadzhinedev at ikiji.com
Mon Mar 17 18:02:16 MSK 2014


Greetings!
I'm unable to access user variables that are set in the directory from 
the dialplan.
The setup is quite simple, the user is:
--
                     <user id="611">
                         <params>
                             <param name="a1-hash" 
value="693c2978ddbe62f7129b7e551bcf7d49"/>
                             <param name="vm-enabled" value="true"/>
                             <param name="vm-a1-hash" 
value="126003cf36e8e6a69ecdbfd1bba121c8"/>
                         </params>
                         <variables>
                             <variable name="toll_allow" 
value="local,international"/>
                             <variable name="user_context" 
value="sip.test.com"/>
                             <variable name="effective_caller_id_name" 
value="Tester"/>
                             <variable name="effective_caller_id_number" 
value="611"/>
                         </variables>
                     </user>
--
And the extension in the dialplan is:
--
   <extension name="Outgoing Test">
     <condition field="${toll_allow}" expression="local"/>
     <condition field="destination_number" expression="^([0-9]{6})$">
       <action application="bridge" data="sofia/gateway/testgw/$1"/>
     </condition>
   </extension>
--

The toll_allow always gets evaluated to an empty string, and when I 
actually run the info application I don't see any of the variables that 
are set. If I replace the ${toll_allow} with ${user_data(${sip_from_uri} 
var toll_allow}, everything is working, although the examples in the 
wiki are showing that you can use those variables just fine without 
invoking user_data.
What am I doing wrong?
Thanks!
----
Kind regards,
Iskren



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list