Discussion:
[Asterisk-Users] Asterisk SIP Packet Time (20ms)
Andres
2003-12-22 20:15:41 UTC
Permalink
Hi,

I have a question regarding the Asterisk Packet Time for SIP Calls. It is
hardcoded at 20ms but when I do an RTP Analysis on a stream it is clear that
these packets are not spaced out at 20ms. In general you see something like:

Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms

Is there anyway to space them out evenly at 20ms??

This is causing problems with the Sipura SPA2000 on our network. The SPA does
not like this and is treating many packets as lost packets (even though an
Ethereal RTP Analysis trace shows they were not lost).

Regards,
Andres
http://www.telesip.net
Rich Adamson
2003-12-22 20:36:27 UTC
Permalink
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls. It is
hardcoded at 20ms but when I do an RTP Analysis on a stream it is clear that
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of what's
within the packet. In other words, the packet contains 20ms of encoded voice.

If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router buffers,
etc.

On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.

Rich
Andrew Kohlsmith
2003-12-22 20:55:56 UTC
Permalink
Post by Rich Adamson
Post by Andres
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If that is the case, then what is in packet 52 and 55? There's not enough
time between packets for 20ms of voice, unless it's repeating audio in the
packets...

Regards,
Andrew
Rich Adamson
2003-12-22 21:12:52 UTC
Permalink
Post by Andrew Kohlsmith
Post by Rich Adamson
Post by Andres
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If that is the case, then what is in packet 52 and 55? There's not enough
time between packets for 20ms of voice, unless it's repeating audio in the
packets...
In this short example, if you add up all of the times shown and divide
by the number of entries, you'll see its exactly 20ms of voice. The two
delays of 50ms each are the problems (obviously). All that short trace
really says is during the 120ms sampling interval, there was no dropped
udp packets (since they nicely add up). If they didn't add up, it would
be a problem.

So, the question really is... what caused the two 50 ms delays?

In technical network terms those delays are called "jitter", and in the
case noted above, that jitter is substantial. If that trace was taken
next to the equipment (no routers involved in the middle), then which
ever piece of equipment that originated those packets should be looked
at carefully.

If doesn't make any difference if anyone was talking for not; the packets
are still going to flow, and they should be flowing at a very constant
rate with reasonable but constant inter-packet delay (jitter).

There really is nothing more that can be said without additional detail.

Rich
Andres
2003-12-22 21:38:47 UTC
Permalink
Post by Andrew Kohlsmith
Post by Rich Adamson
Post by Andres
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If that is the case, then what is in packet 52 and 55? There's not enough
time between packets for 20ms of voice, unless it's repeating audio in the
packets...
All packets contain 20ms of voice. Its just that they are not evenly spaced.
My first guess will be to check out our traffic shaper, now that I know its
not due to the Asterisk software.
Post by Andrew Kohlsmith
Regards,
Andrew
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Andres
2003-12-22 21:37:20 UTC
Permalink
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls. It
is hardcoded at 20ms but when I do an RTP Analysis on a stream it is
clear that these packets are not spaced out at 20ms. In general you see
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router buffers,
etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our production
servers and sure enough the inter-packet times are 20ms. There must be
something happening with our LAB Asterisk. It could be the CBQ traffic
shaping software we have running on it. I will fiddle around with it to see
if it changes anything.

Thanks!
Andres
Post by Rich Adamson
Rich
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Andres
2003-12-23 00:18:34 UTC
Permalink
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls. It
is hardcoded at 20ms but when I do an RTP Analysis on a stream it is
clear that these packets are not spaced out at 20ms. In general you
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router
buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our production
servers and sure enough the inter-packet times are 20ms. There must be
something happening with our LAB Asterisk. It could be the CBQ traffic
shaping software we have running on it. I will fiddle around with it to
see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice, then
Asterisk will show this strange behaviour. If we set the UA for 20ms, then
all works well.

