[asterisk-users] Prompt for a PIN number to make long distance
call?
Yossi Ben Hagai
yossibh at gmail.com
Sat Apr 7 22:41:51 MST 2007
You can set up a simple mysql table with PIN-users this makes it more
extensible and you can create a simple web interface to change to pins/add
users.
after you have set up the table just use a simple IVR construct to prompt
for the PIN, fetch it from the table and authenticate it - something like
this (wrote it on my notepad so check the syntax):
exten => _XXXX,1,Noop
exten => _XXXX,2,MYSQL(Connect connid localhost changeme changeme changeme)
exten => _XXXX,3,MYSQL(Query resultid ${connid} SELECT\ pin\ from\
user_pin_table\ where\ pin=${EXTEN})
exten => _XXXX,4,MYSQL(Fetch fetchid ${resultid} pin)
exten => _XXXX,5,Authenticate(${pin})
if the auth is okay, you can fetch the username for that PIN using
Set(CDR(accountcode)=fetched_user)
Joss.
On 4/8/07, J French <hikenboots at gmail.com> wrote:
>
> I need to authenticate users to make long distance calls. Basically,when
> the user dials a long distance dialplan pattern, I want to prompt for his
> pin and look it up against a table of pins:usernames in a file. If it
> exists, I'll use the username in the cdr accountcode and permit the call.
> Authenticate() looked very promising nut I couldn't get the ma options to
> work. Any help is appreciated. Honestly, I'm not even sure how to read an
> external file and parse it from asterisk.
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com <http://easynews.com/>--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070407/4570d988/attachment.htm
More information about the asterisk-users
mailing list