jump to navigation

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

Posted by jbanju in System VoIP Asterisk.


//reload Astersik Server
$socket = fsockopen(“″,”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”);

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

displaysystemname = yes
enabled = yes
port = 5038

secret = xxxx

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



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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: