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/[EMAIL PROTECTED])

[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! : [EMAIL PROTECTED]
MSN : [EMAIL PROTECTED]
Google Talk : [EMAIL PROTECTED]
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

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

Reply via email to