Variables from failed call to be exported to a a new B leg
Hi Everybody, this is what i' trying to do / unsuccessfully / so far: <extension name="test"> <condition field="destination_number" expression="^1(\d+)$" break="never"> <action application="set" data="bypass_media=true" /> <action application="set" data="continue_on_fail=true"/> <action application="bridge" data="sofia/gateway/gw_1/$1"/> <action application="info" /> -> at this point i'd like to collect some sip Vars from the failed call <action application="export" data="nolocal:sip_hangup_phrase" /> - from what i red in wiki i think this is the way to export the var to the Bleg <action application="bridge" data="sofia/gateway/gw_2/$0" /> </condition> </extension> the gw_2 does not seem to receive the sip_hangup_phrase. pls help me to figure out what i'm doing wrong. thank you in advance. regards Chav
Yes it was typo.My Bad Chav ----- Original Message ----- From: Michael Collins <msc@freeswitch.org> Date: Thursday, February 26, 2009 1:07 pm Subject: Re: [Freeswitch-users] Variables from failed call to be exported to a a new B leg To: freeswitch-users@lists.freeswitch.org
<action application="bridge" data="sofia/gateway/gw_2/$0" />
Why are you using $0 here? Is that a typo? -MC
_______________________________________________ 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
isn't this already done because of the info application called before ? Chav ----- Original Message ----- From: Brian West <brian@freeswitch.org> Date: Thursday, February 26, 2009 1:14 pm Subject: Re: [Freeswitch-users] Variables from failed call to be exported to a a new B leg To: freeswitch-users@lists.freeswitch.org
You might also want to actually SET a value to the variable.
/b
On Feb 26, 2009, at 2:56 PM, Tchavdar Paskov wrote:
<action application="export" data="nolocal:sip_hangup_phrase" />
_______________________________________________ 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
On Thu, Feb 26, 2009 at 1:18 PM, Tchavdar Paskov <chavpaskov@shaw.ca> wrote:
isn't this already done because of the info application called before ? Chav
to make sure that there is indeed a value and that it gets exported to the second b-leg try this: <action application="set" data="my_var=${nolocal:sip_hangup_phrase}"/> <action application="export" data="my_var" /> see if my_var is populated on the new b-leg. -MC
You can also do it like this: <action application="bridge" data="{sip_hangup_phrase=$ {sip_hangup_phrase}}sofia/gateway/gw_2/$1" /> I don't think what MC pointed out works. I'll have to double check. /b On Feb 26, 2009, at 3:35 PM, Michael Collins wrote:
to make sure that there is indeed a value and that it gets exported to the second b-leg try this: <action application="set" data="my_var=${nolocal:sip_hangup_phrase}"/> <action application="export" data="my_var" />
see if my_var is populated on the new b-leg. -MC
to make sure that there is indeed a value and that it gets exported to the second b-leg try this: <action application="set" data="my_var=${nolocal:sip_hangup_phrase}"/>
oops, that set line should have been: <action application="set" data="my_var=${sip_hangup_phrase}"/> That "nolocal:" was extraneous from a lazy copy & paste
<action application="export" data="my_var" />
see if my_var is populated on the new b-leg. -MC
The most elegant solution is the one Brian gave: <action application="set" data=""export_vars=sip_hangup_phrase"/> So use it, please, and forget what I wrote. :) -MC
set the var failed_xml_cdr_prefix=foo before you call bridge and the failed calls will have a complete xml cdr saved in foo_X where X is an incrementing number from 1 upwards. On Thu, Feb 26, 2009 at 4:03 PM, Michael Collins <msc@freeswitch.org> wrote:
to make sure that there is indeed a value and that it gets exported to the second b-leg try this: <action application="set" data="my_var=${nolocal:sip_hangup_phrase}"/>
oops, that set line should have been: <action application="set" data="my_var=${sip_hangup_phrase}"/> That "nolocal:" was extraneous from a lazy copy & paste
<action application="export" data="my_var" />
see if my_var is populated on the new b-leg. -MC
The most elegant solution is the one Brian gave: <action application="set" data=""export_vars=sip_hangup_phrase"/>
So use it, please, and forget what I wrote. :) -MC
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
You then don't use the export command... you set the variable <action application="set" data=""export_vars=sip_hangup_phrase"/> /b On Feb 26, 2009, at 3:18 PM, Tchavdar Paskov wrote:
isn't this already done because of the info application called before ? Chav
Worked like charm. Thanks everyone for your support. Regards Chav ----- Original Message ----- From: Brian West <brian@freeswitch.org> Date: Thursday, February 26, 2009 1:47 pm Subject: Re: [Freeswitch-users] Variables from failed call to be exported to a a new B leg To: freeswitch-users@lists.freeswitch.org
You then don't use the export command... you set the variable <action application="set" data=""export_vars=sip_hangup_phrase"/>
/b
On Feb 26, 2009, at 3:18 PM, Tchavdar Paskov wrote:
isn't this already done because of the info application called before ? Chav
_______________________________________________ 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
Don't run off so fast. ;) You should join us on IRC... I would like to see the IRC numbers over 200 soon ;) /b On Feb 27, 2009, at 4:27 PM, Tchavdar Paskov wrote:
Worked like charm. Thanks everyone for your support. Regards Chav
Just logging into IRC Regards Chav ----- Original Message ----- From: Brian West <brian@freeswitch.org> Date: Friday, February 27, 2009 2:31 pm Subject: Re: [Freeswitch-users] Variables from failed call to be exported to a a new B leg To: freeswitch-users@lists.freeswitch.org
Don't run off so fast. ;) You should join us on IRC... I would like to see the IRC numbers over 200 soon ;)
/b
On Feb 27, 2009, at 4:27 PM, Tchavdar Paskov wrote:
Worked like charm. Thanks everyone for your support. Regards Chav
_______________________________________________ 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
<action application="set" data="import=vars,you,want,from,the,bleg" /> <action application="bridge" data="..." /> <!-- Vars defined in the import var will be copied back to the A-leg --> <action application="bridge" data="..." /> On 26-Feb-09, at 3:56 PM, Tchavdar Paskov wrote:
Hi Everybody,
this is what i' trying to do / unsuccessfully / so far:
<extension name="test"> <condition field="destination_number" expression="^1(\d+)$" break="never"> <action application="set" data="bypass_media=true" /> <action application="set" data="continue_on_fail=true"/> <action application="bridge" data="sofia/gateway/gw_1/$1"/> <action application="info" /> -> at this point i'd like to collect some sip Vars from the failed call <action application="export" data="nolocal:sip_hangup_phrase" /> - from what i red in wiki i think this is the way to export the var to the Bleg <action application="bridge" data="sofia/gateway/gw_2/$0" /> </condition> </extension>
the gw_2 does not seem to receive the sip_hangup_phrase. pls help me to figure out what i'm doing wrong.
thank you in advance. regards Chav _______________________________________________ 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
OK I think we have covered BOTH directions now ;) /b On Feb 26, 2009, at 3:48 PM, Mathieu Rene wrote:
<action application="set" data="import=vars,you,want,from,the,bleg" /> <action application="bridge" data="..." /> <!-- Vars defined in the import var will be copied back to the A-leg --> <action application="bridge" data="..." />
Oh I just remembered something, You can set the "failed_xml_cdr_prefix" variable (on the A-leg). And it will copy ALL variables from the B-leg if the call fails. <action application="set" data="failed_xml_cdr_prefix=providerA" /> <action application="bridge" data="...." /> <action application="set" data="failed_xml_cdr_prefix=providerB" /> <action application="bridge" data="...." /> Then you should have providerA_hangup_cause, providerB_hangup_cause. Mathieu On 26-Feb-09, at 3:56 PM, Tchavdar Paskov wrote:
Hi Everybody,
this is what i' trying to do / unsuccessfully / so far:
<extension name="test"> <condition field="destination_number" expression="^1(\d+)$" break="never"> <action application="set" data="bypass_media=true" /> <action application="set" data="continue_on_fail=true"/> <action application="bridge" data="sofia/gateway/gw_1/$1"/> <action application="info" /> -> at this point i'd like to collect some sip Vars from the failed call <action application="export" data="nolocal:sip_hangup_phrase" /> - from what i red in wiki i think this is the way to export the var to the Bleg <action application="bridge" data="sofia/gateway/gw_2/$0" /> </condition> </extension>
the gw_2 does not seem to receive the sip_hangup_phrase. pls help me to figure out what i'm doing wrong.
thank you in advance. regards Chav _______________________________________________ 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
participants (5)
-
Anthony Minessale
-
Brian West
-
Mathieu Rene
-
Michael Collins
-
Tchavdar Paskov