Brief: Asterisk Call Results
Asterisk 13
PHP 5.4
Simple agi script using PHP to output call results to two MySQL tables, each table on different MySQL servers, one table showing the Status by tailing the “messages” log file, looking for the string “#########@DID” of original number “Set: number=###########”
and the other MySQL Table will have notes on the results by Set: customerid=078620.
If the call results does not return “#########@DID” then the .call file gets rescheduled to be called 30 minutes later. The rescheduled .call file does an update to the MySQL record of the first MySQL record.
MySQL record to include: number, results, (asterisk)DIALSTATUS, date
Call File example
/var/spool/asterisk/[login to view URL]
Channel: SIP/voip_sip/########
MaxRetries: 3
RetryTime: 3600
WaitTime: 7
Context: *******
CallerID: ########## <Ported_(078620)>
Extension: 1
Priority: 1
Set: agi=../ported/[login to view URL]
Set: retries=1
Set: number=###########
Set: customerid=078620