<div dir="ltr">Tim, that's an excellent description. Can you please find/add/update that on the wiki?<div>It would be great if most answers on this mailing list to explain something were links to the wiki. Or even better if the wiki was so well organized and explanatory that they wouldn't even need to ask.</div>
<div><br clear="all"><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small">-Avi</span></span></div>
<br><br><div class="gmail_quote">On Tue, Feb 14, 2012 at 6:39 PM, Tim St. Pierre <span dir="ltr"><<a href="mailto:fs-list@communicatefreely.net">fs-list@communicatefreely.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Using the inline option with a dialplan action causes that action to<br>
occur immediately, as Freeswitch is parsing the dialplan.<br>
<br>
Normally, Freeswitch parses the dialplan all at once and creates a sort<br>
of "to do" list. It then changes to execute mode and actually does<br>
everything in the list all in one go. This is different than Asterisk,<br>
where asterisk executes things one at a time as it reads them.<br>
<br>
Where inline is important, is if you need to set a variable that will be<br>
referenced later on in the same chunk of code. Inline doesn't have<br>
anything to do with variable inheritance, (that is export vs. set).<br>
Inline just makes the variable change right away, so that as FS is<br>
parsing the rest of your dialplan, it has access to the variables that<br>
you are setting.<br>
<br>
Another place that inline might be useful is if you have some sort of<br>
trigger, ie. a CURL or database request. You may want that to fire when<br>
freeswitch is running through the dialplan so that it can use the return<br>
values in further decision making.<br>
<br>
As far as including contexts, it isn't as relevant since freeswitch<br>
parses everything, then executes.<br>
<br>
You can use execute_exten to achieve the same result. You would create<br>
an extension that contains your "includable" code, then use the<br>
execute_exten action to execute that block of code somewhere else. It's<br>
a bit like calling a function in a programming language.<br>
<br>
You can also use transfer as a goto routine. Be aware that transfer and<br>
execute_exten give you different results in your CDRs.<br>
<br>
Good luck!<br>
<br>
<br>
<br>
virendra bhati wrote:<br>
> Hi List,<br>
><br>
> I am the new guy for FreeSwitch. I am not clear what is the used of<br>
> Inline execution.<br>
><br>
> As per doing some tweak I found that Inline is used for set any<br>
> variable for channel base like in asterisk we used double underscore(<br>
> __ ).<br>
><br>
> Am i right on this concept or not?<br>
><br>
> Another question is how to include context in dialplan in XML ?<br>
><br>
> I am reading FreeSwitch 1.0.6 for more details but still these<br>
> question is not clear for me. Please help me to find out the answer of<br>
> these questions.<br>
> --<br>
><br>
> Thanks and regards<br>
><br>
> Virendra Bhati<br>
> <a href="tel:%2B91-8885268942" value="+918885268942">+91-8885268942</a><br>
> Software Engineer<br>
> E-mail-: <a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a> <mailto:<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>><br>
> Skype id:- virbhati2<br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div>