Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music
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 => Topic started by: golfreeze on ตุลาคม 29, 2014, 04:26:00 pm
-
ส่วนไฟล์ /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 (http://www.voip4share.com/phpagi-where-php-connects-to-asterisk-f64/phpagi-t1017.html)