[Freeswitch-users] Inline execution concept
Tim St. Pierre
fs-list at communicatefreely.net
Tue Feb 14 19:39:08 MSK 2012
Hello,
Using the inline option with a dialplan action causes that action to
occur immediately, as Freeswitch is parsing the dialplan.
Normally, Freeswitch parses the dialplan all at once and creates a sort
of "to do" list. It then changes to execute mode and actually does
everything in the list all in one go. This is different than Asterisk,
where asterisk executes things one at a time as it reads them.
Where inline is important, is if you need to set a variable that will be
referenced later on in the same chunk of code. Inline doesn't have
anything to do with variable inheritance, (that is export vs. set).
Inline just makes the variable change right away, so that as FS is
parsing the rest of your dialplan, it has access to the variables that
you are setting.
Another place that inline might be useful is if you have some sort of
trigger, ie. a CURL or database request. You may want that to fire when
freeswitch is running through the dialplan so that it can use the return
values in further decision making.
As far as including contexts, it isn't as relevant since freeswitch
parses everything, then executes.
You can use execute_exten to achieve the same result. You would create
an extension that contains your "includable" code, then use the
execute_exten action to execute that block of code somewhere else. It's
a bit like calling a function in a programming language.
You can also use transfer as a goto routine. Be aware that transfer and
execute_exten give you different results in your CDRs.
Good luck!
virendra bhati wrote:
> Hi List,
>
> I am the new guy for FreeSwitch. I am not clear what is the used of
> Inline execution.
>
> As per doing some tweak I found that Inline is used for set any
> variable for channel base like in asterisk we used double underscore(
> __ ).
>
> Am i right on this concept or not?
>
> Another question is how to include context in dialplan in XML ?
>
> I am reading FreeSwitch 1.0.6 for more details but still these
> question is not clear for me. Please help me to find out the answer of
> these questions.
> --
>
> Thanks and regards
>
> Virendra Bhati
> +91-8885268942
> Software Engineer
> E-mail-: virbhati at gmail.com <mailto:virbhati at gmail.com>
> Skype id:- virbhati2
>
> ------------------------------------------------------------------------
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list