[Asterisk-Users] stop asterisk when Idle

asterisk at frameweb.it asterisk at frameweb.it
Fri Nov 25 03:12:45 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)

This is my previous post:

*******************************************
First of all, thank you for your answer, the only that does not claim to
not restart the box !

Asterisk is running on a                  Suse Linux 9.3    box,
kernel version is                   2.6.11.4-21.9-smp
Asterisk is the last stable version via cvs, not cvs head

show version:
Asterisk CVS-v1-0-10/31/05-17:43:16 built by root at asterisk02 on a i686
running Linux

So it was the last stable version on 31 of October;

Also other components were taken via CVS;

cvs checkout -r v1-0 zaptel libpri asterisk asterisk-addons asterisk-sounds

about oh323, these are the instructions that I assembled and followed,
reading around;

cd /root
wget
http://www.inaccessnetworks.com/ian/projects/asterisk-oh323/Libraries/pwlib-Mimas_patch2-src-tar.gz
wget
http://www.inaccessnetworks.com/ian/projects/asterisk-oh323/Libraries/openh323-Mimas_patch2-src-tar.gz

cd /usr/src
wget
http://www.inaccessnetworks.com/ian/projects/asterisk-oh323/download/asterisk-oh323-0.6.7.tar.gz

cd /root
tar zxvf pwlib-Mimas_patch2-src-tar.gz
tar zxvf openh323-Mimas_patch2-src-tar.gz
mv pwlib_Mimas_patch2 pwlib
mv openh323_Mimas_patch2 openh323

cd /usr/src
tar zxvf asterisk-oh323-0.6.7.tar.gz

PWLIBDIR=/root/pwlib
export PWLIBDIR
OPENH323DIR=/root/openh323
export OPENH323DIR
LD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/lib
export LD_LIBRARY_PATH

modify the file:
vi /etc/ld.so.conf
and add in it::
/root/pwlib/lib
/root/openh323/lib

then:
ldconfig

cd /root/pwlib
./configure && make clean && make opt && make install && ldconfig

cd /root/openh323
./configure && make clean && make opt && make install && ldconfig

cd /usr/src/asterisk-oh323-0.6.7
modify Makefile according to the directories:

vi /usr/src/asterisk-oh323-0.6.7/Makefile

PWLIBDIR=/root/pwlib
OPENH323DIR=/root/openh323

make && make install && ldconfig

chown /usr/lib/asterisk/modules/asterisk . -R
chgrp /usr/lib/asterisk/modules/asterisk . -R

chown  asterisk /usr/local/lib -R
chgrp  asterisk /usr/local/lib -R

chmod 777 /root
chown  asterisk /root/pwlib -R
chgrp  asterisk /root/pwlib -R

chown  asterisk /root/openh323 -R
chgrp  asterisk /root/openh323 -R


the only thing I am absolutely not hayy to did was that  "chmod 777 /root";
I think that it should be not necessary at all, I did it becouse asterisk
run as "asterisk" user, and peraphs i thought some problems aboutr
accessing pwlib or oh323;

I have an heavily stressed system, but I have a couple of hours of almost
no traffic (people sleep sometimes...)
To shut down asterisk, killing a maximum 1 or 2 phones and than reboot (
only restart gracefully or now is not sufficient to re-live the oh323
channel)
is a bad thing, but is better than drop 5,000 phones 5 hours later.
Why not only reboot ? becouse if you shurdown asterisk BEFORE rebooting,
the cdr is updated correctly with the last phnes running.

I tried to reboot a box WITHOUT exiting from asterisk, and the running
conversetion (with  more then 2000 billsec....) was not recorded in the cdr

I am using the g729 codec ( I bought a 30 channels license from Digium).

So, what to say... ah, you also need my oh323,conf file: here it is.


asterisk02:/etc/asterisk # cat oh323.conf
;
; Configuration file of OpenH323 channel driver
;