Thanks.
Andres
Post by Andres
Post by Rich Adamson
Rich
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Rich Adamson
2003-12-23 00:58:55 UTC
Permalink
Post by Andres
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls. It
is hardcoded at 20ms but when I do an RTP Analysis on a stream it is
clear that these packets are not spaced out at 20ms. In general you
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router
buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our production
servers and sure enough the inter-packet times are 20ms. There must be
something happening with our LAB Asterisk. It could be the CBQ traffic
shaping software we have running on it. I will fiddle around with it to
see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice, then
Asterisk will show this strange behaviour. If we set the UA for 20ms, then
all works well.
Cool!

How did it get set to 60ms?
Andres
2003-12-23 01:23:35 UTC
Permalink
Post by Rich Adamson
Post by Andres
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls.
It is hardcoded at 20ms but when I do an RTP Analysis on a stream
it is clear that these packets are not spaced out at 20ms. In
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to
be in your example, then something else is not right. Possibly a
half-duplex ethernet connection, something else running on the
server, router buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our
production servers and sure enough the inter-packet times are 20ms.
There must be something happening with our LAB Asterisk. It could be
the CBQ traffic shaping software we have running on it. I will fiddle
around with it to see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice,
then Asterisk will show this strange behaviour. If we set the UA for
20ms, then all works well.
Cool!
How did it get set to 60ms?
The GS Phone, ATA186, and SPA2000 all have a parameter that lets you set the
transmit packet size to 60ms (or multiple other values). Asterisk will
receive 60ms and transmit 20ms times 3 packets, andit works quite well. In
any case our SPA2000 problem was unrelated to the packet time.

Regards,
Andres
Post by Rich Adamson
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Clif Jones
2003-12-23 15:37:56 UTC
Permalink
Interesting. For the record, the MultiTech MVP-130 comes with a default
setting
of 60ms packets on all of its supported codecs. I changed the packet
sizes to
20ms because I had never heard of anyone using such large sample sizes.
Post by Andres
Post by Rich Adamson
Post by Andres
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls.
It is hardcoded at 20ms but when I do an RTP Analysis on a stream
it is clear that these packets are not spaced out at 20ms. In
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to
be in your example, then something else is not right. Possibly a
half-duplex ethernet connection, something else running on the
server, router buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our
production servers and sure enough the inter-packet times are 20ms.
There must be something happening with our LAB Asterisk. It could be
the CBQ traffic shaping software we have running on it. I will fiddle
around with it to see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice,
then Asterisk will show this strange behaviour. If we set the UA for
20ms, then all works well.
Cool!
How did it get set to 60ms?
The GS Phone, ATA186, and SPA2000 all have a parameter that lets you set the
transmit packet size to 60ms (or multiple other values). Asterisk will
receive 60ms and transmit 20ms times 3 packets, andit works quite well. In
any case our SPA2000 problem was unrelated to the packet time.
Regards,
Andres
Post by Rich Adamson
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Rich Adamson
2003-12-23 15:59:40 UTC
Permalink
I'm not sure under what circumstances (from an overall performance
perspective) 20ms is better then 60ms, or the reverse. Gut feeling would
suggest choosing the size is roughly equivalent to MTU size. The 60ms
setting should result in larger packets which might be okay for high
speed uncongested links and satellite links. However, the smaller 20ms
packets effectively allow "more opportunity" for others to talk on the
wire and would likely improve response time for all devices on the wire.

Rich
------------------------
Post by Clif Jones
Interesting. For the record, the MultiTech MVP-130 comes with a default
setting
of 60ms packets on all of its supported codecs. I changed the packet
sizes to
20ms because I had never heard of anyone using such large sample sizes.
Post by Andres
Post by Rich Adamson
Post by Andres
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls.
It is hardcoded at 20ms but when I do an RTP Analysis on a stream
it is clear that these packets are not spaced out at 20ms. In
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If the inter-packet times (delays) are large, as they would seem to
be in your example, then something else is not right. Possibly a
half-duplex ethernet connection, something else running on the
server, router buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our
production servers and sure enough the inter-packet times are 20ms.
There must be something happening with our LAB Asterisk. It could be
the CBQ traffic shaping software we have running on it. I will fiddle
around with it to see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice,
then Asterisk will show this strange behaviour. If we set the UA for
20ms, then all works well.
Cool!
How did it get set to 60ms?
The GS Phone, ATA186, and SPA2000 all have a parameter that lets you set the
transmit packet size to 60ms (or multiple other values). Asterisk will
receive 60ms and transmit 20ms times 3 packets, andit works quite well. In
any case our SPA2000 problem was unrelated to the packet time.
Regards,
Andres
Post by Rich Adamson
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
Andres
2003-12-23 17:00:29 UTC
Permalink
Post by Rich Adamson
I'm not sure under what circumstances (from an overall performance
perspective) 20ms is better then 60ms, or the reverse. Gut feeling would
In our network we set UAs to use 60ms (using G729). Actual data measurements
indicate a call consumes about 13Kbps. If we use 20ms then it consumes about
25Kbps. These are of course peer-peer calls since Asterisk itself does not
support transmitting at 60ms. We prefer 60ms due to the fact that some of
our customers are using dial-up for their VoIP, and bigger delays are
preferable to dopped packets.

