[asterisk-users] stucked calls in asterisk 1.4

Stefan Schmidt sst at sil.at
Thu May 28 07:15:08 CDT 2009



Alex Samad schrieb:
> Hi

Hi Alex,

> 
> I am new to asterisk so my suggestions might be a bit silly.
> 
> Why not setup a iax2 connection bettween the asterisk servers, because
> its a lower overhear and more efficient.

We had changed from iax connections to sip connections cause we had
timing problems with iax. Also in meetme and when a client send a fax
over the connection. This problems has gone after changing to sip connects.

>> what i can see is that the asterisk itself sometimes lag so no call can
>> be started, but running calls wont be broken.
>>
>> in netstat -su i see a big amount of udp packet receive errors when it
>> lags. Like 600 to 800 pakets per second.
> 
> if you are seeing packet loss, have you check the stats on the cards and
> the ports on the switch any sort of loss might indicate a faulty
> card/port

its not a network packet loss its in the kernel or asterisk itself.

> you could also try some network testing with iperf by default it tests
> udp.
> 
> the other thought is keep going the way youwere add another nic card to
> server a such that you have 
> 
> eth0 for your sip clients
> eth1 for router server b
> eth2 for router server c

i´ve allready tried this, and the problem still occurs.


> it would just take a bit of routing magic.  The thing to watch then is
> the bus these card are on if they share the same pci bus.  But you are
> not really moving around much data.
> 
> Try linux-kernel mailing list or do a  google for udp buffer tunning
> from memory there is the kernel option which is the abs max, but the
> program must also select a buffer amount which is  usually the default
> value which is not the max value.

increase the max udp buffer size was just something i´ve found to try
but i´ve set the default value to 512kB by now, maybe this will help.

> another thing to look for (you haven't mentioned you nic type or kernel
> version), but I had a realtek 8168b which would sort of work with the in
> kernel driver (8111c) on any kernel < 2.6.28. After 2.6.28 the in kernel
> driver worked really well. system would be under load packets would be
> come corrupt

system info:
HP Proliant DL380 G5 2x Intel Xeon 2,3 GHZ quad core
6GB Ram
Debian Lenny ver. 5.0.1
kernel: 2.6.26-1-amd64

I´ve recompiled with dont optimize and debug threads and when the
asterisk hangs or lag i see in core show lock the following:

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 1092675920 (do_monitor           started at [16595]
chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 16264 sipsock_read &netlock
0x7f6d0e9d0700 (1)
=== -------------------------------------------------------------------

and a second before everything comes fine again:

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 1092675920 (do_monitor           started at [16595]
chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 16264 sipsock_read &netlock
0x7f6d0e9d0700 (1)
=== ---> Lock #1 (chan_sip.c): MUTEX 4728 find_call &p->lock 0x374ffd0 (1)
=== ---> Lock #2 (sched.c): MUTEX 220 ast_sched_add_variable &con->lock
0x1b2eee0 (1)
=== -------------------------------------------------------------------
===
=======================================================================

maybe this is a bug?

best regards

steve



More information about the asterisk-users mailing list