Virendra,<br><br>If inline execution is still confusing you then it's because you are probably having a difficult time visualizing the two steps in dialplan processing: parsing and executing.<br><br>During the parsing phase, the dialplan module is going through each extension looking at the conditions. Each time a condition matches (shows "PASS" in the FS log) it then looks inside that condition to see if there are any actions. If there are actions inside the matching condition then each action is added to a "task list" in the order they appear in the dialplan. These actions are *NOT* executed right now. They are simply added to the big "to-do list" of actions. Then, once all the parsing is done, the dialplan module goes back to the task list and starts executing each action, one at a time.<br>
<br>Does that part make sense? If not, then the following information won't help you...<br><br>The "inline" execution of an action means that the action is executed *during the parsing phase*. In other words, when the dialplan module finds a matching condition and there is an action to add to the task list, it looks to see if there is an inline="true" attribute. If there is, then the dialplan parser basically says, "Oh, I should not add this action to the task list; instead I should *execute this action RIGHT NOW* before I continue." <br>
<br>To see that for real, consider this extension:<br><font style="font-family:courier new,monospace" size="1"> <extension name="inline test"><br> <condition field="destination_number" expression="^(5599)$"><br>
<action application="log" data="INFO I'm first!"/><br> <action application="log" data="INFO Oh no you're not!" inline="true"/><br></font><font style="font-family:courier new,monospace" size="1"> <action application="log" data="INFO Bummer, dude!"/><br>
</font><font style="font-family:courier new,monospace" size="1"> </condition> <br> </extension></font><br><br>So, when I dial 5599, which debug line gets printed first? To find out, check out this <a href="http://pastebin.freeswitch.org/18406">pastebin</a>.<br>
<br>The dialplan processing starts at line #41 of the pastebin. Every log line that starts with "Dialplan:" represents the dialplan module parsing the dialplan. The interesting stuff occurs starting at line #269 - we match the condition on the extension. Line #270 is the first action from this condition to add to the task list. Now, look closely at lines #271-273. On line #271 the dialplan parser sees the action - but notice the "INLINE" there. At line #272 you see the actual log that the action is being executed. On line #273 is the actual log application's output. So, this action was not added to the task list but rather executed right there. It was "executed inline." Note that at line #274 it goes back to dialplan parsing and adding items to the task list.<br>
<br>Skip down to line #294 - there you'll see the items from the task list actually being executed. The two log applications that were not executed "inline" finally get executed there at the end. <br><br>If you really want to see how this works try adding and removing the inline="true" on the various actions in this extension. Watch the logs. You'll see that anything with inline="true" gets executed long before the items that don't have inline="true".<br>
<br>Hope this helps.<br><br>-MC<br><br><div class="gmail_quote">On Tue, Feb 14, 2012 at 9:26 PM, virendra bhati <span dir="ltr"><<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hi,<br><br>I have FS 1.0.6 "bridge" book and after reading chapters 5 and 8. Still this is very confusing concept. that's why i want to know from you guys an simple language with 2 or more example if you can reply with answer. Inline execution is very confusing <br>
</div></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">concept for me.<br></div></blockquote><br></div><br>