[Freeswitch-users] Unable to get channel variables from directory to dialplan.

Vladislav Ivanov deforceczt at gmail.com
Wed Aug 26 18:05:35 MSD 2015


Good Day,

I have been trying to set up the sip phone at my home, and i'm having some
issues with channel variables.
>From what I have read:
https://wiki.freeswitch.org/wiki/Routing_with_directory_parameters   I
should force per-call authentication in your sofia.xml.conf for <variables>
to be passed through to the dialplan. But I were unable to find this option
in sofia/sofia_default files.

https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables -
Although here there is nothing about "per-call authentication". And I'm not
sure how to proceed.

I have this directory xml:

<include>
  <user id="123123">
    <params>
      <param name="password" value="123123"/>
    </params>
    <variables>
      <variable name="accountcode" value="123123"/>
      <variable name="user_context" value="test_context"/>
      <variable name="effective_caller_id_name" value="Test Phone"/>
      <variable name="effective_caller_id_number" value="123123"/>
      <variable name="outbound_caller_id_name"
value="$${outbound_caller_name}"/>
      <variable name="outbound_caller_id_number"
value="$${outbound_caller_id}"/>
    </variables>
  </user>
</include>

Directory variables should be passed as ${variable} as they are channel
variables?
I have Dialplan as follows:

<extension name="registrar_test">
        <condition field="destination_number" expression="^(.*)$">
                <action application="log" data="ERR TestMessage
[${user_context}]"/>
                <action application="respond" data="503 Route Successfull"/>
        </condition>
</extension>

<extension name="all_reject">
        <condition field="destination_number" expression="^(.*)$">
                <action application="respond" data="503 No Route"/>
        </condition>
</extension>

When I dial the call I get TestMessage [] instead of test_context.
Also, wrapping registrar_test extension with <context
name="test_context"></context>
doesn't help, my call will go to "all_reject" extension.

What do I miss?

Best Regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150826/c822023c/attachment-0001.html 


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