jump to navigation

ใช้ php สั่ง reload asterisk December 9, 2009

Posted by jbanju in System VoIP Asterisk.
trackback

STEP:1

<?
//reload Astersik Server
$socket = fsockopen(“127.0.0.1″,”5038”, $errno, $errstr, $timeout);
fputs($socket, “Action: Login\r\n”);
fputs($socket, “UserName: admin\r\n”);
fputs($socket, “Secret: xxxx\r\n\r\n”);

fputs($socket, “Action: Command\r\n”);
fputs($socket, “Command: reload\r\n\r\n”);
$wrets=fgets($socket,128);
?>

STEP2: แก้ใขไฟล์ /etc/asterisk/manager.conf

[general]
displaysystemname = yes
enabled = yes
port = 5038

[admin]
secret = xxxx
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255

read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Comments»

No comments yet — be the first.

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

%d bloggers like this: