Greetings,
Thirdlane newbie here but Asterisk expert. I'm trying to have international calling restricted in outbound routes while having Canada/USA numbers unrestricted but the parsing of the contexts by Thirdlane is, in my opinion, not in the right order. Since I have a _NXXNXXXXXX extension in Unrestricted, I can't filter NPA/NXX for the other international NANP countries that should be blocked (Bahamas, Turks and Caicos islands, etc...) in the restricted context. Is there an easy way to get this done with Thirdlane?
Here's how I would have it done in Asterisk directly (assuming users only have to dial 10 digits for NANP numbers):
[outgoing-thirdlane]
include => outgoing-restricted-thirdlane
include => outgoing-unrestricted-thirdlane
[outgoing-restricted-thirdlane]
exten => _011.,1,Hangup()
exten => _242NXXXXXX,1,Hangup();Bahamas
exten => _649NXXXXXX,1,Hangup();Turks and Caicos islands
other countries NPA
[outgoing-unrestricted-thirdlane]
exten => _NXXNXXXXXX,1,Dial(trunkblabla)
First check for blocked extensions then process with unrestricted extensions.
Thank you.
another option is to clone
another option is to clone your outbound dialing script and weave in an Authenticate() call to password challenge the call. I do something similar for international calls. This, in my case, is not focused as much for employees making calls from their phones as much as it is to minimize the damage if and when their phone gets hacked and tricked into giving out its authentication string allowing a remote user to register as their device. Even if they register they are still shit out of luck as they wont know this password to complete the call
Thanks both for your
Thanks both for your suggestions. I really wanted to keep the 'User can/can't call restricted number feature' from the GUI intact so I ended up creating exclusions extensions based on those International countries using the NANP and not creating anything custom. Since we allow US/Canada by default we just needed to restrict international/411 per extension. It's very ugly if you ask me but it works.
I tackled this problem a while back but used a different approach. What I did was create a small database containing all of the NANP area codes and seperated them into categories like USA, Canada, Caribbean, etc. Any non-nanp numbers were considered international calls. Then I created customer permissions for each category, that way some customers can call a category while others can't. Then I whipped up a PERL fast agi script to process the call. If the call was permitted according to the script, then the call went through. If not, then a message was played to the customer and the call was hung up. It may sound complicated, but actually it was pretty straightforward.
Regards;
FSD