• Welcome to SAIL Community Supported PBX . Please login or sign up.
 

Class of Service - block international calls but allow a specific country

Started by efga, April 01, 2019, 03:30:09 PM

Previous topic - Next topic

efga

Hi,

I created a class of service to bar international calls _00XXXX.

Now I need to allow some extensions to call Ireland but creating another class of service _00353X and not applying it to the relevant extensions doesn't have the desired effect of allowing those calls.

I assume since the dialled number matches the international bar asterisk isn't looking any further and thus doesn't allow the number to be dialled even though there is a closer match for Ireland numbers?

Can anyone think of a way to block international calls but allow calls to a specific country - Ireland (00353) in my case?

Thanks

sysadmin

Class of service works before anything else.   It is the first eval we do in the dialplan, before outbound routing ever takes place, so if you block all international calls in CoS then that's it I'm afraid.   The call will be killed right there.  CoS works on an extension basis, it's premise is that you can use it to stop certain extensions doing things or, sometimes stop ALL extensions from doing things (e.g. premium rate numbers).  But the point is it is extension based, quite the opposite of Routes which are dialplan based.

If you want to allow international outbound to just some countries then you can put them into your route, i.e.

_00353XXXX.   _0022XXXXX.   _0037XXXXXXX.

Don't include _00XXXXXXX. in your route.  If it isn't there then nothing can route on it.   This route above will ONLY allow international calls to the three country codes listed.

Hope this helps 


efga

@sysadmin Thank you for confirming how the implementation works.