<div dir="ltr">Thanks Stanislav, noted.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 1, 2013 at 5:00 PM, Stanislav Sinyagin <span dir="ltr">&lt;<a href="mailto:ssinyagin@yahoo.com" target="_blank">ssinyagin@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif">you can also do immediate transfer inside the condition, and perform in-place digit manipulation.<br>
here&#39;s an example, it returns the call to the same context, but it can also be a different context if needed:<br><a href="http://txlab.wordpress.com/2013/07/06/handling-e164-numbers-in-freeswitch/" target="_blank">http://txlab.wordpress.com/2013/07/06/handling-e164-numbers-in-freeswitch/</a><br>
<br><br><div><span><br></span></div><div><br></div>  <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <hr size="1">
  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Stanislav Sinyagin &lt;<a href="mailto:ssinyagin@yahoo.com" target="_blank">ssinyagin@yahoo.com</a>&gt;<div class="im"><br> <b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt; <br>
 </div><b><span style="font-weight:bold">Sent:</span></b> Tuesday,
 October 1, 2013 8:34 AM<div><div class="h5"><br> <b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] Differentiating internal/external calls<br> </div></div></font> </div><div><div class="h5"> <div>
<br><div><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif">Siri, that&#39;s right, and you can still split the logic between contexts.<br clear="none"><br clear="none">For example, in public context, do the condition matching to classify your call and set a variable, say, &quot;target_context&quot;.<br clear="none">
<br clear="none">Then at the bottom of public context, transfer to ${target_context}. Then that target context would do the actual call processing.<br clear="none"><br clear="none"><br clear="none"><div><span><br clear="none">
</span></div><div><br clear="none"></div>  <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div><div dir="ltr"> <hr size="1">
  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Siri MM &lt;<a href="mailto:sirimmfs@gmail.com" target="_blank">sirimmfs@gmail.com</a>&gt;<br clear="none"> <b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt; <br clear="none">
 <b><span style="font-weight:bold">Sent:</span></b> Tuesday, October 1, 2013 1:33 AM<br clear="none"> <b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] Differentiating internal/external calls<br clear="none">
 </font> </div> <div><br clear="none"><div><div><div dir="ltr">Hi Stanislav,<div><br clear="none"></div><div>Thanks for the reply.</div><div><br clear="none"></div><div>I am working in an open system, where the local extensions/gateways don&#39;t authenticate with Freeswitch, and
 hence I am forced to use the public context alone.</div>
<div><br clear="none"></div><div>Again, since the gateway doesn&#39;t authenticate, I am unable to use the &quot;variables&quot; defined within gateway settings.</div><div><br clear="none"></div></div><div><br clear="none">
<br clear="none"><div>
On Mon, Sep 30, 2013 at 6:15 PM, Stanislav Sinyagin <span dir="ltr">&lt;<a rel="nofollow" shape="rect" href="mailto:ssinyagin@yahoo.com" target="_blank">ssinyagin@yahoo.com</a>&gt;</span> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif">the scenario that you described is just ideal for two different contexts. Why do you want to have them in one?<br clear="none"><br clear="none">
Of course you can set a variable in an &quot;inline&quot; action in the beginning of a context, like this:<br clear="none">
<pre>&lt;action application=&quot;set&quot; data=&quot;call_direction=inbound&quot; inline=&quot;true&quot;/&gt;</pre>and later in the dialplan, use this variable in conditions.<br clear="none">Also the variable can be assigned at the SIP gateway, then incoming calls will have it automatically:<br clear="none">

