[asterisk-dev] Channel Driver's Write callback called with 140ms intervals

Paulo Garcia paulo.astdev at gmail.com
Mon Nov 26 06:35:20 CST 2007


I'm doing some performance tests in our channel driver and I realized
that in calls between our channel and a SIP phone, the write callback
is called almost the time in 20ms intervals, which is correct.
However, sometimes the callback is called with longer intervals
between each call: 60ms, 80ms and reaching 140ms.

First I thought that as a SIP call, due to network conditions, the
frame can be buffered somewhere and then when the write callback is
called after, e.g., 60ms, I would have a frame 3 times greater then
the regular one (480 samples rather than 160) but the frame size is
always of 160 samples.

In my test, we receive a SIP call and the dialplan starts another call
to a digital channel. After the call is answered in the other side
wait a while and then hangup. During this time, I saw that the
interval between the last write callback call and the current one can
be longer than 20ms.

I'm using a powerful machine and my asterisk process during the test
uses less than 15% CPU. I'm also verifying my channel driver code to
check if there is something that can cause this delay but I didn't
find anything so far.

It doesn't happens so often but I'm concerned this is happening.

Any thoughts to help me find out where to looking at?

Thanks in advance!

Paulo Garcia

More information about the asterisk-dev mailing list