[Freeswitch-users] blocking destination number

Miha miha at softnet.si
Mon Mar 19 16:33:29 MSK 2012


On 3/16/2012 5:58 PM, Brian Foster wrote:
>
> 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.
>
> -BDF
>
> On Mar 16, 2012 5:21 AM, "Miha" <miha at softnet.si 
> <mailto:miha at softnet.si>> wrote:
>
>     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
>     <mailto: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 <http://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 <mailto: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
>     <mailto: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
>     >
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto: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
>     <mailto: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
>
>
>
> _________________________________________________________________________
> 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
Thank you Brian!

Regards,
Miha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120319/bae5d5db/attachment.html 


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