<br><br><div class="gmail_quote">On Sun, Dec 20, 2009 at 6:39 PM, Edmar Cruz <span dir="ltr"><<a href="mailto:darklion11@yahoo.com">darklion11@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Sir,<br>
<br>
How can I allow international calling in the dialing plan but for<br>
select accounts only?<br>
<br>
For example i want to restrict 8555555 to call this ip address<br>
182.138.252.12 using the default configuration.. Does this command should be<br>
put in the default.xml or in the default folder and the filename is<br>
00_restict.xml?<br>
<br>
<extension name="dialsample"><br>
<br>
<condition field="destination_number" expression="^(8555555)$"\><br>
<action application="set"<br>
data="effective_caller_name=${effective_caller_id_name}"/><br>
<action application="set"<br>
data="effective_caller_number=${effective_caller_id_number}"/><br>
<action application="set" data="hang_up_after_bridge=true"/><br>
<action application="bridge" data="sofia/default/$<a href="mailto:1@182.138.252.12">1@182.138.252.12</a>"/><br>
</condition><br>
<br>
</extension><br>
<br>
When i tried this command both of them nothing happen 8555555 can call<br>
182.138.252.12 i want it to restrict this account for not calling<br>
182.138.252.12..<br>
<br>
Please help..<br></blockquote><div><br>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:<br>
<variable name="toll_allow" value="domestic,international,local"/><br><br>For any user whom you wish to restrict to local or domestic calling only just remove the 'international' from the list:<br>
<variable name="toll_allow" value="domestic,local"/><br> <br>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:<br>
<extension name="international dialing"><br> <condition field="${toll_allow}" expression="international"><br> <anti-action application="playfile" data="misc/you-are-not-authorized.wav"/><br>
<anti-action application="hangup"/><br> </condition><br> <condition field="destination_number" expression="^(\d+)$"> <!-- use whatever value works for you --><br>
<action application="bridge" data="sofia/internal/$1@whatever"/><br> </condition><br><br>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.<br>
-MC<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks,<br>
Edmar<br>
--<br>
View this message in context: <a href="http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26868725.html" target="_blank">http://old.nabble.com/Setting-Restrictions-on-Default-Dialplan-tp26868725p26868725.html</a><br>
Sent from the Freeswitch-users mailing list archive at Nabble.com.<br>
<br>
<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>
</blockquote></div><br>