[Asterisk-Users] stop asterisk when Idle

Leif Neland leifn at neland.dk
Sat Nov 26 09:35:10 MST 2005


>> I still continue to reboot my asterisk box everyday.
>>
>> I posted a message on November 22, but it was on another thread and
>> no one answered me, so I try again here,
>> where a lot of people told be I was a bad administrator ("Like a
>> Windows administrator" and I don'0t want to resolve my problem)
>>
>> Actually I would like to resolve my problem, but I am not able to do
>> this, so I ask help to anybody who can help me, and repost my
>> last of 22/11/2005
>>
>> In short, my problem is that, after one or two days of running, chan
>> oh323 suddendly disappear from asterisk box, without giving any
>> warning / error In example, you type oh323 show stats at 11 o'clock
>> , and get an answer from asterisk, about usage of oh323
>>
>> At 12, without doing anything to the box or to the asterisk, you
>> type the same command, and you get a  "No such command 'oh323' (type
>> 'help' for help)
>>
>> If you type help, no oh323 commands are available.
>> If you quit asterisk, (STOP NOW) and restart asterisk , no oh323
>> channel command is available
>>
>> if you reboot the machine everything is again fine !
>>
>> It is so a crazy situation that to reboot appears (to me) the
>> best thing (I
>> am sorry about this)

If you really need to have oh323, then you should test say every 5 minutes 
or so, and then shutdown asterisk and reboot.

if asterisk -r -x "oh323"|grep help
then
  echo "oh323 missing"|mail administrator
  asterisk -r -x "stop now"
  reboot
fi

Ii is better to disconnect the existing users if they can not use the box 
without oh323

Do you have some kind of monitoring running? Like Big Brother or nagios?
It might be interesting to see when oh323 dies.
Perhaps you could also use mrtg to graph usage levels to see if there is 
some kind of correlation between usage and oh323 fatality

Leif




More information about the asterisk-users mailing list