[Freeswitch-users] blocking destination number
Gabriel Gunderson
gabe at gundy.org
Sun Mar 11 01:23:34 MSK 2012
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
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list