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

Steven Ayre steveayre at gmail.com
Sun Aug 30 00:32:12 MSD 2015


You're looking for the auth-calls param on the sofia profile the call is
being sent to.
https://wiki.freeswitch.org/wiki/Sofia.conf.xml#auth-calls

It's important to note that in SIP authentication of calls and registration
are completely separate. Even if you're registered your calls won't show as
from you unless you authenticate. Some of the profiles in the example
(vanilla) config don't require authentication so you can receive public
calls (eg calls into a DID) on that profile.

On 26 August 2015 at 15:05, Vladislav Ivanov <deforceczt at gmail.com> wrote:

> 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
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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/20150829/917edce6/attachment-0001.html 


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