[Freeswitch-users] Differentiating internal/external calls
Stanislav Sinyagin
ssinyagin at yahoo.com
Mon Sep 30 12:15:57 MSD 2013
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 at gmail.com>
To: FreeSWITCH Users Help <FreeSWITCH-users at 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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130930/281d48f5/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list