<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Export transfers the variable to the B-leg whenever the channel is bridged, it doesnt affect how the dialplan work, conditions are still checked before executing anything.<div><br></div><div>Math</div><div><div><br><div><div>On 3-Jun-09, at 1:39 PM, Milena wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Woody :) <br>You cannot use the variable on another extension, however you could just merge both extensions' conditions.<br><br>then your only problem would be that you're not exporting the value, after set, you gotta export, look at this example (a little extract from dialplan/default.xml):<br> <br><font size="1"><span style="font-family: courier new,monospace;">&nbsp;&lt;extension name="Local_Extension"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(10[01][0-9])$"></span><br style="font-family: courier new,monospace;"> <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="dialed_extension=$1"/></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="export" data="dialed_extension=$1"/></span><br style="font-family: courier new,monospace;"> <span style="font-family: courier new,monospace;">&nbsp;&nbsp; &lt;/condition><br><br style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp; &lt;condition field="destination_number" expression="^${caller_id_number}$"></span><br style="font-family: courier new,monospace;"> <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="voicemail_authorized=${sip_authorized}"$</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="answer"/></span><br style="font-family: courier new,monospace;"> <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="1000"/></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="voicemail" data="check default ${domain_name} ${dialed_extension}"/><br> ...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;anti-action application="bridge" data="user/${dialed_extension}@${domain_name}"/><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition><br>&nbsp;&nbsp;&nbsp; &lt;/extension><br></span></font><br><br><br><div class="gmail_quote"> 2009/6/3 Jason White <span dir="ltr">&lt;<a href="mailto:jason@jasonjgw.net">jason@jasonjgw.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="im">Woody Dickson &lt;<a href="mailto:woodydickson@gmail.com">woodydickson@gmail.com</a>> wrote:<br> > I am getting a strange problem in my dialplan.<br> ><br> > After doing "SET", I want to use it in the next condition field. &nbsp;But then<br> > the value is not being set properly.<br> <br> </div>When parsing the dial plan, FreeSWITCH tests all of the conditions, then<br> builds a linked list of actions to execute. Once this is done, the actions are<br> executed, in order.<br> <br> This is why you can't simply set a variable in one extension and test it in<br> the condition of a later extension.<br> <div><div></div><div class="h5"><br> <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> </div></div></blockquote></div><br> _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>