<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Arimo'; font-size:8pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thanks for the response, I should have been clearer.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Yes, local is a profile on which all registered devices are connecting. sip.test.com is just an alias, but for some reason when calling via the local profile it doesn't ring, but instead dies with a NORMAL_TEMPORARY_FAILURE, while when dialing via the sip.test.com alias, it works just fine.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">About the condition variables, I ended up with another variable, because some users are allowed to make local calls but are actually trying to ring a international number which triggers the anti-action as the toll evaluates as true, but the destination number doesn't.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thanks again!</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Kind regards,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'exo 2';">Iskren Hadzhinedev</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br />On Thursday 22 May 2014 03:05:09 Francis wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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 style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">For the second question, you can swap the two statements like this:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><condition field="${toll_allow}" expression="local"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><condition field="${destination_number}" expression="^([0-9]{6})$"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="set" data="hangup_after_bridge=true"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="bridge" data="sofia/gateway/${default_gateway}/$1"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><anti-action application="answer"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><anti-action application="speak" data="Local calls are not allowed!"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></condition></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Which will preserve $1 for use in the condition statement without having to explicitly set it as a variable.</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Francis</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On 2014-05-22 01:11, Iskren Hadzhinedev wrote:</p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hello,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I'm having some trouble understanding a couple of things.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">First is what's the difference between:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="bridge" data="sofia/local/1000@sip.test.com"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">and</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="bridge" data="sofia/sip.test.com/1000"/> ?</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The other question:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">With these dialplan rules:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><condition field="${destination_number}" expression="^([0-9]{6})$"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><condition field="${toll_allow}" expression="local"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="set" data="hangup_after_bridge=true"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><action application="bridge" data="sofia/gateway/${default_gateway}/$1"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><anti-action application="answer"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><anti-action application="speak" data="Local calls are not allowed!"/></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></condition></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thanks!</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Kind regards,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">--</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'exo 2';">Iskren Hadzhinedev</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<pre style=" margin-top:12px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">_________________________________________________________________________</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Professional FreeSWITCH Consulting Services:</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="mailto:consulting@freeswitch.org"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">consulting@freeswitch.org</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://www.freeswitchsolutions.com"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://www.freeswitchsolutions.com</span></a></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://www.cudatel.com"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://www.cudatel.com</span></a></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">Official FreeSWITCH Sites</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://www.freeswitch.org"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://www.freeswitch.org</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://wiki.freeswitch.org"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://wiki.freeswitch.org</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://www.cluecon.com"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://www.cluecon.com</span></a></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;"><br /></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">FreeSWITCH-users mailing list</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">FreeSWITCH-users@lists.freeswitch.org</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">UNSUBSCRIBE:</span><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://lists.freeswitch.org/mailman/options/freeswitch-users</span></a></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a href="http://www.freeswitch.org"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#3b82b2;">http://www.freeswitch.org</span></a></pre>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p></body></html>