Andres.
Post by Rich Adamson
suggest choosing the size is roughly equivalent to MTU size. The 60ms
setting should result in larger packets which might be okay for high
speed uncongested links and satellite links. However, the smaller 20ms
packets effectively allow "more opportunity" for others to talk on the
wire and would likely improve response time for all devices on the wire.
Rich
------------------------
Post by Clif Jones
Interesting. For the record, the MultiTech MVP-130 comes with a default
setting
of 60ms packets on all of its supported codecs. I changed the packet
sizes to
20ms because I had never heard of anyone using such large sample sizes.
Post by Andres
Post by Rich Adamson
Post by Andres
Post by Andres
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls.
It is hardcoded at 20ms but when I do an RTP Analysis on a stream
it is clear that these packets are not spaced out at 20ms. In
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content
of what's within the packet. In other words, the packet contains
20ms of encoded voice.
If the inter-packet times (delays) are large, as they would seem to
be in your example, then something else is not right. Possibly a
half-duplex ethernet connection, something else running on the
server, router buffers, etc.
On a typical * --> C7960 local call, I generally see from 1ms to
20ms inter-packet delays. Seldom (if ever) anything above 20ms.
Thanks for your Input Rich. I went ahead and tested this on our
production servers and sure enough the inter-packet times are 20ms.
There must be something happening with our LAB Asterisk. It could be
the CBQ traffic shaping software we have running on it. I will
fiddle around with it to see if it changes anything.
Thanks!
Andres
Ok...after some more testing, the traffic shaping software was not the
culprit. It turns out that if the UA is configured for 60ms of voice,
then Asterisk will show this strange behaviour. If we set the UA for
20ms, then all works well.
Cool!
How did it get set to 60ms?
The GS Phone, ATA186, and SPA2000 all have a parameter that lets you set
the transmit packet size to 60ms (or multiple other values). Asterisk
will receive 60ms and transmit 20ms times 3 packets, andit works quite
well. In any case our SPA2000 problem was unrelated to the packet
time.
Regards,
Andres
Post by Rich Adamson
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Olle E. Johansson
2003-12-23 07:33:25 UTC
Permalink
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls. It is
hardcoded at 20ms but when I do an RTP Analysis on a stream it is clear that
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of what's
within the packet. In other words, the packet contains 20ms of encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router buffers,
etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
I gather from your reply that there are recommendations regarding the ethernet connection
on your Asterisk server? half-duplex seems bad.
Could you elaborate a bit on that?

/Olle
Rich Adamson
2003-12-23 12:53:52 UTC
Permalink
Post by Olle E. Johansson
Post by Rich Adamson
Post by Andres
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of what's
within the packet. In other words, the packet contains 20ms of encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a half-duplex
ethernet connection, something else running on the server, router buffers,
etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
I gather from your reply that there are recommendations regarding the
ethernet connection on your Asterisk server? half-duplex seems bad.
Could you elaborate a bit on that?
Yes, half-duplex ethernet connections "can" cause significant problems
depending on the actual load. In very general terms, a half duplex
ethernet interface can run up to about 20% utilization before collisions
occur, whereas a full duplex connection can run close to 100% without
dropping packets. Those rough numbers apply to both 10 meg and 100 meg
ethernets.

