Thanks Stanislav, noted. On Tue, Oct 1, 2013 at 5:00 PM, Stanislav Sinyagin <ssinyagin@yahoo.com>wrote:
you can also do immediate transfer inside the condition, and perform in-place digit manipulation. here's an example, it returns the call to the same context, but it can also be a different context if needed: http://txlab.wordpress.com/2013/07/06/handling-e164-numbers-in-freeswitch/
------------------------------ *From:* Stanislav Sinyagin <ssinyagin@yahoo.com>
*To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, October 1, 2013 8:34 AM
*Subject:* Re: [Freeswitch-users] Differentiating internal/external calls
Siri, that's right, and you can still split the logic between contexts.
For example, in public context, do the condition matching to classify your call and set a variable, say, "target_context".
Then at the bottom of public context, transfer to ${target_context}. Then that target context would do the actual call processing.
------------------------------ *From:* Siri MM <sirimmfs@gmail.com> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, October 1, 2013 1:33 AM *Subject:* Re: [Freeswitch-users] Differentiating internal/external calls
Hi Stanislav,
Thanks for the reply.
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.
Again, since the gateway doesn't authenticate, I am unable to use the "variables" defined within gateway settings.
On Mon, Sep 30, 2013 at 6:15 PM, Stanislav Sinyagin <ssinyagin@yahoo.com>wrote:
the scenario that you described is just ideal for two different contexts. Why do you want to have them in one?
Of course you can set a variable in an "inline" action in the beginning of a context, like this:
<action application="set" data="call_direction=inbound" inline="true"/>
and later in the dialplan, use this variable in conditions. Also the variable can be assigned at the SIP gateway, then incoming calls will have it automatically:
<gateway name="gateway012"> <param name="realm" value="sip.voipcarrier.com" /> <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>
direction="inbound" means to apply this variable for inbound calls.
------------------------------ *From:* Siri MM <sirimmfs@gmail.com> *To:* FreeSWITCH Users Help <FreeSWITCH-users@lists.freeswitch.org> *Sent:* Monday, September 30, 2013 9:27 AM *Subject:* [Freeswitch-users] Differentiating internal/external calls
Hi,
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?
Thanks!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org