OK I want to use a perl script to authenticate username/password combinations for SIP phones using an customer account managment database.
I’m thinking that I should use the extensions.conf to call the scripts that I need to write, but I’m not quite sure where to begin…
When the phone first connects to the Asterisk server I get the following error message :
May 31 03:52:28 NOTICE: chan_sip.c:10886 handle_request_register: Registration from ‘sip:email@example.com’ failed for ‘126.96.36.199’ - Username/auth name mismatch
So obviously there is nothing in my extensions.conf that handles the initial registration. My question really is this, what is the name of the event that gets generated when a SIP phone first connects to the SIP server, is it the Answer event? Do I need to include something like :
exten => 711,1,Answer()
exten => 711,2,AGI(regestrationScript.agi)
where regestrationScript.agi is the script that authenticates the username and password stored on the SIP phone.