If a collision or dropped packet occurs (in a voip udp environment) there
is no way to retransmit the missing/damaged packet. Missing one packet isn't
a big deal, but if you have collisions and/or dropped packets, there is a
very high probability that lots of packets will be dropped. If too many
are dropped, you'll hear the result in the undecoded voice as choppy
voice.

For whatever reason, most unix systems (and MS systems for that matter)
do not give you a convenient way to configure (or even check) "how" your
ethernet adapter negotiates the connection. There are no official
"standards" as to how the negotiation process determines half vs full,
and systems get it wrong about 50% of the time. (As professional network
performance consultants, we've diagnosed a very large number of problems
like this in corporations around the US over the last ten years. Think in
terms of a unix system trying to negotiate half vs full at the exact same
time as the switch is doing the same thing "without" actually communicating
to the opposite end of the cable.)

If the ethernet traffic is low, no one actually notices the problem. But,
as traffic increases (multiple RTP sessions, etc) the problem begins to
occur and the average technical person doesn't have a clue what is really
going on. What makes it difficult to identify/diagnose is that each time
the system is rebooted (and each time a Cat 5 cable is disrupted), the
half vs full negotiation happens again and (as mentioned) 50% of the time
one end gets it wrong. Therefore the performance problem tends to come
and go, and support folks typically don't associate the performance
issue with the actual half/full problem. (In larger companies, the network
support person might reboot a switch without the * support person
knowing it, and suddenly the * support person has a problem for which
he can't identify what happened.)

Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex 10 meg
ethernet would handle roughly 20-25 rtp sessions before bumping into the
problem (your milage may vary). The majority of the folks on this list
seem to be running home/soho systems and would likely never run into the
issue. But the heavier users will.

What makes this half/full problem even more difficult to diagnose is that
many of these systems have other functions running on them (eg, up2date,
remote database calls, web activity, broadcasts) that can consume a fair
amount of ethernet bandwidth, and the support person is so highly focused
on asterisk they forget some other activity might be impacting their voip
quality. Invariably, a Cat 5 cable disruption or reboot (or something
else) happens at the same time the support person makes a programming or
parameter change, and the person jumps to the conclusion they fixed a
problem with their change when in fact the problem was with their ethernet
connection.

To ensure one never gets bit by the issue, simply ensure that all ethernet
interfaces between the asterisk system and the sip phones are statically
defined as full-duplex. (Good luck in finding the utilities that let you
do that on Linux systems. They are out there, but not easy to find.)

The sip phone's negotiation of half vs full is less of an issue as generally
the most traffic it sees is one RTP session. But, to obtain maximum smoke
and ensure highest quality, the phones should be locked at full duplex as
well.

Rich
Joel Maslak
2003-12-23 15:41:27 UTC
Permalink
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp environment) there
is no way to retransmit the missing/damaged packet. Missing one packet isn't
a big deal, but if you have collisions and/or dropped packets, there is a
very high probability that lots of packets will be dropped. If too many
are dropped, you'll hear the result in the undecoded voice as choppy
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer 2
hardware automatically resends packets involved in a collision - layer 3
is never aware of it happening (although it may cause additional delay).
Eventually the ethernet card will give up if too many collisions occur
during retries, but this is very rare in practice unless the network is
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex 10 meg
ethernet would handle roughly 20-25 rtp sessions before bumping into the
problem (your milage may vary). The majority of the folks on this list
seem to be running home/soho systems and would likely never run into the
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100 Mb/sec
link is half and the other is full, bandwidth is limited to about 8 Mb/sec
max. This is based on some tests I've accidentally conducted. If you try
to send 9 Mb/sec over that link, yes, some packets will get dropped as
they simply won't fit. (But I do agree that for a half-half link, you can
get about 20 Mb/sec)
--
Joel
Clif Jones
2003-12-23 15:39:17 UTC
Permalink
Olle,

