All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server > เกี่ยวกับ Voice over Internet Protocol (VoIP) + IP-PBX server
ตัวอย่างการเขียน agi connect กับ elastix
(1/1)
golfreeze:
ส่วนไฟล์ /etc/asterisk/extensions.conf ก็ประมาณนี้ครับ
โค้ด: เลือกทั้งหมด
[from-internal]
exten => 000,1,Answer
exten => 000,n,AGI(myfirstagi.php)
exten => 000,n,Hangup
ตัวอย่างการใช้งาน 1
ไฟล์ /var/lib/asterisk/agi-bin/myfirstagi.php
#!/usr/bin/php -q
<?php
include ("phpagi.php");
$agi = new AGI();
$agi->answer();
$a = 11;
$b = 10;
$sum = $a+$b;
$agi->say_number($sum);
?>
#chmod +x /var/lib/asterisk/agi-bin/myfirstagi.php
ขอบคุณข้อมูล และสามารถอ่านเพิ่มเติมได้จากที่ : http://www.voip4share.com/phpagi-where-php-connects-to-asterisk-f64/phpagi-t1017.html
นำร่อง
[0] ดัชนีข้อความ
Go to full version