Hi, what is the bast way to block destination number for certain user. Is it possible to do it in user/dir? Regards, Miha
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
On 03/10/2012 11:23 PM, Gabriel Gunderson wrote:
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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! Regards, Miha
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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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@softnet.si <mailto:miha@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@softnet.si <mailto: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 <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@freeswitch.org <mailto:consulting@freeswitch.org> > http://www.freeswitchsolutions.com > > FreeSWITCH-powered IP PBX: The CudaTel Communication Server > http://www.cudatel.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://wiki.freeswitch.org > http://www.cluecon.com > > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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
participants (4)
-
Brian Foster
-
Gabriel Gunderson
-
Miha
-
Miha Zoubek