Bug 10050 - (int167238/int-239564) high latency with SIP client
(int167238/int-239564)
: high latency with SIP client
Status: UNCONFIRMED
Product: Chat & Call & SMS
SIP
: 5.0/(3.2010.02-8)
: N900 Maemo
: Unspecified normal (vote)
: ---
Assigned To: rtcomm@maemo.org
: sip-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-04-27 21:52 UTC by Randall
Modified: 2012-02-01 01:29 UTC (History)
3 users (show)

See Also:


Attachments
tcdump of short SIP test call (251.27 KB, application/x-gzip)
2010-04-30 07:12 UTC, Randall
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Randall (reporter) 2010-04-27 21:52:44 UTC
SOFTWARE VERSION: 3.2010.02-8.002

EXACT STEPS LEADING TO PROBLEM: 
1. Create SIP account with Asterisk on LAN.  Account forces ulaw (verified) and
nat=yes was required to prevent one way conversations (weird because it's on a
LAN).

qualify=yes                                                                     
type=friend                                                                     
context=local                                                                   
defaultuser=208                                                                 
secret=********                                                                 
host=dynamic                                                                    
callerid=Randall Smith <208>                                                    
mailbox=208@default                                                             
disallow=all                                                                    
allow=ulaw                                                                      
nat=yes                                                                         
canreinvite=no 

2. Call another IP phone on the LAN.

EXPECTED OUTCOME:

The latency (delay) for the voice transfer and receive should be nearly 0
because it's on a LAN.

ACTUAL OUTCOME:

The latency for sending voice is OK.  The latency for receiving receiving is
very high (estimated .25 to .5 seconds).  This is high enough to make a
conversation awkward, especially when going out through a gateway which adds
latency. 

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:
In my opinion, the latency is too high to use the SIP client, which is a shame
because I run my own Asterisk server with several IP phones.  I had the same
experience with previous versions of Maemo (I own an N800) so I'm guessing this
is the same software stack.

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3)
Gecko/20100408 Ubuntu/9.04 (jaunty) Firefox/3.6.3
Comment 1 Andre Klapper maemo.org 2010-04-30 00:11:15 UTC
Hi Randall,

the latency exists right from the beginning of the call?

Which Asterisk version is this about?

I wonder if this is related to bug 6936 which should be fixed in the next
upcoming release (PR1.2).

Can you provide traffic captures? You could use tcpdump from the SDK tools
repository ( http://wiki.maemo.org/Documentation/devtools/maemo5 ).

Logs could be made available by installing the sysklogd package.
In order to analyze this issue better, make sure to export TPORT_LOG=1 and
TPSIP_DEBUG=all in the device environment (/etc/osso-af-init/af-defines.sh is a
good place to export them).
Comment 2 Randall (reporter) 2010-04-30 07:10:42 UTC
Hi Andre,

There is significant (> .2 seconds) delay from the start for receiving voice on
the N900.  Even with canreinvite=yes and native bridging, the same symptoms
occur.  In addition to the delay, the call gets choppy at times (which might be
the cause of the delay - increased jitter buffer?).  Note that voice transfer
from the N900 is received with little delay.  I've attached results from
tcpdump for a short test call.  The command was "tcpdump -pi wlan0 -s0 -w
sipdump host 192.168.237.231".

As for the version of Asterisk.  It's 1.6.0.5 compiled on a gumstix.  Not that
it matters in bridging mode.

root@gumstix-custom-verdex:~# asterisk -rvv
Asterisk 1.6.0.5, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>

One thing to note.  I suspect that wifi may be contributing.  I've noticed that
when I ssh into the device, the shell is not very responsive.  Is there a way
to make adjustments to wifi (turn off power saving features?) to see if it
makes a difference?
Comment 3 Randall (reporter) 2010-04-30 07:12:09 UTC
Created an attachment (id=2672) [details]
tcdump of short SIP test call

Result of "tcpdump -pi wlan0 -s0 -w sipdump host 192.168.237.231"
Comment 4 Mikhail Zabaluev nokia 2010-05-06 12:33:30 UTC
(In reply to comment #2)
> One thing to note.  I suspect that wifi may be contributing.  I've noticed that
> when I ssh into the device, the shell is not very responsive.  Is there a way
> to make adjustments to wifi (turn off power saving features?) to see if it
> makes a difference?

Certainly, go to the WLAN connection settings and disable power saving in the
advanced settings dialog.

Another thing to check: what is the CPU utilization in a call?