<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>If my understanding is correct(TM), the first line is attempting to dial 1000@sip.test.com via a profile called 'local', whereas the second line is attempting to dial 1000 via a profile called sip.test.com.</p>
<p>&nbsp;</p>
<p>For the second question, you can swap the two statements like this:</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;condition field="${toll_allow}" expression="local"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;condition field="${destination_number}" expression="^([0-9]{6})$"&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="set" data="hangup_after_bridge=true"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="bridge" data="sofia/gateway/${default_gateway}/$1"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;anti-action application="answer"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;anti-action application="speak" data="Local calls are not allowed!"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;/condition&gt;</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<p>Which will preserve $1 for use in the condition statement without having to explicitly set it as a variable.</p>
<p>Francis</p>
<p>&nbsp;</p>
<div>&nbsp;</div>
<p>On 2014-05-22 01:11, Iskren Hadzhinedev wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored -->
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Hello,</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">I'm having some trouble understanding a couple of things.</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">First is what's the difference between:</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="bridge" data="sofia/local/1000@sip.test.com"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">and</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="bridge" data="sofia/sip.test.com/1000"/&gt; ?</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">The other question:</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">With these dialplan rules:</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;condition field="${destination_number}" expression="^([0-9]{6})$"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;condition field="${toll_allow}" expression="local"&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="set" data="hangup_after_bridge=true"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;action application="bridge" data="sofia/gateway/${default_gateway}/$1"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;anti-action application="answer"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;anti-action application="speak" data="Local calls are not allowed!"/&gt;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">&lt;/condition&gt;</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">The variable $1 doesn't get expanded to the captured expression. Is it possible to retain it somehow without setting a temporary variable?</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Thanks!</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Kind regards,</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">--</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;"><span style="font-family: 'exo 2';">Iskren Hadzhinedev</span></p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;">&nbsp;</p>
<!-- html ignored --><br />
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
</body></html>