Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Export variables from originate command


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





PostPosted: Thu Jan 08, 2009 1:51 am    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

Hello everyone,

I'd like to give some variables to the originate command that pass
(export) to the application I am calling.

So, if I am calling the transfer app (from originate) to go back
into the dialplan I'd like to use the variables in the dialplan that
were passed to my original originate command (via the transfer
application). Clear as mud, right? Wink

Is this possible?

Thanks!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.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
Back to top
anthony.minessale at g...
Guest





PostPosted: Thu Jan 08, 2009 9:18 am    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com (user@dom.com)

if you are doing forked dial you can set them per leg with []

[var1=foo]sofia/default/user@dom.com (user@dom.com),[var1=bar]sofia/default/user2@dom.com (user2@dom.com)




On Thu, Jan 8, 2009 at 12:50 AM, Kristian Kielhofner <kristian.kielhofner@gmail.com (kristian.kielhofner@gmail.com)> wrote:
Quote:
Hello everyone,

I'd like to give some variables to the originate command that pass
(export) to the application I am calling.

So, if I am calling the transfer app (from originate) to go back
into the dialplan I'd like to use the variables in the dialplan that
were passed to my original originate command (via the transfer
application). Clear as mud, right? Wink

Is this possible?

Thanks!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
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
kristian.kielhofner at...
Guest





PostPosted: Thu Jan 08, 2009 12:10 pm    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Quote:
put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com

if you are doing forked dial you can set them per leg with []

[var1=foo]sofia/default/user@dom.com,[var1=bar]sofia/default/user2@dom.com


Tony,

Thanks for getting back to me. This part I understand (using
commas, etc). What I need to figure out is how to get those variables
to be available to the application I am calling after the channel in
the originate command. In this case transfer to put my call back into
the dialplan.

basically I need a way to set variables in the originate command
that are available to the application I am calling, not just the
channel I am creating with the URL syntax.

Am I making anymore sense?

Thanks again!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.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
Back to top
msc at freeswitch.org
Guest





PostPosted: Thu Jan 08, 2009 6:53 pm    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

On Thu, Jan 8, 2009 at 9:06 AM, Kristian Kielhofner
<kristian.kielhofner@gmail.com> wrote:
Quote:
On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Quote:
put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com

if you are doing forked dial you can set them per leg with []

[var1=foo]sofia/default/user@dom.com,[var1=bar]sofia/default/user2@dom.com


Tony,

Thanks for getting back to me. This part I understand (using
commas, etc). What I need to figure out is how to get those variables
to be available to the application I am calling after the channel in
the originate command. In this case transfer to put my call back into
the dialplan.

basically I need a way to set variables in the originate command
that are available to the application I am calling, not just the
channel I am creating with the URL syntax.

What application(s) are you calling? Could you post an example?
-MC


Quote:

Am I making anymore sense?

Thanks again!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.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


_______________________________________________
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 Jan 08, 2009 6:56 pm    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

the variables should still be set on the channel in your application?
you mean a remote call-leg or the channel itself once it's in the app?

On Thu, Jan 8, 2009 at 5:50 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:
On Thu, Jan 8, 2009 at 9:06 AM, Kristian Kielhofner
<kristian.kielhofner@gmail.com (kristian.kielhofner@gmail.com)> wrote:

Quote:
On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com (user@dom.com)

if you are doing forked dial you can set them per leg with []

[var1=foo]sofia/default/user@dom.com (user@dom.com),[var1=bar]sofia/default/user2@dom.com (user2@dom.com)


Tony,

Thanks for getting back to me. This part I understand (using
commas, etc). What I need to figure out is how to get those variables
to be available to the application I am calling after the channel in
the originate command. In this case transfer to put my call back into
the dialplan.

basically I need a way to set variables in the originate command
that are available to the application I am calling, not just the
channel I am creating with the URL syntax.


What application(s) are you calling? Could you post an example?
-MC



Quote:

Am I making anymore sense?

Thanks again!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
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


_______________________________________________
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
kristian.kielhofner at...
Guest





PostPosted: Thu Jan 08, 2009 8:31 pm    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

Here's an example:

bgapi originate {myvar=blah}sofia/gateway/gw/19415551212 &transfer(500
XML default) 9185551212 60

So... I'd like to be able to read ${myvar} from the the 500 extension
in the default context.

On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Quote:
the variables should still be set on the channel in your application?
you mean a remote call-leg or the channel itself once it's in the app?


On Thu, Jan 8, 2009 at 5:50 PM, Michael Collins <msc@freeswitch.org> wrote:

Quote:
On Thu, Jan 8, 2009 at 9:06 AM, Kristian Kielhofner

<kristian.kielhofner@gmail.com> wrote:

Quote:
On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Quote:
put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com

if you are doing forked dial you can set them per leg with []


[var1=foo]sofia/default/user@dom.com,[var1=bar]sofia/default/user2@dom.com
Quote:
Quote:

Tony,

Thanks for getting back to me. This part I understand (using
commas, etc). What I need to figure out is how to get those variables
to be available to the application I am calling after the channel in
the originate command. In this case transfer to put my call back into
the dialplan.

basically I need a way to set variables in the originate command
that are available to the application I am calling, not just the
channel I am creating with the URL syntax.

What application(s) are you calling? Could you post an example?
-MC





Quote:

Am I making anymore sense?

Thanks again!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.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
Quote:
Quote:
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
Quote:
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400

_______________________________________________
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




--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.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
Back to top
anthony.minessale at g...
Guest





PostPosted: Thu Jan 08, 2009 9:09 pm    Post subject: [Freeswitch-users] Export variables from originate command Reply with quote

yes it will be there in ext 500. any vars in {} are set when the channel is created and are present the rest of
the life of the channel.

you can do regex on it in the dialplan by referencing it with a ${} in the field

<condition field="${myvar}" expression="blah"> ... </condition>

and any apps you execute will also be able to get the value of ${myvar}



On Thu, Jan 8, 2009 at 7:29 PM, Kristian Kielhofner <kristian.kielhofner@gmail.com (kristian.kielhofner@gmail.com)> wrote:
Quote:
Here's an example:

bgapi originate {myvar=blah}sofia/gateway/gw/19415551212 &transfer(500
XML default) 9185551212 60

So... I'd like to be able to read ${myvar} from the the 500 extension
in the default context.


On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
the variables should still be set on the channel in your application?
you mean a remote call-leg or the channel itself once it's in the app?


On Thu, Jan 8, 2009 at 5:50 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:

Quote:
On Thu, Jan 8, 2009 at 9:06 AM, Kristian Kielhofner

<kristian.kielhofner@gmail.com (kristian.kielhofner@gmail.com)> wrote:

Quote:
On 1/8/09, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
put them in {} comma separated.


{foo=bar,test=true}sofia/default/user@dom.com (user@dom.com)

if you are doing forked dial you can set them per leg with []


[var1=foo]sofia/default/user@dom.com (user@dom.com),[var1=bar]sofia/default/user2@dom.com (user2@dom.com)
Quote:
Quote:

Tony,

Thanks for getting back to me. This part I understand (using
commas, etc). What I need to figure out is how to get those variables
to be available to the application I am calling after the channel in
the originate command. In this case transfer to put my call back into
the dialplan.

basically I need a way to set variables in the originate command
that are available to the application I am calling, not just the
channel I am creating with the URL syntax.

What application(s) are you calling? Could you post an example?
-MC





Quote:

Am I making anymore sense?

Thanks again!

--
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
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
Quote:
Quote:
http://www.freeswitch.org


_______________________________________________
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
Quote:
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

_______________________________________________
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






--

Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com

_______________________________________________
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