Here is an interesting site that goes into some of the troubleshooting
techniques in Voip:
http://www.voiptroubleshooter.com/
Maybe it will help your FAQ!
Post by Olle E. Johansson
Post by Rich Adamson
Post by Andres
I have a question regarding the Asterisk Packet Time for SIP Calls.
It is hardcoded at 20ms but when I do an RTP Analysis on a stream it
is clear that these packets are not spaced out at 20ms. In general
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
Is there anyway to space them out evenly at 20ms??
The 20 ms is not the inter-packet timing, its the relative content of what's
within the packet. In other words, the packet contains 20ms of encoded voice.
If the inter-packet times (delays) are large, as they would seem to be
in your example, then something else is not right. Possibly a
half-duplex
ethernet connection, something else running on the server, router buffers,
etc.
On a typical * --> C7960 local call, I generally see from 1ms to 20ms
inter-packet delays. Seldom (if ever) anything above 20ms.
I gather from your reply that there are recommendations regarding the ethernet connection
on your Asterisk server? half-duplex seems bad.
Could you elaborate a bit on that?
/Olle
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Sean Cheesman
2003-12-22 21:08:24 UTC
Permalink
I might be wrong, but isn't is just saying that the packet has been delayed
x-ms? I'm not sure it's saying that Packet 52 arrived 5ms after packet 51.
Although even if it was, that doesn't mean that it was sent 5ms after packet
51 either.

-----Original Message-----
From: Andrew Kohlsmith [mailto:akohlsmith-***@benshaw.com]
Sent: Monday, December 22, 2003 3:56 PM
To: asterisk-***@lists.digium.com
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
Post by Andres
Packet 50 - Delay 50ms
Packet 51 - Delay 5ms
Packet 52 - Delay 5ms
Packet 53 - Delay 50ms
Packet 54 - Delay 5ms
Packet 55 - Delay 5ms
The 20 ms is not the inter-packet timing, its the relative content of
what's within the packet. In other words, the packet contains 20ms of
encoded voice.
If that is the case, then what is in packet 52 and 55? There's not enough
time between packets for 20ms of voice, unless it's repeating audio in the
packets...

Regards,
Andrew
Sean Cheesman
2003-12-23 15:54:38 UTC
Permalink
The problem occurs when the software is expecting the packet in a certain
timeframe so that it can reassemble it in a timely manner. It's not a big
deal with a web page or something along that lines. But when a voice
application cannot get reassembled in a timely manner, you'll surely notice
it!

-----Original Message-----
From: Joel Maslak
To: asterisk-***@lists.digium.com
Sent: 12/23/2003 10:41 AM
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp environment)
there
Post by Rich Adamson
is no way to retransmit the missing/damaged packet. Missing one packet
isn't
Post by Rich Adamson
a big deal, but if you have collisions and/or dropped packets, there
is a
Post by Rich Adamson
very high probability that lots of packets will be dropped. If too
many
Post by Rich Adamson
are dropped, you'll hear the result in the undecoded voice as choppy
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer 2
hardware automatically resends packets involved in a collision - layer 3
is never aware of it happening (although it may cause additional delay).
Eventually the ethernet card will give up if too many collisions occur
during retries, but this is very rare in practice unless the network is
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex 10 meg
ethernet would handle roughly 20-25 rtp sessions before bumping into
the
Post by Rich Adamson
problem (your milage may vary). The majority of the folks on this list
seem to be running home/soho systems and would likely never run into
the
Post by Rich Adamson
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100 Mb/sec
link is half and the other is full, bandwidth is limited to about 8
Mb/sec
max. This is based on some tests I've accidentally conducted. If you
try
to send 9 Mb/sec over that link, yes, some packets will get dropped as
they simply won't fit. (But I do agree that for a half-half link, you
can
get about 20 Mb/sec)
--
Joel
Rich Adamson
2003-12-23 16:40:08 UTC
Permalink
There's no reassembly with udp, and there is no sense of packets arriving
in the same order as what was sent. Udp is a best-effort low-overhead way
of transmitting data (with UDP often times referred to as the Unreliable
Data Protocol). Changing to TCP would allow reassembly, however the
overhead would be substantial.