;-----------------------------------------
; General configuration options
; (ports, jitter, GK, ...)
;-----------------------------------------
[general]
;
; Address to bind to for incoming connections.
; Default is ALL.
;
listenAddress=0.0.0.0
;
; Port to listen to.
; Default value is 1720.
;
listenPort=1720
;
; Configure the TCP port range to be used by H.323
;
tcpStart=10000
tcpEnd=20000
;
; Configure the UDP port range to be used by H.323
; Note: The port range used by RTP are configured from
;       "rtp.conf"
;
udpStart=10000
udpEnd=20000
;
; Enable fast start (yes,no).
;
fastStart=yes
;
; Enable H.245 tunnelling (yes,no).
;
h245Tunnelling=yes
;
; Enable early H.245 messages in call SETUP message.
;
h245inSetup=yes
;
; Set jitter buffer (in milliseconds, 20...10000).
;
jitterMin=20
jitterMax=100
;
; Set IP Type-of-Service byte for RTP channels.
; Valid values for this option are:
;   lowdelay, throughput, reliability, mincost, none
; Moreover, an integer (in decimal or hex format) may be entered.
;
ipTos=none
;
; Set the maximum number of inbound/outbound/simultaneous
; H.323 connections.
;
outboundMax=100
inboundMax=100
simultaneousMax=100
;
; Call Rate Limiter params (ingress direction). When the total number
; of active calls is above 'crlThreshold' then the rate of the incoming
; H.323 calls is restricted in a way where no more than 'crlCallNumber'
; calls are allowed in 'crlCallTime' milliseconds, thus limiting the rate
; of incoming calls to:
;     'crlCallNumber' / ('crlCallTime' / 1000) Calls-per-Sec.
;
;crlCallNumber=20
;crlCallTime=20000
;crlThreshold=30
;
; Set the bandwidth limit for H.323 connections.
; The value is in Kbps.
;
;bandwidthLimit=1024
;
; Set tracing options for the wrapper library and for the
; OpenH323 library.
; libTraceFile can be 'stdout' or a full path name to the tracefile.
; Only the trace info for OpenH323 is logged in libTraceFile.
;
wrapLibTraceLevel=0
libTraceLevel=0
libTraceFile=stdout
;
; Disable gatekeeper or specify a gatekeeper. The gatekeeper's ID is the
zone name.
; Valid values for this option are:
;   DISABLE,
;   DISCOVER,
;   <gatekeeper's DNS name>,
;   <gatekeeper's ip>,
;   GKID:<gatekeeper's id>
;   <gatekeeper's id>@<gatekeeper's name or address>
;
;gatekeeper=192.168.1.2
;gatekeeper=DISCOVER
gatekeeper=DISABLE
;
; Set the gatekeeper password. If used, it enables H.235 access to
gatekeeper.
;
;gatekeeperPassword=secret
;
; Set the gatekeeper registration timeout. Before the expiration of
; the timeout, a re-registration is attempted.
;
gatekeeperTTL=600
;
; Set the mode for sending user-input (DTMF)
; Valid values for this option are:
;   Q931        -   Q.931 Keypad Information Element
;   STRING      -   H.245 string
;   TONE        -   H.245 tone
;   RFC2833     -   RFC2833
;   INBAND      -
;
userInputMode=TONE
;
; AMA flags (default, omit, billing, documentation)
;
amaFlags=default
;
; Account code
;
accountCode=H323
;
; Default language
;
language=en
;
; Default Music-On-Hold class
;
musiconhold=default
;
; Set the default context of H.323 calls.
;
;context=voip-h323
context=from-internal

;-----------------------------------------
; Configure H.323 aliases, prefixes and
; related ASTERISK's contexts
;-----------------------------------------
[register]
;
; Aliases/prefixes associated with the default context
; defined in section [general].
;
alias=asterisk
alias=123
;
; Aliases/prefixes routed in "all-aliases" context.
;
;context=all-aliases
context=from-internal
alias=ASTERISK
alias=666
;
; Aliases/prefixes routed in "more-aliases" context.
;
;context=more-aliases
context=from-internal

alias=665
;
; Aliases/prefixes routed in "all-prefixes" context.
;
;context=all-prefixes
context=from-internal
gwprefix=00
gwprefix=01
;
; Aliases/prefixes routed in "more-stuff" context.
;
;context=more-stuff
context=from-internal

alias=664
gwprefix=02

