Passwords for long distance with reporting


#1

Is there any way I can require a password for users to dail external phone numbers except those begining with a certain few area codes that I explicitly allow?

If this is possible, is there away I can view the number and duration of calls per password (user) to these “long distance” area codes?


#2

sure. For your outgoing call context,

exten => _1123NXXXXXX,1,Dial(trunk/${EXTEN})
replace 123 with your area code, repeat as needed

for everything else (_1NXXNXXXXXX), setup a script that first authenticates them (perhaps using Authenticate, VMAuthenticate or any one of a few other scripts available on the voip-info.org Wiki)
sets their CDR accountcode to their password (as above), then dials.

Your CDR records will contain records of the calls, and you can identify them based on accountcode.


#3

Excellent, thank you. I am going to have to read up on scripting. Thanks!


#4

FYI- the ‘script’ you want is the dialplan. Wiki for asterisk config extensions.conf; asterisk variables, and (i think) asterisk dialplan patterns. Also asterisk cmd authenticate.