<p>The toll_allow variable.would be defined in the actual user xml file located in /usr/local/freeswitch/conf/directory. Then you would evaluate that variable in the dialplan that would end up making the bridge to your gateway. </p>

<p>-BDF</p>
<div class="gmail_quote">On Mar 16, 2012 5:21 AM, &quot;Miha&quot; &lt;<a href="mailto:miha@softnet.si">miha@softnet.si</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi @Gabriel,<br>
<br>
I was looking on wiki how to define new xml or document where I will<br>
have my restricted numbers.<br>
Where are domestic,international,local defined?<br>
<br>
Thanks!<br>
Miha<br>
<br>
On 3/10/2012 11:23 PM, Gabriel Gunderson wrote:<br>
&gt; On Fri, Mar 9, 2012 at 7:37 AM, Miha Zoubek&lt;<a href="mailto:miha@softnet.si">miha@softnet.si</a>&gt;  wrote:<br>
&gt;&gt; what is the bast way to block destination number for certain user.<br>
&gt;&gt; Is it possible to do it in user/dir?<br>
&gt; Ultimately, it would be a dialplan configuration, but you could set<br>
&gt; the variable that you match in the directory. See the example of<br>
&gt; &#39;toll_allow&#39; in the default FreeSWITCH configuration...<br>
&gt;<br>
&gt;<br>
&gt; This is set on a per-user basis in the DIRECTORY:<br>
&gt;<br>
&gt; &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; But it&#39;s considered while evaluating the DIALPLAN:<br>
&gt;<br>
&gt; &lt;extension name=&quot;<a href="http://local.example.com" target="_blank">local.example.com</a>&quot;&gt;<br>
&gt;    &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;local&quot;/&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{7})$&quot;&gt;<br>
&gt;      &lt;action application=&quot;set&quot;<br>
&gt; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
&gt;      &lt;action application=&quot;set&quot;<br>
&gt; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>
&gt;      &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;sofia/gateway/${default_gateway}/1${default_areacode}$1&quot;/&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; You could easily do something similar by having a list of numbers that<br>
&gt; they can&#39;t call listed in the directory (maybe something like<br>
&gt; &#39;restricted_numbers&#39;) and check to make sure the destination doesn&#39;t<br>
&gt; match it in the dialplan.<br>
&gt;<br>
&gt; Good luck!<br>
&gt;<br>
&gt;<br>
&gt; Gabe<br>
&gt;<br>
&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>