------------------------
Post by Sean Cheesman
The problem occurs when the software is expecting the packet in a certain
timeframe so that it can reassemble it in a timely manner. It's not a big
deal with a web page or something along that lines. But when a voice
application cannot get reassembled in a timely manner, you'll surely notice
it!
-----Original Message-----
From: Joel Maslak
Sent: 12/23/2003 10:41 AM
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp environment)
there
Post by Rich Adamson
is no way to retransmit the missing/damaged packet. Missing one packet
isn't
Post by Rich Adamson
a big deal, but if you have collisions and/or dropped packets, there
is a
Post by Rich Adamson
very high probability that lots of packets will be dropped. If too
many
Post by Rich Adamson
are dropped, you'll hear the result in the undecoded voice as choppy
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer 2
hardware automatically resends packets involved in a collision - layer 3
is never aware of it happening (although it may cause additional delay).
Eventually the ethernet card will give up if too many collisions occur
during retries, but this is very rare in practice unless the network is
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex 10 meg
ethernet would handle roughly 20-25 rtp sessions before bumping into
the
Post by Rich Adamson
problem (your milage may vary). The majority of the folks on this list
seem to be running home/soho systems and would likely never run into
the
Post by Rich Adamson
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100 Mb/sec
link is half and the other is full, bandwidth is limited to about 8
Mb/sec
max. This is based on some tests I've accidentally conducted. If you
try
to send 9 Mb/sec over that link, yes, some packets will get dropped as
they simply won't fit. (But I do agree that for a half-half link, you
can
get about 20 Mb/sec)
--
Joel
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
Andres
2003-12-23 17:28:08 UTC
Permalink
Post by Rich Adamson
There's no reassembly with udp, and there is no sense of packets arriving
in the same order as what was sent. Udp is a best-effort low-overhead way
Right, UDP itself does not care about order, but at the application layer you
can keep track of it. You can design your application to buffer X packets
and then reorder them according to sequence numbers.
Post by Rich Adamson
of transmitting data (with UDP often times referred to as the Unreliable
Data Protocol). Changing to TCP would allow reassembly, however the
overhead would be substantial.
------------------------
Post by Sean Cheesman
The problem occurs when the software is expecting the packet in a certain
timeframe so that it can reassemble it in a timely manner. It's not a
big deal with a web page or something along that lines. But when a voice
application cannot get reassembled in a timely manner, you'll surely
notice it!
-----Original Message-----
From: Joel Maslak
Sent: 12/23/2003 10:41 AM
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp environment)
there
Post by Rich Adamson
is no way to retransmit the missing/damaged packet. Missing one packet
isn't
Post by Rich Adamson
a big deal, but if you have collisions and/or dropped packets, there
is a
Post by Rich Adamson
very high probability that lots of packets will be dropped. If too
many
Post by Rich Adamson
are dropped, you'll hear the result in the undecoded voice as choppy
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer 2
hardware automatically resends packets involved in a collision - layer 3
is never aware of it happening (although it may cause additional delay).
Eventually the ethernet card will give up if too many collisions occur
during retries, but this is very rare in practice unless the network is
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex 10 meg
ethernet would handle roughly 20-25 rtp sessions before bumping into
the
Post by Rich Adamson
problem (your milage may vary). The majority of the folks on this list
seem to be running home/soho systems and would likely never run into
the
Post by Rich Adamson
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100 Mb/sec
link is half and the other is full, bandwidth is limited to about 8
Mb/sec
max. This is based on some tests I've accidentally conducted. If you
try
to send 9 Mb/sec over that link, yes, some packets will get dropped as
they simply won't fit. (But I do agree that for a half-half link, you
can
get about 20 Mb/sec)
--
Joel
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Chris Albertson
2003-12-23 18:06:37 UTC
Permalink
The reason you use UDP over TCP for realtime meadia is that
TCP's ability to reliably deliver every packet in order actually
sounds worse. Reason being is that with a UDP system a dropped
packet sounds like just a dropout but if you used TCP the audio
stream would be held up and delayed in a queue while that lost
packet was being retransmitted. In stead of a dropout the audio
would sound as if someone kept hitts a "pause" button on a tape
recorder. A dropout sounds better then a delay of potentialy
several seconds

