[RESOLVED] (Newbie) Pin code before each call


#1

Hi,

I hope someone can help me here. I am a newbie playing with Asterisk, and have the following requirement. We have shared telephones in our offices, and we require that each user enters a unique PIN code BEFORE a call can be made from ANY extension. I also need this code to reflect in the CDR records so that I can see that User A made 5 calls from extension XXX and then he made 3 calls from extension YYY. Is this possible in Asterisk? The feature is currently working like this on our old Siemens PBX.

Thanks!

Thomas


#2

See: voip-info.org/wiki/index.php … thenticate

specifically the ‘a’ option.


#3

Thank you very much!


#4

We have manged to get it working by introducing this

[outgoing]
exten => _0X.,1,Authenticate(/etc/asterisk/passwords/${ACCOUNTCODE})
exten => _0X.,2,Dial(${TRUNK}/${EXTEN:1})
exten => _0X.,3,Hangup()

This will allow ALL outgoing calls to be first Authenticated. The password file contains a single digit, and the filename is equal to the CALLERIDNUMBER (callerid=Pete),found in the sip.conf file eg,

[1002]
type=friend
username=1002
secret=mypassword
host=dynamic
callerid=“Pete” <1002>
accountcode=Pete ; Users may be associated with an accountcode to ease billing
;context=reception
context=from_sip
mailbox=1002@other,1002

It works very well.
Unfortunalty if one should stand up and walk over to another phone, and try to phone from there, you must know that users “pin code” to make a call, and it does not except your “pin code”.
How can we set it up, so that I can walk to any phone, then dial my number, insert my personal “pin code” and make a call.

The Log file must record the “pin code” from any extension, and tie it up to a specific user.

Much appreciated.