In Asterisk one can include the extensions of another context with include =>. What's the best way to pull that off in FreeSWITCH? I've played a bit with mod_dptools transfer but it doesn't look like it's going to do exactly what I want... Any ideas? Thanks! -- Kristian Kielhofner http://blog.krisk.org http://www.submityoursip.com http://www.astlinux.org http://www.star2star.com
Could you post a sample from an Asterisk dialplan and maybe we can come up with a good way to replicate it in FS? Possibly there is a more elegant solution that does not require lots of munging. -MC On Mon, Oct 20, 2008 at 12:48 PM, Kristian Kielhofner < kkielhofner@star2star.com> wrote:
In Asterisk one can include the extensions of another context with include =>. What's the best way to pull that off in FreeSWITCH? I've played a bit with mod_dptools transfer but it doesn't look like it's going to do exactly what I want...
Any ideas? 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
On 10/20/08, Michael Collins <msc@freeswitch.org> wrote:
Could you post a sample from an Asterisk dialplan and maybe we can come up with a good way to replicate it in FS? Possibly there is a more elegant solution that does not require lots of munging. -MC
Sure: [include] exten => 727,1,DoStuff exten => 800,1,DoOtherStuff [default] include => include I know it's a simple case and not really an "example" but I'm really just looking for a way for a context to just "plow through" another context looking for a match before it returns "No Route" and aborts. Not exactly elegant but sometimes it's just got to be done (I guess). It looks like that's what transfer is supposed to do... Is there any way for me to just remove a condition on the match in [default] and then just run through another context as defined by my args to transfer before returning no route? It would be nice to be able to do multiple "includes" like so: <extension name="include" continue="true"> <action application="transfer" data="${dialed_ext} XML include"/> </extension> <extension name="include2" continue="true"> <action application="transfer" data="${dialed_ext} XML include2"/> </extension> I know it's ugly... :( -- Kristian Kielhofner http://blog.krisk.org http://www.submityoursip.com http://www.astlinux.org http://www.star2star.com
Sure:
[include] exten => 727,1,DoStuff exten => 800,1,DoOtherStuff
[default] include => include
I know it's a simple case and not really an "example" but I'm really just looking for a way for a context to just "plow through" another context looking for a match before it returns "No Route" and aborts. Not exactly elegant but sometimes it's just got to be done (I guess).
Curious - why exactly must it some times be done? That is, what scenarios? The reason I ask is that the devs are pretty clever and have anticipated just about any scenario. My guess is that there's an elegant solution without stacking a bunch of includes, but I think we'd need to hear about specific scenarios. Thoughts? -MC
It looks like that's what transfer is supposed to do... Is there any way for me to just remove a condition on the match in [default] and then just run through another context as defined by my args to transfer before returning no route? It would be nice to be able to do multiple "includes" like so:
<extension name="include" continue="true"> <action application="transfer" data="${dialed_ext} XML include"/> </extension>
<extension name="include2" continue="true"> <action application="transfer" data="${dialed_ext} XML include2"/> </extension>
I know it's ugly... :(
-- 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
you can just as the last exten in your context do a transfer to the other context. Mike On Oct 20, 2008, at 5:11 PM, Michael Collins wrote:
Sure:
[include] exten => 727,1,DoStuff exten => 800,1,DoOtherStuff
[default] include => include
I know it's a simple case and not really an "example" but I'm really just looking for a way for a context to just "plow through" another context looking for a match before it returns "No Route" and aborts. Not exactly elegant but sometimes it's just got to be done (I guess).
Curious - why exactly must it some times be done? That is, what scenarios? The reason I ask is that the devs are pretty clever and have anticipated just about any scenario. My guess is that there's an elegant solution without stacking a bunch of includes, but I think we'd need to hear about specific scenarios.
Thoughts? -MC
It looks like that's what transfer is supposed to do... Is there any way for me to just remove a condition on the match in [default] and then just run through another context as defined by my args to transfer before returning no route? It would be nice to be able to do multiple "includes" like so:
<extension name="include" continue="true"> <action application="transfer" data="${dialed_ext} XML include"/> </extension>
<extension name="include2" continue="true"> <action application="transfer" data="${dialed_ext} XML include2"/> </extension>
I know it's ugly... :(
One important thing to remember is that in FreeSWITCH the dialplan is a separate stage of a call. FS parses your dialplan in one pass and builds a "todo" list and then it hits execute state and really does the stuff. We do have an application called execute_extension that lets you run a dialplan module from the execute state just for the purpose of executing the instruction set from a certian extension so you could use that for what you want like so: <!--- put this extension last --> <extension name="include" continue="true"> <!-- conditions with no expression are instantly true --> <condition> <action application="execute_extension" data="${dialed_ext} XML include"/> <action application="execute_extension" data="${dialed_ext} XML include2"/> <condition/> </extension> This would actually cause you to run through both contexts in this order during EXECUTE state. were the transfer app actually stops the EXECUTE by sending the channel back to RINGING and re-entering the dialplan stage. Your best bet is to try to shift the paragidm in your head away from how asterisk does it =D On Mon, Oct 20, 2008 at 3:06 PM, Kristian Kielhofner < kkielhofner@star2star.com> wrote:
On 10/20/08, Michael Collins <msc@freeswitch.org> wrote:
Could you post a sample from an Asterisk dialplan and maybe we can come up with a good way to replicate it in FS? Possibly there is a more elegant solution that does not require lots of munging. -MC
Sure:
[include] exten => 727,1,DoStuff exten => 800,1,DoOtherStuff
[default] include => include
I know it's a simple case and not really an "example" but I'm really just looking for a way for a context to just "plow through" another context looking for a match before it returns "No Route" and aborts. Not exactly elegant but sometimes it's just got to be done (I guess).
It looks like that's what transfer is supposed to do... Is there any way for me to just remove a condition on the match in [default] and then just run through another context as defined by my args to transfer before returning no route? It would be nice to be able to do multiple "includes" like so:
<extension name="include" continue="true"> <action application="transfer" data="${dialed_ext} XML include"/> </extension>
<extension name="include2" continue="true"> <action application="transfer" data="${dialed_ext} XML include2"/> </extension>
I know it's ugly... :(
-- 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
-- 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
On 10/20/08, Anthony Minessale <anthony.minessale@gmail.com> wrote:
One important thing to remember is that in FreeSWITCH the dialplan is a separate stage of a call. FS parses your dialplan in one pass and builds a "todo" list and then it hits execute state and really does the stuff.
We do have an application called execute_extension that lets you run a dialplan module from the execute state just for the purpose of executing the instruction set from a certian extension so you could use that for what you want like so:
<!--- put this extension last --> <extension name="include" continue="true"> <!-- conditions with no expression are instantly true --> <condition> <action application="execute_extension" data="${dialed_ext} XML include"/> <action application="execute_extension" data="${dialed_ext} XML include2"/> <condition/> </extension>
This would actually cause you to run through both contexts in this order during EXECUTE state. were the transfer app actually stops the EXECUTE by sending the channel back to RINGING and re-entering the dialplan stage.
Your best bet is to try to shift the paragidm in your head away from how asterisk does it =D
I know... ATM the moment I'm trying to bring FS into the organization in stages, "parallel" to Asterisk as much as possible. Once I get through this initial phase I can begin to think about how to do things the "FreeSWITCH way" (and do all of the cool stuff I think I'll be able to do). First things first, though - replicate existing functionality and make as painless as possible! -- Kristian Kielhofner http://blog.krisk.org http://www.submityoursip.com http://www.astlinux.org http://www.star2star.com
Your best bet is to try to shift the paragidm in your head away from how asterisk does it =D
I know... ATM the moment I'm trying to bring FS into the organization in stages, "parallel" to Asterisk as much as possible. Once I get through this initial phase I can begin to think about how to do things the "FreeSWITCH way" (and do all of the cool stuff I think I'll be able to do). First things first, though - replicate existing functionality and make as painless as possible!
That makes sense. Some of Asterisk configs are, by definition, nasty hacks and kludges. You can do that with FS if you really want to - or need to. Hopefully you will be able to migrate past the kludge factor in due time. :) -MC
participants (5)
-
Anthony Minessale
-
Kristian Kielhofner
-
Michael Collins
-
Michael Collins
-
Michael Jerris