[Freeswitch-users] blocking destination number

Miha miha at softnet.si
Fri Mar 16 12:20:08 MSK 2012


Hi @Gabriel,

I was looking on wiki how to define new xml or document where I will 
have my restricted numbers.
Where are domestic,international,local defined?

Thanks!
Miha

On 3/10/2012 11:23 PM, Gabriel Gunderson wrote:
> On Fri, Mar 9, 2012 at 7:37 AM, Miha Zoubek<miha at softnet.si>  wrote:
>> what is the bast way to block destination number for certain user.
>> Is it possible to do it in user/dir?
> Ultimately, it would be a dialplan configuration, but you could set
> the variable that you match in the directory. See the example of
> 'toll_allow' in the default FreeSWITCH configuration...
>
>
> This is set on a per-user basis in the DIRECTORY:
>
> <variable name="toll_allow" value="domestic,international,local"/>
>
>
>
> But it's considered while evaluating the DIALPLAN:
>
> <extension name="local.example.com">
>    <condition field="${toll_allow}" expression="local"/>
>    <condition field="destination_number" expression="^(\d{7})$">
>      <action application="set"
> data="effective_caller_id_number=${outbound_caller_id_number}"/>
>      <action application="set"
> data="effective_caller_id_name=${outbound_caller_id_name}"/>
>      <action application="bridge"
> data="sofia/gateway/${default_gateway}/1${default_areacode}$1"/>
>    </condition>
> </extension>
>
>
>
> You could easily do something similar by having a list of numbers that
> they can't call listed in the directory (maybe something like
> 'restricted_numbers') and check to make sure the destination doesn't
> match it in the dialplan.
>
> Good luck!
>
>
> Gabe
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list