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... :(

--



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