PHPAGI2


[root@alfamart agi-bin]# vim /etc/asterisk/manager.conf

[mosesagi]
secret = mosesagi
read = all
write = all

[root@alfamart agi-bin]# vim /etc/asterisk/extensions.conf

[ecentrix-agents]
exten => _9XXXX,1,Dial(SIP/${EXTEN:1},,tT)
exten => _9XXXX,n,Noop(${CHANNEL})
exten => _9XXXX,n,Softhangup(${CHANNEL})

#!/usr/bin/php -q
<?php
set_time_limit(30);
require_once(“include/phpagi-asmanager.php”);
//$asm = new AGI_AsteriskManager();
$asm = new AGI_AsteriskManager(“/etc/asterisk/phpagi.conf”,””);
$asm->connect(“localhost”,”mosesagi”,”mosesagi”);
$asm->send_request(‘Originate’, array(‘Channel’=> “SIP/8801”, ‘Context’ => “ecentrix-agents”, ‘Priority’ => 1, ‘Async’ => true,’callerid’=>”8801″,’Exten’=>98802,’Callerid’=>8801));
$asm->disconnect();
?>

[root@alfamart agi-bin]# pwd originate.php
/var/lib/asterisk/agi-bin

[root@alfamart agi-bin]# php originate.php => DIAL 8801 then DIAL 8802

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: