<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, "Miha" <<a href="mailto:miha@softnet.si">miha@softnet.si</a>> 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>
> On Fri, Mar 9, 2012 at 7:37 AM, Miha Zoubek<<a href="mailto:miha@softnet.si">miha@softnet.si</a>> wrote:<br>
>> what is the bast way to block destination number for certain user.<br>
>> Is it possible to do it in user/dir?<br>
> Ultimately, it would be a dialplan configuration, but you could set<br>
> the variable that you match in the directory. See the example of<br>
> 'toll_allow' in the default FreeSWITCH configuration...<br>
><br>
><br>
> This is set on a per-user basis in the DIRECTORY:<br>
><br>
> <variable name="toll_allow" value="domestic,international,local"/><br>
><br>
><br>
><br>
> But it's considered while evaluating the DIALPLAN:<br>
><br>
> <extension name="<a href="http://local.example.com" target="_blank">local.example.com</a>"><br>
> <condition field="${toll_allow}" expression="local"/><br>
> <condition field="destination_number" expression="^(\d{7})$"><br>
> <action application="set"<br>
> data="effective_caller_id_number=${outbound_caller_id_number}"/><br>
> <action application="set"<br>
> data="effective_caller_id_name=${outbound_caller_id_name}"/><br>
> <action application="bridge"<br>
> data="sofia/gateway/${default_gateway}/1${default_areacode}$1"/><br>
> </condition><br>
> </extension><br>
><br>
><br>
><br>
> You could easily do something similar by having a list of numbers that<br>
> they can't call listed in the directory (maybe something like<br>
> 'restricted_numbers') and check to make sure the destination doesn't<br>
> match it in the dialplan.<br>
><br>
> Good luck!<br>
><br>
><br>
> Gabe<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>
><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>