Dear friends,<br><br>I am having problem with running a sample php and I can't figure out why. I can run the sample.php using CLI but when I run it inside the dialplan it does not work. Can someone please suggest the config problem that I may have made? <br>
<br><br>dommy:/var/lib/asterisk/agi-bin# php sample.php<br> #!/usr/bin/php5 -q<br><br>VERBOSE "Here we go!" 2<br><br>VERBOSE "Call from - Calling phone"<br><br>SAY DIGITS 22 X<br><br>SAY NUMBER 2233 X<br>
<br>================== Asterisk CLI ======================<br>*CLI> agi debug<br>AGI Debugging Enabled<br>*CLI> -- Executing [444@my-phones:1] Answer("SIP/2000-b640ba18", "") in new stack<br>
-- Executing [444@my-phones:2] AGI("SIP/2000-b640ba18", "sample.agi") in new stack<br> -- Launched AGI Script /var/lib/asterisk/agi-bin/sample.agi<br>AGI Tx >> agi_request: sample.agi<br>AGI Tx >> agi_channel: SIP/2000-b640ba18<br>
AGI Tx >> agi_language: en<br>AGI Tx >> agi_type: SIP<br>AGI Tx >> agi_uniqueid: 1206377474.53<br>AGI Tx >> agi_callerid: 2000<br>AGI Tx >> agi_calleridname: 2000<br>AGI Tx >> agi_callingpres: 0<br>
AGI Tx >> agi_callingani2: 0<br>AGI Tx >> agi_callington: 0<br>AGI Tx >> agi_callingtns: 0<br>AGI Tx >> agi_dnid: 444<br>AGI Tx >> agi_rdnis: unknown<br>AGI Tx >> agi_context: my-phones<br>
AGI Tx >> agi_extension: 444<br>AGI Tx >> agi_priority: 2<br>AGI Tx >> agi_enhanced: 0.0<br>AGI Tx >> agi_accountcode:<br>AGI Tx >><br>AGI Rx << verbose "Failed to execute '/var/lib/asterisk/agi-bin/sample.agi': Exec format error" 2<br>
== sample.agi: Failed to execute '/var/lib/asterisk/agi-bin/sample.agi': Exec format error<br>AGI Tx >> 200 result=1<br> -- AGI Script sample.agi completed, returning 0<br><br><br><br>Thanks,<br>Mark<br>