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

Iskren Hadzhinedev iskren.hadzhinedev at ikiji.com
Wed Mar 19 10:21:15 MSK 2014


Hey there,
The issue was in the profile itself, I downloaded a fresh copy from the 
vanilla config and edited it to suit my needs. Now everything is working 
just fine.
Thanks for the help.

On 19.3.2014 г. 5:00, Nandy Dagondon wrote:
> Check conf/dialplan directory. There might be duplicate *xml files 
> involved.
>
> In my case, api group_call returns nothing.  I had problems with 
> ${toll_allow}, too.  There were 2 directory files loaded default.xml 
> and 192.168.1.100.xml. Under conf/directory/default, the extension 
> phone data are in order.  default.xml points to the same domain, too, 
>  192.168.1.100.  I changed 192.168.1.100.xml to 
> 192.168.1.100.xml.noload and reloadxml (or F6).  Solved.
>
>
>
> On Tue, Mar 18, 2014 at 8:41 PM, mbo <mbodbg at gmx.net 
> <mailto:mbodbg at gmx.net>> wrote:
>
>     OK, I see. So you’re registered with user 611, if you make a call
>     it hit’s the expected context, but all variables set in the user
>     configuration are not set. That should work also with your version
>     you are using, I’m doing the same. Can you provide more logs?
>
>     Thanks
>
>     Markus
>
>
>     Am 17.03.2014 um 19:37 schrieb Iskren Hadzhinedev
>     <iskren.hadzhinedev at ikiji.com <mailto:iskren.hadzhinedev at ikiji.com>>:
>
>     > "local" is a valid regex for "local,international" and it matches
>     > correctly if I use user_data(${sip_from_uri} var toll_allow)
>     instead of
>     > ${toll_allow}. The problem is that ${toll_allow} evaluates to an
>     empty
>     > string in the dialplan as opposed to ${user_data(${sip_from_uri} var
>     > toll_allow)} which returns the correct result. I already have a
>     > debugging extension that uses application "info" and there are no
>     > variables from the directory at all.
>     >
>     > Kind regards,
>     > Iskren
>     >
>     > On 17.3.2014 г. 20:16, mbo wrote:
>     >> You set variable toll_allow to the string „local,international“
>     but you’re matching the condition only to the string „local“.
>     >>
>     >> you can put something like:
>     >>
>     >>  <extension name="Debug">
>     >>     <condition>
>     >>         <action application="log" data="INFO toll_allow:
>     ${toll_allow}" />
>     >>     </condition>
>     >>  </extension“>
>     >>
>     >> in your dial plan to see if the variable is set.
>     >>
>     >> Thanks
>     >>
>     >> Markus
>     >>
>     >>
>     >>
>     >>
>     >>
>     >> Am 17.03.2014 um 16:02 schrieb Iskren Hadzhinedev
>     <iskren.hadzhinedev at ikiji.com <mailto:iskren.hadzhinedev at ikiji.com>>:
>     >>
>     >>> 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 <http://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
>     >>>
>     >>>
>     _________________________________________________________________________
>     >>> Professional FreeSWITCH Consulting Services:
>     >>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     >>> http://www.freeswitchsolutions.com
>     >>>
>     >>> 
>     >>> 
>     >>>
>     >>> Official FreeSWITCH Sites
>     >>> http://www.freeswitch.org
>     >>> http://wiki.freeswitch.org
>     >>> http://www.cluecon.com
>     >>>
>     >>> FreeSWITCH-users mailing list
>     >>> FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     >>>
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     >>> http://www.freeswitch.org
>     >>
>     >>
>     _________________________________________________________________________
>     >> Professional FreeSWITCH Consulting Services:
>     >> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     >> http://www.freeswitchsolutions.com
>     >>
>     >> 
>     >> 
>     >>
>     >> Official FreeSWITCH Sites
>     >> http://www.freeswitch.org
>     >> http://wiki.freeswitch.org
>     >> http://www.cluecon.com
>     >>
>     >> FreeSWITCH-users mailing list
>     >> FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     >>
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     >> http://www.freeswitch.org
>     >
>     >
>     >
>     _________________________________________________________________________
>     > Professional FreeSWITCH Consulting Services:
>     > consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     > http://www.freeswitchsolutions.com
>     >
>     > 
>     > 
>     >
>     > Official FreeSWITCH Sites
>     > http://www.freeswitch.org
>     > http://wiki.freeswitch.org
>     > http://www.cluecon.com
>     >
>     > FreeSWITCH-users mailing list
>     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     >
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     > http://www.freeswitch.org
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     http://www.freeswitchsolutions.com
>
>     
>     
>
>     Official FreeSWITCH Sites
>     http://www.freeswitch.org
>     http://wiki.freeswitch.org
>     http://www.cluecon.com
>
>     FreeSWITCH-users mailing list
>     FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     http://www.freeswitch.org
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.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
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140319/fac59a93/attachment-0001.html 


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