<br><br><div class="gmail_quote">On Sun, Dec 20, 2009 at 6:39 PM, Edmar Cruz <span dir="ltr">&lt;<a href="mailto:darklion11@yahoo.com">darklion11@yahoo.com</a>&gt;</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>
     &lt;extension name=&quot;dialsample&quot;&gt;<br>
<br>
   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(8555555)$&quot;\&gt;<br>
     &lt;action application=&quot;set&quot;<br>
data=&quot;effective_caller_name=${effective_caller_id_name}&quot;/&gt;<br>
     &lt;action application=&quot;set&quot;<br>
data=&quot;effective_caller_number=${effective_caller_id_number}&quot;/&gt;<br>
     &lt;action application=&quot;set&quot; data=&quot;hang_up_after_bridge=true&quot;/&gt;<br>
     &lt;action application=&quot;bridge&quot; data=&quot;sofia/default/$<a href="mailto:1@182.138.252.12">1@182.138.252.12</a>&quot;/&gt;<br>
   &lt;/condition&gt;<br>
<br>
  &lt;/extension&gt;<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>
&lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;<br><br>For any user whom you wish to restrict to local or domestic calling only just remove the &#39;international&#39; from the list:<br>
&lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,local&quot;/&gt;<br> <br>Now when that user registers and makes calls he/she won&#39;t have &#39;international&#39; in the ${toll_allow} channel variable. Something like this in your dialplan could handle both cases:<br>
&lt;extension name=&quot;international dialing&quot;&gt;<br>  &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;international&quot;&gt;<br>    &lt;anti-action application=&quot;playfile&quot; data=&quot;misc/you-are-not-authorized.wav&quot;/&gt;<br>
    &lt;anti-action application=&quot;hangup&quot;/&gt;<br>  &lt;/condition&gt;<br>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)$&quot;&gt; &lt;!-- use whatever value works for you --&gt;<br>
    &lt;action application=&quot;bridge&quot; data=&quot;sofia/internal/$1@whatever&quot;/&gt;<br>  &lt;/condition&gt;<br><br>Now that I&#39;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>