<div>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.</div>
<div>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):</div>
<div>exten => _XXXX,1,Noop<br>exten => _XXXX,2,MYSQL(Connect connid localhost changeme changeme changeme)<br>exten => _XXXX,3,MYSQL(Query resultid ${connid} SELECT\ pin\ from\ user_pin_table\ where\ pin=${EXTEN})
<br>exten => _XXXX,4,MYSQL(Fetch fetchid ${resultid} pin)<br>exten => _XXXX,5,Authenticate(${pin})</div>
<div> </div>
<div>if the auth is okay, you can fetch the username for that PIN using Set(CDR(accountcode)=fetched_user)</div>
<div> </div>
<div>Joss.<br><br> </div>
<div><span class="gmail_quote">On 4/8/07, <b class="gmail_sendername">J French</b> <<a href="mailto:hikenboots@gmail.com">hikenboots@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">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.
<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://easynews.com/" target="_blank">Easynews.com</a> --<br><br>
asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br><br></blockquote></div><br>