directory variables not set on user channels when bridge does not succeed
Hi To add some features to fs, I need to set some variables in xml directory user as: <include> <user id="1000"> <params> ... <variables> <variable name="profile_id" value="10"/> <variable name="dn_id" value="25"/> ..... <variable name="call_timeout" value="7"/> </variables> </user> </include> as documentation says these variables are set on every inbound or outbound channel for this user. when I try to call to user/1000 if call succeeds everything is ok but if call ends with results like no_answer, in xml_cdr that is sent to my cdr logger url, there is no sign of any variables set in directory as above. is this normal? because if I set these on bleg (user/1000) using export they appear in xml cdr. thanx
If the bridge to the user is not successful then the channel variables aren't set. If you need these variables no matter what then you can probably use this: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_set_user Call that as soon as you know which user you're going to bridge to and it should slurp in all the channel variables for that user even if the bridge is not successful. -MC On Tue, Aug 28, 2012 at 7:41 AM, Babak Yakhchali <babak.freeswitch@gmail.com
wrote:
Hi To add some features to fs, I need to set some variables in xml directory user as: <include> <user id="1000"> <params> ... <variables> <variable name="profile_id" value="10"/> <variable name="dn_id" value="25"/> ..... <variable name="call_timeout" value="7"/> </variables> </user> </include> as documentation says these variables are set on every inbound or outbound channel for this user. when I try to call to user/1000 if call succeeds everything is ok but if call ends with results like no_answer, in xml_cdr that is sent to my cdr logger url, there is no sign of any variables set in directory as above. is this normal? because if I set these on bleg (user/1000) using export they appear in xml cdr. thanx
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
thanx problem is I need to execute it on bleg, where the variables are not set. I tried session:setVariable('bridge_pre_execute_bleg_app','set_user') session:setVariable('bridge_pre_execute_bleg_data',dn) but it is not working until the b leg answers.
On Tue, Aug 28, 2012 at 8:28 AM, Babak Yakhchali <babak.freeswitch@gmail.com
wrote:
thanx problem is I need to execute it on bleg, where the variables are not set. I tried session:setVariable('bridge_pre_execute_bleg_app','set_user') session:setVariable('bridge_pre_execute_bleg_data',dn) but it is not working until the b leg answers.
Yeah, I can see the trouble with setting channel variables on a channel that does not exist. Question: what happens when there is no b leg, i.e., when the called party does not answer? You don't have a b-leg CDR in that case, do you? -MC
there is a cdr. but user variables are not in it!
That's because the user never actually answered. If you simply MUST have these channel variables available on the b-leg, even if the b-leg does not answer, then you'll need to get creative. Perhaps you can read them in and export them in your bridge statement. Or you can post-process the CDR if you know the user name. Sorry, it's the best you're gonna get with the scenario you're dealing with. -MC On Tue, Aug 28, 2012 at 12:54 PM, Babak Yakhchali < babak.freeswitch@gmail.com> wrote:
there is a cdr. but user variables are not in it! _________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
thanx. you are right, I get the info I need using username and dialed_user channel variables
On Tue, Aug 28, 2012 at 9:28 AM, Babak Yakhchali <babak.freeswitch@gmail.com> wrote:
problem is I need to execute it on bleg, where the variables are not set. I tried session:setVariable('bridge_pre_execute_bleg_app','set_user') session:setVariable('bridge_pre_execute_bleg_data',dn) but it is not working until the b leg answers.
What about this? bridge( [execute_on_originate=set_user::SOMEUSER@DOMAIN] user/SOMEUSER@DOMAIN ) ...or something. Best, Gabe
participants (3)
-
Babak Yakhchali
-
Gabriel Gunderson
-
Michael Collins