Dialplan conditions for limitations
Hi, I have 3 extensions (1001, 1002, 1003) and i want to limit some calls written below *Ext Can Call Cant't Call* 1001 1002,1003 1002 1001 1003 1003 1001 1002 I wrote condition below; <extension name="Local_Extension"> <condition regex="any"> <regex field="destination_number" expression="^(1001)$"/> <regex field="caller_id_number" expression="^(1001)$"/> ....... <action application="bridge" data="user/${dialed_extension}@ ${domain_name}"/> <!-- To test anti-action --> <anti-action application="answer"/> <anti-action application="sleep" data="1000"/> <anti-action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/> In this case 1002 and 1003 can call 1001, and can't call each other, but when i want to call 1002 or 1003 from 1001, on 1001's screen i see a incoming call from others. How can i solve this case. Thanks.
I have solved it by adding an extension <extension name="declined_calls" break="on-true"> <condition field="destination_number" expression="^(100[23])$"/> <condition field="caller_id_number" expression="^(100[23])$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/> </condition> </extension> and local extension is standart but condition is <extension name="Local_Extension"> <condition field="destination_number" expression="^(100[1-3])$"> Thanks. 2017-03-24 15:24 GMT+03:00 Yücel ALTUNAY <is.yaltunay@gmail.com>:
Hi, I have 3 extensions (1001, 1002, 1003) and i want to limit some calls written below
*Ext Can Call Cant't Call* 1001 1002,1003 1002 1001 1003 1003 1001 1002
I wrote condition below;
<extension name="Local_Extension"> <condition regex="any"> <regex field="destination_number" expression="^(1001)$"/> <regex field="caller_id_number" expression="^(1001)$"/> ....... <action application="bridge" data="user/${dialed_extension} @${domain_name}"/> <!-- To test anti-action --> <anti-action application="answer"/> <anti-action application="sleep" data="1000"/> <anti-action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
In this case 1002 and 1003 can call 1001, and can't call each other, but when i want to call 1002 or 1003 from 1001, on 1001's screen i see a incoming call from others.
How can i solve this case.
Thanks.
Use toll like variables. On Fri, Mar 24, 2017 at 8:24 AM, Yücel ALTUNAY <is.yaltunay@gmail.com> wrote:
Hi, I have 3 extensions (1001, 1002, 1003) and i want to limit some calls written below
*Ext Can Call Cant't Call* 1001 1002,1003 1002 1001 1003 1003 1001 1002
I wrote condition below;
<extension name="Local_Extension"> <condition regex="any"> <regex field="destination_number" expression="^(1001)$"/> <regex field="caller_id_number" expression="^(1001)$"/> ....... <action application="bridge" data="user/${dialed_extension} @${domain_name}"/> <!-- To test anti-action --> <anti-action application="answer"/> <anti-action application="sleep" data="1000"/> <anti-action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
In this case 1002 and 1003 can call 1001, and can't call each other, but when i want to call 1002 or 1003 from 1001, on 1001's screen i see a incoming call from others.
How can i solve this case.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
participants (2)
-
Luis Jimenez
-
Yücel ALTUNAY