I am trying to do a simple agi connection to db with the guidance from http://www.voip-info.org/wiki/view/Asterisk+AGI+php

Item 13 with ani.agi file, db and extensions.conf

13. another sample, ANI


Scenario - did callers call the Asterisks box and land on the context did, Asterisks answers the call and then execute the script ani.agi. This script will connect to mysql and see whether originators phone number(caller ID) is already in the database. If it exists, then agi.script will pass the control back to dial plan. Dial plan now will progress the call. If the caller ID does not exists, ani.agi will pass the control to the dial plan as un authenticated call.


ani.agi
#!/usr/local/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
$in = fopen("php://stdin","r");

$stdlog = fopen("/var/log/asterisk/my_agi.log", "w");


i have put the value of the callerid i called frm assume 2222 then when i do debug i got the callerid in agi but seem that ani.agi is not working cause is asking for password. From my understanding, if the callerid is in the db then it will not ask to authenticate right? anything missing here?

THanks in advance.

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to