Setting Restrictions on Default Dialplan
Hi Sir, How can I allow international calling in the dialing plan but for select accounts only? For example i want to restrict 8555555 to call this ip address 182.138.252.12 using the default configuration.. Does this command should be put in the default.xml or in the default folder and the filename is 00_restict.xml? <extension name="dialsample"> <condition field="destination_number" expression="^(8555555)$"\> <action application="set" data="effective_caller_name=${effective_caller_id_name}"/> <action application="set" data="effective_caller_number=${effective_caller_id_number}"/> <action application="set" data="hang_up_after_bridge=true"/> <action application="bridge" data="sofia/default/$1@182.138.252.12"/> </condition> </extension> When i tried this command both of them nothing happen 8555555 can call 182.138.252.12 i want it to restrict this account for not calling 182.138.252.12.. Please help.. Thanks, Edmar -- View this message in context: http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26... Sent from the Freeswitch-users mailing list archive at Nabble.com.
On Sun, Dec 20, 2009 at 6:39 PM, Edmar Cruz <darklion11@yahoo.com> wrote:
Hi Sir,
How can I allow international calling in the dialing plan but for select accounts only?
For example i want to restrict 8555555 to call this ip address 182.138.252.12 using the default configuration.. Does this command should be put in the default.xml or in the default folder and the filename is 00_restict.xml?
<extension name="dialsample">
<condition field="destination_number" expression="^(8555555)$"\> <action application="set" data="effective_caller_name=${effective_caller_id_name}"/> <action application="set" data="effective_caller_number=${effective_caller_id_number}"/> <action application="set" data="hang_up_after_bridge=true"/> <action application="bridge" data="sofia/default/$1@182.138.252.12"/> </condition>
</extension>
When i tried this command both of them nothing happen 8555555 can call 182.138.252.12 i want it to restrict this account for not calling 182.138.252.12..
Please help..
This functionality already exists in the default dialplan and sample directory entries, assuming that you are using authorization. First off, look in 1000.xml (or any of the other sample user files) for this variable declaration: <variable name="toll_allow" value="domestic,international,local"/> For any user whom you wish to restrict to local or domestic calling only just remove the 'international' from the list: <variable name="toll_allow" value="domestic,local"/> Now when that user registers and makes calls he/she won't have 'international' in the ${toll_allow} channel variable. Something like this in your dialplan could handle both cases: <extension name="international dialing"> <condition field="${toll_allow}" expression="international"> <anti-action application="playfile" data="misc/you-are-not-authorized.wav"/> <anti-action application="hangup"/> </condition> <condition field="destination_number" expression="^(\d+)$"> <!-- use whatever value works for you --> <action application="bridge" data="sofia/internal/$1@whatever"/> </condition> Now that I've typed all that, I should go back and ask: are you using digest authorization? Or are you using an ACL to let your callers in? Anyway, hopefully the above example will give you some ideas. -MC
Thanks, Edmar -- View this message in context: http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26... Sent from the Freeswitch-users mailing list archive at Nabble.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
Not actually for now... I commented first the ACL restrictions... Edmar Cruz wrote:
Hi Sir,
How can I allow international calling in the dialing plan but for select accounts only?
For example i want to restrict 8555555 to call this ip address 182.138.252.12 using the default configuration.. Does this command should be put in the default.xml or in the default folder and the filename is 00_restict.xml?
<extension name="dialsample">
<condition field="destination_number" expression="^(8555555)$"\> <action application="set" data="effective_caller_name=${effective_caller_id_name}"/> <action application="set" data="effective_caller_number=${effective_caller_id_number}"/> <action application="set" data="hang_up_after_bridge=true"/> <action application="bridge" data="sofia/default/$1@182.138.252.12"/> </condition>
</extension>
When i tried this command both of them nothing happen 8555555 can call 182.138.252.12 i want it to restrict this account for not calling 182.138.252.12..
Please help..
Thanks, Edmar
-- View this message in context: http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26... Sent from the Freeswitch-users mailing list archive at Nabble.com.
Where should I write this line <extension name="international dialing"> <condition field="${toll_allow}" expression="international"> <anti-action application="playfile" data="misc/you-are-not-authorized.wav"/> <anti-action application="hangup"/> </condition> <condition field="destination_number" expression="^(\d+)$"> <!-- use whatever value works for you --> <action application="bridge" data="sofia/internal/$1@whatever"/> </condition> on the default.xml or in the default category? Edmar Cruz wrote:
Hi Sir,
How can I allow international calling in the dialing plan but for select accounts only?
For example i want to restrict 8555555 to call this ip address 182.138.252.12 using the default configuration.. Does this command should be put in the default.xml or in the default folder and the filename is 00_restict.xml?
<extension name="dialsample">
<condition field="destination_number" expression="^(8555555)$"\> <action application="set" data="effective_caller_name=${effective_caller_id_name}"/> <action application="set" data="effective_caller_number=${effective_caller_id_number}"/> <action application="set" data="hang_up_after_bridge=true"/> <action application="bridge" data="sofia/default/$1@182.138.252.12"/> </condition>
</extension>
When i tried this command both of them nothing happen 8555555 can call 182.138.252.12 i want it to restrict this account for not calling 182.138.252.12..
Please help..
Thanks, Edmar
-- View this message in context: http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26... Sent from the Freeswitch-users mailing list archive at Nabble.com.
On Sun, Dec 20, 2009 at 10:31 PM, Edmar Cruz <darklion11@yahoo.com> wrote:
Where should I write this line
<extension name="international dialing"> <condition field="${toll_allow}" expression="international"> <anti-action application="playfile" data="misc/you-are-not-authorized.wav"/> <anti-action application="hangup"/> </condition> <condition field="destination_number" expression="^(\d+)$"> <!-- use whatever value works for you --> <action application="bridge" data="sofia/internal/$1@whatever"/> </condition>
on the default.xml or in the default category?
You can put it in default.xml or in an xml file in conf/dialplan/default/ -MC
participants (2)
-
Edmar Cruz
-
Michael Collins