Almost all realtime meadia systems (telephony, video, possition
reporting and so on) maintain some kind of a buffer on the recieving
end. But you trad the buffer lenght for delay. Using UDP allows
the application to do the buffering where as TCP putting this buffing
functin in the operaing systems network code.
Post by Rich Adamson
Post by Rich Adamson
There's no reassembly with udp, and there is no sense of packets
arriving
Post by Rich Adamson
in the same order as what was sent. Udp is a best-effort
low-overhead way
Right, UDP itself does not care about order, but at the application
layer you
can keep track of it. You can design your application to buffer X
packets
and then reorder them according to sequence numbers.
Post by Rich Adamson
of transmitting data (with UDP often times referred to as the
Unreliable
Post by Rich Adamson
Data Protocol). Changing to TCP would allow reassembly, however the
overhead would be substantial.
------------------------
Post by Sean Cheesman
The problem occurs when the software is expecting the packet in a
certain
Post by Rich Adamson
Post by Sean Cheesman
timeframe so that it can reassemble it in a timely manner. It's
not a
Post by Rich Adamson
Post by Sean Cheesman
big deal with a web page or something along that lines. But when
a voice
Post by Rich Adamson
Post by Sean Cheesman
application cannot get reassembled in a timely manner, you'll
surely
Post by Rich Adamson
Post by Sean Cheesman
notice it!
-----Original Message-----
From: Joel Maslak
Sent: 12/23/2003 10:41 AM
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp
environment)
Post by Rich Adamson
Post by Sean Cheesman
there
Post by Rich Adamson
is no way to retransmit the missing/damaged packet. Missing one
packet
Post by Rich Adamson
Post by Sean Cheesman
isn't
Post by Rich Adamson
a big deal, but if you have collisions and/or dropped packets,
there
Post by Rich Adamson
Post by Sean Cheesman
is a
Post by Rich Adamson
very high probability that lots of packets will be dropped. If
too
Post by Rich Adamson
Post by Sean Cheesman
many
Post by Rich Adamson
are dropped, you'll hear the result in the undecoded voice as
choppy
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer
2
Post by Rich Adamson
Post by Sean Cheesman
hardware automatically resends packets involved in a collision -
layer 3
Post by Rich Adamson
Post by Sean Cheesman
is never aware of it happening (although it may cause additional
delay).
Post by Rich Adamson
Post by Sean Cheesman
Eventually the ethernet card will give up if too many collisions
occur
Post by Rich Adamson
Post by Sean Cheesman
during retries, but this is very rare in practice unless the
network is
Post by Rich Adamson
Post by Sean Cheesman
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex
10 meg
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
ethernet would handle roughly 20-25 rtp sessions before bumping
into
Post by Rich Adamson
Post by Sean Cheesman
the
Post by Rich Adamson
problem (your milage may vary). The majority of the folks on
this list
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
seem to be running home/soho systems and would likely never run
into
Post by Rich Adamson
Post by Sean Cheesman
the
Post by Rich Adamson
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100
Mb/sec
Post by Rich Adamson
Post by Sean Cheesman
link is half and the other is full, bandwidth is limited to about
8
Post by Rich Adamson
Post by Sean Cheesman
Mb/sec
max. This is based on some tests I've accidentally conducted.
If you
Post by Rich Adamson
Post by Sean Cheesman
try
to send 9 Mb/sec over that link, yes, some packets will get
dropped as
Post by Rich Adamson
Post by Sean Cheesman
they simply won't fit. (But I do agree that for a half-half
link, you
Post by Rich Adamson
Post by Sean Cheesman
can
get about 20 Mb/sec)
--
Joel
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
=====
Chris Albertson
Home: 310-376-1029 ***@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 ***@aero.org
KG6OMK

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
Rich Adamson
2003-12-24 01:04:48 UTC
Permalink
100% agree. I think this thread is getting strung out much further
then Olle's original question relative to commenting on half vs full
duplex.

Lots of great discussion though.... thanks to all that participated!

Rich

