I am learning agi scripting using php. I m using phpagi 2.x on asterisk 1.2. I hve written a simple script that reads out the callerid using flite. My problem is that I seems the script is not getting the callerID. <br><br>
Bellow is the script<br><br>_________________<br>#!/usr/bin/php -q<br> <?php<br> /**<br> * @package phpAGI_examples<br> * @version 2.0<br> */<br> <br> set_time_limit(30);<br> require('phpagi.php');<br>
error_reporting(E_ALL);<br> <br> $agi = new AGI();<br> $agi->answer();<br> <br> $cid = $agi->parse_callerid();<br> $agi->exec("Flite","\"Hello, {$cid['name']}.\"");<br>
<br> $agi->exec("flite","\"Goodbye\"");<br> $agi->hangup();<br> ?><br><br>___________________ <br clear="all">and below is my agi debug output<br><br><br> -- Launched AGI Script /var/lib/asterisk/agi-bin/hints.php<br>
AGI Tx >> agi_request: hints.php<br>AGI Tx >> agi_channel: SIP/1215-e5b8<br>AGI Tx >> agi_language: en<br>AGI Tx >> agi_type: SIP<br>AGI Tx >> agi_uniqueid: 1251926037.3<br>AGI Tx >> agi_callerid: 1215<br>
AGI Tx >> agi_calleridname: device<br>AGI Tx >> agi_callingpres: 0<br>AGI Tx >> agi_callingani2: 0<br>AGI Tx >> agi_callingtns: 0<br>AGI Tx >> agi_dnid: 1220<br>AGI Tx >> agi_rdnis: unknown<br>
AGI Tx >> agi_context: privileged<br>AGI Tx >> agi_extension: 1220<br>AGI Tx >> agi_priority: 2<br>AGI Tx >> agi_enhanced: 0.0<br>AGI Tx >> agi_accountcode: <br>AGI Tx >> AGI Rx << EXEC Flite "Hello, ."<br>
-- AGI Script Executing Application: (Flite) Options: (Hello, .)<br> -- Playing '/tmp/flite_buf_VTgzTg' (language 'en')<br><br><br>As you can see, the callerID is not palyed out. What could I be doing wrong?<br>
-- <br>Best Regards,<br>James Mutuku Ndeti<br>Agile Systems Limited<br>+254722490994<br><a href="http://www.agile.co.ke">www.agile.co.ke</a><br><a href="http://mutuku.wordpress.com">mutuku.wordpress.com</a><br><br>Has your organization implemented a customer relationship management (CRM)system? visit <a href="http://www.agile.co.ke/crm.php">http://www.agile.co.ke/crm.php</a> and find out how our CRM can help you achieve better customer satisfaction and sales<br>