[asterisk-dev] Problems with massively (continously) growing skew

Michael Maier m1278468 at mailbox.org
Fri Apr 10 10:42:47 CDT 2020


On 04.04.20 at 15:33 Michael Maier wrote:
> Hello!
> 
> I'm facing a massive problem during sending or receiving of fax (spandsp, pjsip,
> asterisk 16.9 bundled pjsip). Affected are always the packages sent by asterisk.
> The packages received are pretty perfect.
> 
> Tracetool is pcapsipdump.
> 
> Problem can't be seen that massive during "normal" (non) fax calls (maybe just a
> little bit).
> 
> 
> What can be seen?
> 
> Inbound fax:
> - Fax passthrough (alaw)
> - Fax received by asterisk
> - no Jitterbuffer
> - after about 1 minute of duration (> 6100 packages):
>   skew rises from +-0 to -30 (from one package to the
>   other) and all following packages afterwards have -19.9
>   ms (one package seems to be just dropped without any
>   sequence error (sequence counter is ok))
> - Another 4000 packages later one more dropped package
>   (without sequence error) from -19.9 to -52 and
>   afterwards all following packages -39.9 ms (sampling
>   rate: 20 ms) -> exactly the same as before but from -19
>   to - 40 ms.
> - Duration: ~ 2 minutes
> - always reproducible

After I could resolve the problem for outgoing faxes (see below), I'm wondering
how skewing is done when asterisk / spandsp does the fax handling.

Asterisk itself uses res_timing_timerfd.so. But if I understand [1] correctly,
asterisk doesn't do any timing for fax handling (and therefore no skew related
jobs at all). This would mean, spandsp has to do it. But spandsp doesn't seem to
use timerfd.

At the moment I'm struggling at this point. How can I improve skewing for asterisk
/ spandsp? Where is it done in general?

> 
> Outbound fax
> - Fax passthrough (alaw)
> - sent via iaxmodem through asterisk (iaxmodem connected
>   to asterisk via iax). No jitterbuffer!
> - skew is rising continuously (+362 ms after 363 s
>   duration -> every second +1 ms)
> - always reproducible

I could find the problem for outbound faxes via iaxmodem.

Version 1.2.0 introduced improved skew behavior, which unfortunately breaks things
here. After reverting this new feature, sending outgoing faxes via iaxmodem works
as expected again.

Attached you can find the patch to remove the improved skewing feature again based
on iaxmodem 1.3.1


Thanks
Michael


[1] https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iaxmodem-revert-skew.diff
Type: text/x-patch
Size: 4811 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200410/8cd0e75e/attachment.bin>


More information about the asterisk-dev mailing list