<br clear="none"><pre>&lt;gateway name=&quot;gateway012&quot;&gt;
   &lt;param name=&quot;realm&quot; value=&quot;<a rel="nofollow" shape="rect" href="http://sip.voipcarrier.com/" target="_blank">sip.voipcarrier.com</a>&quot; /&gt;
   &lt;param name=&quot;username&quot; value=&quot;WBrandes&quot; /&gt;
   &lt;param name=&quot;password&quot; value=&quot;myvoiceismypassword&quot; /&gt;
   &lt;param name=&quot;register&quot; value=&quot;true&quot; /&gt;
   &lt;param name=&quot;caller-id-in-from&quot; value=&quot;true&quot; /&gt;
   &lt;param name=&quot;ping&quot; value=&quot;5&quot; /&gt;
   &lt;param name=&quot;ping-max&quot; value=&quot;3&quot; /&gt;
   &lt;param name=&quot;retry-seconds&quot; value=&quot;5&quot; /&gt;
   &lt;param name=&quot;expire-seconds&quot; value=&quot;60&quot; /&gt;
   &lt;variables&gt;
     &lt;variable name=&quot;this_is_inbound_call&quot; value=&quot;true&quot; direction=&quot;inbound&quot;/&gt;
   &lt;/variables&gt;
 &lt;/gateway&gt;</pre>direction=&quot;inbound&quot; means to apply this variable for inbound calls.<br clear="none"><br clear="none"><br clear="none"><div><span><br clear="none"></span></div><div><br clear="none"></div>
  <div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
 <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <hr size="1">  <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Siri MM &lt;<a rel="nofollow" shape="rect" href="mailto:sirimmfs@gmail.com" target="_blank">sirimmfs@gmail.com</a>&gt;<br clear="none">

 <b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a rel="nofollow" shape="rect" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>&gt; <br clear="none">
 <b><span style="font-weight:bold">Sent:</span></b> Monday, September 30, 2013 9:27 AM<br clear="none">
 <b><span style="font-weight:bold">Subject:</span></b> [Freeswitch-users] Differentiating internal/external calls<br clear="none"> </font> </div><div> <div><br clear="none"><div><div dir="ltr">Hi,<div><br clear="none"></div>
<div>Is it possible for me to have two sets of dialplans - one for
 incoming (to FS) and other for outgoing (from FS), in the same context? On receiving an incoming call, I want to run through only a subset of xmls, and give up on not hitting, and the same for outbound - is this feasible? Or any channel variable that would help me differentiate between a external call and internal call?</div>


<div><br clear="none"></div><div>Thanks!</div></div></div><br clear="none"><br clear="none"></div> </div></div> </div>  </div></div></div><br clear="none">_________________________________________________________________________<br clear="none">

Professional FreeSWITCH Consulting Services:<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br clear="none">
<br clear="none">
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br clear="none">
<a rel="nofollow" shape="rect" href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br clear="none">
<br clear="none">
Official FreeSWITCH Sites<br clear="none">
<a rel="nofollow" shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br clear="none">
<br clear="none">
FreeSWITCH-users mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br clear="none">
UNSUBSCRIBE:<a rel="nofollow" shape="rect" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br clear="none"><div>_________________________________________________________________________<br clear="none">Professional FreeSWITCH Consulting Services:<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br clear="none"><a rel="nofollow" shape="rect" href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br clear="none">
<br clear="none">FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br clear="none"><a rel="nofollow" shape="rect" href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br clear="none"><br clear="none">
Official FreeSWITCH Sites<br clear="none"><a rel="nofollow" shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none"><a rel="nofollow" shape="rect" href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br clear="none"><br clear="none">FreeSWITCH-users mailing list<br clear="none"><a rel="nofollow" shape="rect" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br clear="none">UNSUBSCRIBE:<a rel="nofollow" shape="rect" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none"></div><br clear="none"><br clear="none"></div></div> </div> </div>  </div></div></div><br><div>
_________________________________________________________________________<br clear="none">Professional FreeSWITCH Consulting Services:<br clear="none"><a shape="rect" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br clear="none">
<a shape="rect" href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br clear="none"><br clear="none">FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br clear="none">
<a shape="rect" href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br clear="none"><br clear="none">Official FreeSWITCH Sites<br clear="none"><a shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none">
<a shape="rect" href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br clear="none"><a shape="rect" href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br clear="none"><br clear="none">
FreeSWITCH-users mailing list<br clear="none"><a shape="rect" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br clear="none"><a shape="rect" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br clear="none">
UNSUBSCRIBE:<a shape="rect" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br clear="none"><a shape="rect" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br clear="none">
</div><br><br></div> </div></div></div> </div>  </div></div><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></blockquote></div><br></div>