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 <
[EMAIL PROTECTED]> wrote:

> On 10/20/08, Michael Collins <[EMAIL PROTECTED]> 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
> [email protected]
> 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:[EMAIL PROTECTED] <[EMAIL PROTECTED]>
GTALK/JABBER/PAYPAL:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:[EMAIL PROTECTED] <[EMAIL PROTECTED]>
iax:[EMAIL PROTECTED]/888
googletalk:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
pstn:213-799-1400
_______________________________________________
Freeswitch-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to