[asterisk-users] Asterisk + Realtime + Manager reload = crash
Carlos Chavez
cursor at telecomabmex.com
Fri Sep 7 12:44:00 CDT 2007
I have several installations of Asterisk (several versions) where we
have our own web interface that uses Mysql and Realtime. When we do
modifications to Mysql we use a Manager connection in order to reload
the configuration (we use Realtime static for extensions) sometimes
Asterisk will crash. Not every time and not every X times we reload.
Sometimes it takes ten reloads and other just one before it crashes. I
use a simple function in php to do the reload:
function reload_conf ( $conf ) {
$socket = fsockopen("localhost","5038", $errno, $errstr,
$timeout);
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: user\r\n");
fputs($socket, "Secret: password\r\n\r\n");
fputs($socket, "Action: Command\r\n");
switch ($conf) {
case "sip":
fputs($socket, "Command: sip reload\r\n\r\n");
break;
case "ext":
fputs($socket, "Command: dialplan reload\r\n\r
\n");
break;
case "iax2":
fputs($socket, "Command: iax2 reload\r\n\r\n");
break;
case "agent":
fputs($socket, "Command: module reload
chan_agent.so\r\n\r\n");
break;
case "todo":
fputs($socket, "Command: reload\r\n\r\n");
break;
default:
fputs($socket, "Command: dialplan reload\r\n\r
\n");
}
fclose($socket);
}
Why would asterisk crash after reloading the dialplan?
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez Prats
Director de Tecnología
+52-55-91169161 ext 2001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20070907/419bdc32/attachment.pgp
More information about the asterisk-users
mailing list