On Fri, Mar 9, 2012 at 7:37 AM, Miha Zoubek <miha@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