View previous topic :: View next topic |
Author |
Message |
chavpaskov at shaw.ca Guest
|
Posted: Thu Feb 26, 2009 4:16 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
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 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
|
Back to top |
|
|
brian at freeswitch.org Guest
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Feb 26, 2009 4:42 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
On Thu, Feb 26, 2009 at 1:18 PM, Tchavdar Paskov <chavpaskov@shaw.ca> wrote:
Quote: | 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
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Thu Feb 26, 2009 4:55 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
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:
Quote: |
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
|
_______________________________________________
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 |
|
Back to top |
|
|
mrene_lists at avgs.ca Guest
|
Posted: Thu Feb 26, 2009 4:56 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
<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:
Quote: | 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
|
_______________________________________________
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 |
|
Back to top |
|
|
mrene_lists at avgs.ca Guest
|
Posted: Thu Feb 26, 2009 4:58 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
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:
Quote: | 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
|
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Thu Feb 26, 2009 5:02 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
OK I think we have covered BOTH directions now
/b
On Feb 26, 2009, at 3:48 PM, Mathieu Rene wrote:
Quote: | <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="..." />
|
_______________________________________________
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 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Feb 26, 2009 5:14 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
Quote: |
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
Quote: | <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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Thu Feb 26, 2009 5:42 pm Post subject: [Freeswitch-users] Variables from failed call to be exported |
|
|
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 (msc@freeswitch.org)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
|