;-----------------------------------------
; Specify and configure CODEC related
; options
;-----------------------------------------
[codecs]
;
; Define the codec list of the channel driver.
; Every "codec" option may have a "frames" option
; associated with it.
; Valid values for the "codec" option are:
;   G711U       -   G.711 u-Law
;   G711A       -   G.711 A-Law
;   G7231       -   G.723.1(6.3k)
;   G72316K3    -   G.723.1(6.3k)
;   G72315K3    -   G.723.1(5.3k)
;   G7231A6K3   -   G.723.1A(6.3k)
;   G7231A6K3   -   G.723.1A(6.3k)
;   G726        -   G.726(32k)
;   G72616K     -   G.726(16k)
;   G72624K     -   G.726(24k)
;   G72632K     -   G.726(32k)
;   G72640K     -   G.726(40k)
;   G728        -   G.728
;   G729        -   G.729
;   G729A       -   G.729A
;   G729B       -   G.729B
;   G729AB      -   G.729AB
;   GSM0610     -   GSM 0610
;   MSGSM       -   Microsoft GSM Audio Capability
;   LPC10       -   LPC-10
; Number of frames in RTP packet (if not specified) is 1.
;
codec=G729
frames=2
codec=G711A
frames=20
codec=G711U
frames=20
;codec=GSM0610
;frames=4
;codec=G7231
;frames=2
;codec=G729A
;frames=2
;codec=G729B
;frames=2
;codec=G729AB
;frames=2

Of course, if it is possible to find a solution to the "oh323
disappearing", i will be the first to implement it ( and I will happyly
throw away the reboot workaround)

Moreover, in my conf file I have:

outboundMax=100
inboundMax=100

Could it be better to tune these values to 30 ? (the actual number of zap
channels); I cannot place more then 30 simultaneous calls.

Andrea





                                                                           
             Mike Fedyk                                                    
             <mfedyk at mikefedyk                                             
             .com>                                                      To 
             Sent by:                  Asterisk Users Mailing List -       
             asterisk-users-bo         Non-Commercial Discussion           
             unces at lists.digiu         <asterisk-users at lists.digium.com>   
             m.com                                                      cc 
                                                                           
                                                                   Subject 
             21/11/2005 19.02          [Asterisk-Users] Re: oh323 channel  
                                       disappears                          
                                                                           
             Please respond to                                             
              Asterisk Users                                               
              Mailing List -                                               
              Non-Commercial                                               
                Discussion                                                 
             <asterisk-users at l                                             
             ists.digium.com>                                              
                                                                           
                                                                           




asterisk at frameweb.it wrote:
> This are the facts:
> after a couple of days running, everything appears to run very well..
> asterisk is alive, no bad lines in log......
> But actuallu th oh323 channel disappears !!!!
> if tou type at the console "oh323 <TAB>"  no helps is given
> oh323: no such command !!!
> help: nothiong about oh323 !!!
>
> but the box is the same as ine hour before, when oh323 was known....
>
> I am not an asterisk programmer, I am sorry i never read a line of the
> oh323 channel, so 99.7 % of what I say is wrong, but it seem to me then
> the oh323 crashes in such a bad way to completly evanihes.
>
> If you have running conversation, they stay up (of course, now they are
> trunked to a zap channel)
>
> but no new conversation are possible
>
> the really incredible thing is that you cannot find any "proble/error"
line
> both in the /vat/log/asterisk/full than in the messages log
>
> So, that's way I should stop and reboot the box ....
>
> If anybody has any idea (where to look i.e.,...) I can try almost
anything
What version of asterisk are you running, on what distro and what kernel?
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





                                                                           
             snacktime                                                     
             <snacktime at gmail.                                             
             com>                                                       To 
             Sent by:                  Asterisk Users Mailing List -       
             asterisk-users-bo         Non-Commercial Discussion           
             unces at lists.digiu         <asterisk-users at lists.digium.com>   
             m.com                                                      cc 
                                                                           
                                                                   Subject 
             17/11/2005 23.30          Re: [Asterisk-Users] stop asterisk  
                                       when Idle                           
                                                                           
             Please respond to                                             
              Asterisk Users                                               
              Mailing List -                                               
              Non-Commercial                                               
                Discussion                                                 
             <asterisk-users at l                                             
             ists.digium.com>                                              
                                                                           
                                                                           






      But I found some situations that, after several millions of calls
      seconds,
      need to reboot the box and not only restart asterisk.


That's really not necessary,and it's almost painful to watch people do
this...  If you posted some detailed information about your system and the
problem you are having maybe someone could help you fix the actual problem.


Chris_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list