Variables in Dialplan - Problem with getting Variables from User Directory
Hi there, iam really getting crazy these days ;-) I've changed our Freeswitch Version some Weeks ago ( cannot remember exactly but proably from 1.0.6 ) to the git Head. ). Since this Change ( or better since the followed Config File Adaptions ;-) ) i noticed that i cannot use User Variables/Params inside the XML-Dialplan anymore. Some (relevant?! ;) ) Copy&Paste .. my Userentry <include> <user id="99"> <params> <param name="password" value="something"/> <param name="vm-mailto" value="maybe_me@omeco.de"/> <param name="vm-mailfrom" value="noreply@omeco.de"/> <param name="vm-enabled" value="true"/> <param name="vm-password" value="user-choose"/> <param name="vm-email-all-messages" value="false"/> <param name="vm-notify-email-all-messages" value="true"/> <param name="vm-keep-local-after-email" value="true"/> </params> <variables> <variable name="outbound_caller_id_name" value="Omeco GmbH"/> <variable name="outbound_caller_id_number" value="06316803540"/> <variable name="effective_caller_id_name" value="Silvio Escher"/> <variable name="effective_caller_id_number" value="40"/> <variable name="callgroup" value="1"/> </variables> </user> </include> some dp snippet.. before the change something like <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> was working fine .. Actually iam using <action application="set" data="effective_caller_id_name=${user_data(${username}@${domain_name} var outbound_caller_id_name)}"/> <action application="set" data="effective_caller_id_number=${user_data(${username}@${domain_name} var outbound_caller_id_number)}"/> or an <action application="set_user" data="$1@${domain_name}"/> to get some or all Variables. But i Noticed that the "set_user" Thingie just gets me the Variables - not the Params. So i've still Issues with mod_voicemail ( Mailto is undef ) 2011-08-30 22:02:32.904211 [DEBUG] switch_utils.c:709 Emailed data to [(null)] 2011-08-30 22:02:32.904211 [DEBUG] mod_voicemail.c:2809 Sending notify message to (null) Maybe i has something todo with an missing auth or wrong Domain or whatever .. but i have no clue where to look further. Any Help ( from little Hints till complete Miracle Solve ;-) ) is actually very welcome. Thanks in Advance, Silvio -- Silvio Escher omeco GmbH
Am 30.08.2011 um 23:06 schrieb Silvio Escher:
Hi there,
iam really getting crazy these days ;-)
I've changed our Freeswitch Version some Weeks ago ( cannot remember exactly but proably from 1.0.6 ) to the git Head. ). Since this Change ( or better since the followed Config File Adaptions ;-) ) i noticed that i cannot use User Variables/Params inside the XML-Dialplan anymore.
Some (relevant?! ;) ) Copy&Paste ..
my Userentry
<include> <user id="99"> <params> <param name="password" value="something"/> <param name="vm-mailto" value="maybe_me@omeco.de"/> <param name="vm-mailfrom" value="noreply@omeco.de"/> <param name="vm-enabled" value="true"/> <param name="vm-password" value="user-choose"/> <param name="vm-email-all-messages" value="false"/> <param name="vm-notify-email-all-messages" value="true"/> <param name="vm-keep-local-after-email" value="true"/> </params> <variables> <variable name="outbound_caller_id_name" value="Omeco GmbH"/> <variable name="outbound_caller_id_number" value="06316803540"/> <variable name="effective_caller_id_name" value="Silvio Escher"/> <variable name="effective_caller_id_number" value="40"/> <variable name="callgroup" value="1"/> </variables> </user> </include>
some dp snippet..
before the change something like
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/> <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
was working fine ..
Actually iam using
<action application="set" data="effective_caller_id_name=${user_data(${username}@${domain_name} var outbound_caller_id_name)}"/> <action application="set" data="effective_caller_id_number=${user_data(${username}@${domain_name} var outbound_caller_id_number)}"/>
if you set the user with set_user there is no requirement to use user_data since it should get the params for the respective user automatically.
or an
<action application="set_user" data="$1@${domain_name}"/>
to get some or all Variables.
But i Noticed that the "set_user" Thingie just gets me the Variables - not the Params. So i've still Issues with mod_voicemail ( Mailto is undef )
params are checked on call, so only there when required and checked each time, vars are fixed.
2011-08-30 22:02:32.904211 [DEBUG] switch_utils.c:709 Emailed data to [(null)] 2011-08-30 22:02:32.904211 [DEBUG] mod_voicemail.c:2809 Sending notify message to (null)
Maybe i has something todo with an missing auth or wrong Domain or whatever .. but i have no clue where to look further.
Any Help ( from little Hints till complete Miracle Solve ;-) ) is actually very welcome.
Thanks in Advance, Silvio
-- Silvio Escher omeco GmbH
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
Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Weigandufer 45, Büro 115, D-12059 Berlin Voice: +49 30 60988730 Amtsgericht Charlottenburg HRA 44413 B Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de ----
Am 31.08.11 15:20, schrieb Michal Bielicki:
Am 30.08.2011 um 23:06 schrieb Silvio Escher:
if you set the user with set_user there is no requirement to use user_data since it should get the params for the respective user automatically.
yes - i already got this - i just want to show 2 ways to solve my issue partially ( maybe helpfull for others after google indexing ;) )
params are checked on call, so only there when required and checked each time, vars are fixed. this wont help me much at this point - the question is "why" are the vars and params unavailable without set_user or user_data thingies .. or at this special point - how to get the params available during the voicemail event
Best Regards, Silvio
the question is "why" are the vars and params unavailable without set_user or user_data thingies
If set_user works ok, then I guess you're probably not authenticating as that user without running that app. Perhaps some config file was changed during the update? -Steve On 31 August 2011 18:55, Silvio Escher <sescher_ml@omeco.de> wrote:
Am 31.08.11 15:20, schrieb Michal Bielicki:
Am 30.08.2011 um 23:06 schrieb Silvio Escher:
if you set the user with set_user there is no requirement to use
user_data since it should get the
params for the respective user automatically.
yes - i already got this - i just want to show 2 ways to solve my issue partially ( maybe helpfull for others after google indexing ;) )
params are checked on call, so only there when required and checked each time, vars are fixed. this wont help me much at this point - the question is "why" are the vars and params unavailable without set_user or user_data thingies .. or at this special point - how to get the params available during the voicemail event
Best Regards, Silvio
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
Am 01.09.11 11:47, schrieb Steven Ayre:
the question is "why" are the vars and params unavailable without set_user or user_data thingies
If set_user works ok, then I guess you're probably not authenticating as that user without running that app. Perhaps some config file was changed during the update?
-Steve
Regarding the mod_voicemail issue there isn't an authenticated user ( internal ) in place. The Calls comes from external and joins the public dp ... <extension name="internDW"> <condition field="${sip_to_user}" expression="^063168035(\d{1,2})$"> <action application="set" data="continue_on_fail=true"/> <action application="set" data="call_timeout=20"/> <action application="bridge" data="user/$1@${domain_name}"/> <action application="answer"/> <action application="playback" data="niemand_da_ohnezeit.wav"/> <action application="sleep" data="1000"/> <action application="set" data="default_language=de"/> <action application="set" data="skip_greeting=true"/> <action application="voicemail" data="default $${domain} $1"/> </condition> </extension> As i understand the freeswitch wiki, mod_voicemail should take the Params for $1 ( the dialed extension ) somehow from the Directory User. But an unanswered Call to DID 40 enters the Voicemail for that User correctly ( VM is stored, Phone Button/LED for VM Notify works as expected ) - but i get no Notify Message by Mail because mod_voicemail cant get the "vm-mailto" from my Directoryentry. 2011-09-01 13:03:52.924206 [DEBUG] mod_voicemail.c:2578 Deliver VM to 40@pbx.omeco.voice 2011-09-01 13:03:52.924206 [DEBUG] switch_utils.c:709 Emailed data to [(null)] 2011-09-01 13:03:52.924206 [DEBUG] mod_voicemail.c:2809 Sending notify message to (null) Regards, Silvio -- Silvio Escher omeco GmbH
Ok - finally i'll answer my own questions maybe this helps some others... - thanks to Michal & Mathieu for this nice gdb Session yesterday ;-) Am 30.08.11 23:06, schrieb Silvio Escher:
I've changed our Freeswitch Version some Weeks ago ( cannot remember exactly but proably from 1.0.6 ) to the git Head. ). Since this Change ( or better since the followed Config File Adaptions ;-) ) i noticed that i cannot use User Variables/Params inside the XML-Dialplan anymore.
thats related to "auth" - during the calls my phones arent regonized as "auth by user" atm - just by our ip subnet over the internal acl - thats why (as Mathieu told me) my User Vars/Params arent available in the DP (just with user_data or set_user) related docs .. http://wiki.freeswitch.org/wiki/Variable_sip_auth_username or http://wiki.freeswitch.org/wiki/Variable_sip_authorized i just disabled <param name="apply-inbound-acl" value="domains"/> ( commented it out ) and everything works fine ( btw i havent changed this parameter since months .. so maybe the default behavior ( acl auth overrule user auth ) changed in one of the "last" versions ?!
So i've still Issues with mod_voicemail ( Mailto is undef )
2011-08-30 22:02:32.904211 [DEBUG] switch_utils.c:709 Emailed data to [(null)] 2011-08-30 22:02:32.904211 [DEBUG] mod_voicemail.c:2809 Sending notify message to (null)
on the one side an (now solved) bug (http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=8974f9d62e0346cd0...) - on the other side i havent used the vm-notify-mailto param directly (as the wiki told me that vm-notify-mailto defaults to vm-mailto) -- Silvio Escher omeco GmbH
participants (3)
-
Michal Bielicki
-
Silvio Escher
-
Steven Ayre