<div dir="ltr">Hi Stanislav,<div><br></div><div>Thanks for the reply.</div><div><br></div><div>I am working in an open system, where the local extensions/gateways don't authenticate with Freeswitch, and hence I am forced to use the public context alone.</div>
<div><br></div><div>Again, since the gateway doesn't authenticate, I am unable to use the "variables" defined within gateway settings.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Sep 30, 2013 at 6:15 PM, Stanislav Sinyagin <span dir="ltr"><<a href="mailto:ssinyagin@yahoo.com" target="_blank">ssinyagin@yahoo.com</a>></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">the scenario that you described is just ideal for two different contexts. Why do you want to have them in one?<br><br>Of course you can set a variable in an "inline" action in the beginning of a context, like this:<br>
<pre><action application="set" data="call_direction=inbound" inline="true"/></pre>and later in the dialplan, use this variable in conditions.<br>Also the variable can be assigned at the SIP gateway, then incoming calls will have it automatically:<br>
<br><pre><gateway name="gateway012">
<param name="realm" value="<a href="http://sip.voipcarrier.com" target="_blank">sip.voipcarrier.com</a>" />
<param name="username" value="WBrandes" />
<param name="password" value="myvoiceismypassword" />
<param name="register" value="true" />
<param name="caller-id-in-from" value="true" />
<param name="ping" value="5" />
<param name="ping-max" value="3" />
<param name="retry-seconds" value="5" />
<param name="expire-seconds" value="60" />
<variables>
<variable name="this_is_inbound_call" value="true" direction="inbound"/>
</variables>
</gateway></pre>direction="inbound" means to apply this variable for inbound calls.<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> Siri MM <<a href="mailto:sirimmfs@gmail.com" target="_blank">sirimmfs@gmail.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help <<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>> <br> <b><span style="font-weight:bold">Sent:</span></b> Monday, September 30, 2013 9:27 AM<br>
<b><span style="font-weight:bold">Subject:</span></b> [Freeswitch-users] Differentiating internal/external calls<br> </font> </div><div class="im"> <div><br><div><div dir="ltr">Hi,<div><br></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></div><div>Thanks!</div></div></div><br><br></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>