[Asterisk-Users] AGIphp Installation

Abdul Lateef Khan abdul_zu at yahoo.com
Mon Nov 21 11:43:08 MST 2005


Hi friends,

I was trying to execute ring.php using AGIphp but i am not able to
ring another extention i am getting this error:

- Executing AGI("SIP/123456-6e57", "ring.php") in new stack
Failed to execute '/var/lib/asterisk/agi-bin/ring.php': Exec format error
    -- Launched AGI Script /var/lib/asterisk/agi-bin/ring.php
    -- AGI Script ring.php completed, returning 0

Here is my Configuration

[sip] ; i want to ring this ext.
exten => _X.,1,Dial(SIP/${EXTEN}@xxx.xxx.xxx.xxx)

[ppp]
exten => 111,1,agi(ring.php)

this my ring.php code.

<?php
  require_once('phpagi-asmanager.php');

  $number = '9745405022';

  $asm = new AGI_AsteriskManager();
  if($asm->connect())
  {
    $call = $asm->send_request('Originate',
            array('Channel'=>"SIP/$number",
                  'Context'=>'sip',
                  'Priority'=>1,
                  'Callerid'=>$number));
    $asm->disconnect();
  }
?>


Please anyone can explain me why i am getting this error?


--
Best Regards,
Abdul Lateef Khan
Computer Programmer
Mobile No. : +974 - 5405022
ICQ : 276-994-704
YM! : abdul_zu at yahoo.com
MSN : abdulzu at hotmail.com
Google Talk : lateef.np at gmail.com



More information about the asterisk-users mailing list