Directory entry variables not set on channel when user authenticated by cidr and domains ACL?
Hi all! I use xml_curl to get subscriber information from database when they authenticate with username/password. In my directory script I specify <params> and <variables> for user entry, and they are set on channel. Now I'm trying to achieve customer authentication by IP address instead of username/password. I have <list name="domains" default="deny"> <node type="allow" domain="$${domain}"/> </list> and apply-inbound-acl="domains" at users' profile, and passwordless authentication works fine for users with "cidr" attribute, but FS doesn't set channel variables I return in directory entries in response to 'network-list' request on 'reloadacl', for example. Since my dialplan logic relies on these variables (like customer ID and so on), dialplan scripts don't see these vars on incoming calls from users authenticated by domains ACL and fail their calls :( Is this normal behaviour or I'm missing something? How can I get user variables from my DB set on channel when authenticating call by CIDR attribute? -- Best regards, Dmitry Sytchev, IT Engineer
On Tue, Nov 6, 2012 at 5:48 AM, Dmitry Sytchev <kbdfck@gmail.com> wrote:
Is this normal behaviour or I'm missing something? How can I get user variables from my DB set on channel when authenticating call by CIDR attribute?
When you're using the CIDR, you're not technically auth-ing, right? Just a guess here (since I don't run an environment like yours), but it's not going to be hitting the directory, right? Do you even see a POST the to HTTP server asking for the directory in this case? Anyway, this should do what you need: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_set_user Let us know what you find out. Best, Gabe
Thanks, I'll try this Technically ACL is not auth, but when I respond to directory request on 'reloadacl' and freeswitch startup, I pass all variables etc. Seems freeswitch takes only user id and domain from this response, and then sets 'variable_acl_token' and 'variable_sip_acl_token' to 'user_id@domain' for matching cidr value. So question is will FS make directory request on set_user or not :) I'll try and share my results 2012/11/7 Gabriel Gunderson <gabe@gundy.org>
On Tue, Nov 6, 2012 at 5:48 AM, Dmitry Sytchev <kbdfck@gmail.com> wrote:
Is this normal behaviour or I'm missing something? How can I get user variables from my DB set on channel when authenticating call by CIDR attribute?
When you're using the CIDR, you're not technically auth-ing, right? Just a guess here (since I don't run an environment like yours), but it's not going to be hitting the directory, right? Do you even see a POST the to HTTP server asking for the directory in this case?
Anyway, this should do what you need: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_set_user
Let us know what you find out.
Best, Gabe
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Best regards, Dmitry Sytchev, IT Engineer
participants (2)
-
Dmitry Sytchev
-
Gabriel Gunderson