[AsteriskBrasil] Asterisk Caindo

Juliano Primavesi juliano.p em gmail.com
Quarta Abril 4 11:45:30 BRT 2007


Tambem tenho este problema "eventualmente". Criei um script que coloco na
cron fazendo o serviço de monitor:

---------------- monitor.cgi
#!/usr/bin/perl

foreach $Vez (1,2) {

        $serv = `hostname -s`;
        $sendmail = "/usr/sbin/sendmail";
        $Resultado = `/usr/bin/php /root/monitor.php`;

        if ($Resultado !~ 'Pong') {
                `/etc/init.d/zaptel start`;
                `/etc/init.d/asterisk start`;
        }
        sleep 20;
}

------------- monitor.php
<?
        $Num = 0;
        $oSocket = fsockopen ("127.0.0.1", 5038, $Num , $Num, 20);
        if (!$oSocket) {
                echo "$errstr ($errno)<br>\n";
        } else {
                fputs($oSocket, "Action: login\r\n");
                fputs($oSocket, "Events: off\r\n");
                fputs($oSocket, "Username: admin\r\n");
                fputs($oSocket, "Secret: senhasecretadoadmin\r\n\r\n");
                fputs($oSocket, "Action: Ping\r\n");
                fputs($oSocket, "Action: Logoff\r\n\r\n");

                while ($Contador < 2){
                        $Resposta = fgets($oSocket,4096);
                        if (ereg('Response',$Resposta)) {
                                $Contador++;
                                echo $Resposta;
                        }
                }

                fclose($oSocket);

        }
?>

Juliano

On 4/4/07, Bernardo Vieira <bernardo.vieira em terra.com.br> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> dmesg?
> tente aumentar a verbosidade dos logs também.
>
>
> Felipe Silva escreveu:
> > Ola Amigos da Lista
> >
> > De alguns dias pra cá meu asterisk tem caído repentinamente, nada
> > aparece no log. Ele simplesmente cai. Sei que caiu, pois os usuários
> > reportam que não estão conseguindo ligar.
> > Os dados do meu asterisk:
> > Versão 1.2.13
> > Maquina:
> >             P4 2.4GHz
> >             512Mb RAM
> >             40Gb HD
> >             Placa X101P (sem uso)
> > Conectado ao Asterisk:
> >             1 - DVG-4032s
> >             4 - PAP2-NA
> > Provedores VOIP:
> >             TrinnPhone
> >             Vono
> > Codecs Utilizados:
> >             G729 ? Provedores
> >             ILBC ? Vono
> >             G711u ? ATA e Gateway
> >
> > Não sei por onde começar a investigar esse erro, por isso recorro à
> > amada lista.
> >
> > Obrigado!
> > Felipe Silva - Analista de Suporte
> > Tecnocoop Informatica LTDA.
> > +55 21 39772740
> >   21 40627193 (VONO)
> > +55 21 96010409
> > +55 21 91526205
> >  <http://www.tecnocoop.com.br> http://www.tecnocoop.com.br
> >
> > Environment: think globally, act locally.
> > Before printing, consider the actual need.
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > ----------------------------------------
> > Estação VoIP 2006
> > 5 e 6 Dezembro
> > Curitiba PR
> > http://www.estacaovoip.com.br
> >
> > _______________________________________________
> > LIsta de discussões AsteriskBrasil.org
> > AsteriskBrasil em listas.asteriskbrasil.org
> > http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
> >
> > _______________________________________________
> > Acesse o  wiki AsteriskBrasil.org:
> > http://www.asteriskbrasil.org
>
> - --
> "What most profoundly divides two men is a different sense and degree of
> cleanliness. What help is all honesty and mutual utility, what help is
> all the good will for each other: in the end the fact remains-they can't
> stand each other?s smell!"
>
> - - Nietzsche
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGE6EU2QVs8jsa1mQRAqgeAJsE0XXD8LskbhEJdWQ2aOPbwdj3aQCgrpDc
> otQ+4lqsi4GdhI7wmvndUlk=
> =48U0
> -----END PGP SIGNATURE-----
> ----------------------------------------
> Estação VoIP 2006
> 5 e 6 Dezembro
> Curitiba PR
> http://www.estacaovoip.com.br
>
> _______________________________________________
> LIsta de discussões AsteriskBrasil.org
> AsteriskBrasil em listas.asteriskbrasil.org
> http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>
> _______________________________________________
> Acesse o  wiki AsteriskBrasil.org:
> http://www.asteriskbrasil.org
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20070404/e6b4e275/attachment-0001.html


Mais detalhes sobre a lista de discussão AsteriskBrasil