------------------------
Post by Chris Albertson
The reason you use UDP over TCP for realtime meadia is that
TCP's ability to reliably deliver every packet in order actually
sounds worse. Reason being is that with a UDP system a dropped
packet sounds like just a dropout but if you used TCP the audio
stream would be held up and delayed in a queue while that lost
packet was being retransmitted. In stead of a dropout the audio
would sound as if someone kept hitts a "pause" button on a tape
recorder. A dropout sounds better then a delay of potentialy
several seconds
Almost all realtime meadia systems (telephony, video, possition
reporting and so on) maintain some kind of a buffer on the recieving
end. But you trad the buffer lenght for delay. Using UDP allows
the application to do the buffering where as TCP putting this buffing
functin in the operaing systems network code.
Post by Rich Adamson
Post by Rich Adamson
There's no reassembly with udp, and there is no sense of packets
arriving
Post by Rich Adamson
in the same order as what was sent. Udp is a best-effort
low-overhead way
Right, UDP itself does not care about order, but at the application
layer you
can keep track of it. You can design your application to buffer X
packets
and then reorder them according to sequence numbers.
Post by Rich Adamson
of transmitting data (with UDP often times referred to as the
Unreliable
Post by Rich Adamson
Data Protocol). Changing to TCP would allow reassembly, however the
overhead would be substantial.
------------------------
Post by Sean Cheesman
The problem occurs when the software is expecting the packet in a
certain
Post by Rich Adamson
Post by Sean Cheesman
timeframe so that it can reassemble it in a timely manner. It's
not a
Post by Rich Adamson
Post by Sean Cheesman
big deal with a web page or something along that lines. But when
a voice
Post by Rich Adamson
Post by Sean Cheesman
application cannot get reassembled in a timely manner, you'll
surely
Post by Rich Adamson
Post by Sean Cheesman
notice it!
-----Original Message-----
From: Joel Maslak
Sent: 12/23/2003 10:41 AM
Subject: Re: [Asterisk-Users] Asterisk SIP Packet Time (20ms)
Post by Rich Adamson
If a collision or dropped packet occurs (in a voip udp
environment)
Post by Rich Adamson
Post by Sean Cheesman
there
Post by Rich Adamson
is no way to retransmit the missing/damaged packet. Missing one
packet
Post by Rich Adamson
Post by Sean Cheesman
isn't
Post by Rich Adamson
a big deal, but if you have collisions and/or dropped packets,
there
Post by Rich Adamson
Post by Sean Cheesman
is a
Post by Rich Adamson
very high probability that lots of packets will be dropped. If
too
Post by Rich Adamson
Post by Sean Cheesman
many
Post by Rich Adamson
are dropped, you'll hear the result in the undecoded voice as
choppy
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
voice.
Actually, collisions occur at Layer 2, not Layer 3, and the layer
2
Post by Rich Adamson
Post by Sean Cheesman
hardware automatically resends packets involved in a collision -
layer 3
Post by Rich Adamson
Post by Sean Cheesman
is never aware of it happening (although it may cause additional
delay).
Post by Rich Adamson
Post by Sean Cheesman
Eventually the ethernet card will give up if too many collisions
occur
Post by Rich Adamson
Post by Sean Cheesman
during retries, but this is very rare in practice unless the
network is
Post by Rich Adamson
Post by Sean Cheesman
*VERY* loaded.
Post by Rich Adamson
Assuming alaw/ulaw codecs in use (about 80k bps), a half duplex
10 meg
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
ethernet would handle roughly 20-25 rtp sessions before bumping
into
Post by Rich Adamson
Post by Sean Cheesman
the
Post by Rich Adamson
problem (your milage may vary). The majority of the folks on
this list
Post by Rich Adamson
Post by Sean Cheesman
Post by Rich Adamson
seem to be running home/soho systems and would likely never run
into
Post by Rich Adamson
Post by Sean Cheesman
the
Post by Rich Adamson
issue. But the heavier users will.
For a duplex mismatch, my experience is that if one end on a 100
Mb/sec
Post by Rich Adamson
Post by Sean Cheesman
link is half and the other is full, bandwidth is limited to about
8
Post by Rich Adamson
Post by Sean Cheesman
Mb/sec
max. This is based on some tests I've accidentally conducted.
If you
Post by Rich Adamson
Post by Sean Cheesman
try
to send 9 Mb/sec over that link, yes, some packets will get
dropped as
Post by Rich Adamson
Post by Sean Cheesman
they simply won't fit. (But I do agree that for a half-half
link, you
Post by Rich Adamson
Post by Sean Cheesman
can
get about 20 Mb/sec)
--
Joel
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
=====
Chris Albertson
Cell: 310-990-7550
KG6OMK
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
---------------End of Original Message-----------------

Loading...