Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Variables from failed call to be exported to a a new B leg


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
chavpaskov at shaw.ca
Guest





PostPosted: Thu Feb 26, 2009 4:16 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with 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
Back to top
msc at freeswitch.org
Guest





PostPosted: Thu Feb 26, 2009 4:20 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

Quote:
         <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
Back to top
brian at freeswitch.org
Guest





PostPosted: Thu Feb 26, 2009 4:20 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

You might also want to actually SET a value to the variable.

/b

On Feb 26, 2009, at 2:56 PM, Tchavdar Paskov wrote:

Quote:
<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
Back to top
msc at freeswitch.org
Guest





PostPosted: Thu Feb 26, 2009 4:42 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

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





PostPosted: Thu Feb 26, 2009 4:55 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

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





PostPosted: Thu Feb 26, 2009 4:56 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with 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="..." />

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





PostPosted: Thu Feb 26, 2009 4:58 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

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





PostPosted: Thu Feb 26, 2009 5:02 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

OK I think we have covered BOTH directions now Wink

/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





PostPosted: Thu Feb 26, 2009 5:14 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

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. Smile
-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





PostPosted: Thu Feb 26, 2009 5:41 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

You can use nolocal: with export. Just not set.

/b

On Feb 26, 2009, at 4:03 PM, Michael Collins wrote:

Quote:
That "nolocal:" was extraneous from a lazy copy & paste


_______________________________________________
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
anthony.minessale at g...
Guest





PostPosted: Thu Feb 26, 2009 5:42 pm    Post subject: [Freeswitch-users] Variables from failed call to be exported Reply with quote

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:
Quote:
>
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. Smile

-MC

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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 ([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
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services