Discussion:
[asterisk-users] Echo problem in VoIP-calls
Jonas Kellens
2010-06-30 08:28:00 UTC
Permalink
Hello list,

this is the setup :

analogue phone --> Grandstream GXW4008 --> Linksys WAG160N -->
Asterisk-server (public)
and
Zoiper softphone --> Linksys WAG160N --> Asterisk-server (public)


When calling with an analogue phone + Grandstream GXW and also when
calling with the Zoiper softphone, we experience echo on both calling
parties.

Because the echo is there with the analogue phone AND with the Zoiper, I
conclude that it is not the Grandstream GXW4008 gateway that is causing
the echo.

Could it be the router ???


These are the VoIP speed test results :

VoIP test statistics
--------------------
Jitter: you --> server: 4.2 ms
Jitter: server --> you: off
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: off
Packet discards: 0.0 %
Packets out of order: 0.0



Kind regards,

Jonas.
Gareth Blades
2010-06-30 09:06:25 UTC
Permalink
Post by Jonas Kellens
Hello list,
analogue phone --> Grandstream GXW4008 --> Linksys WAG160N -->
Asterisk-server (public)
and
Zoiper softphone --> Linksys WAG160N --> Asterisk-server (public)
When calling with an analogue phone + Grandstream GXW and also when
calling with the Zoiper softphone, we experience echo on both calling
parties.
Because the echo is there with the analogue phone AND with the Zoiper, I
conclude that it is not the Grandstream GXW4008 gateway that is causing
the echo.
Could it be the router ???
VoIP test statistics
--------------------
Jitter: you --> server: 4.2 ms
Jitter: server --> you: off
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: off
Packet discards: 0.0 %
Packets out of order: 0.0
Kind regards,
Jonas.
Echo cannot be caused by a router.
The zoipher softphone is probably being used with a headset and I
suspect the microphone is picking up the sounds from the earphones
resulting in echo. Try turning down the earphone volume to see if this
helps. If it does invest in some better headphone preferably ones where
the microphone has built in background noise cancelation.

For the analogue phone it could be a similar issue. Some phones are
better than others. Cant you use a proper SIP phone? They work so much
better.
Jonas Kellens
2010-06-30 09:28:06 UTC
Permalink
Hello,

I also thought about echo because the Zoiper softphone is used with a
headset. But that didn't explain why the echo also appeared on the
analogue phone + gateway.

I have the same Grandstream GXW 4008 gateway with 5 analoge phones
attached in another environment and there, there are no echo-problems.
Can't say the analogue phones that are being used there are top of the
bill, rather cheap stuff actually.

When calling through the analogue phone line, there is no echo (and it
seems therefore that the analogue phones that are being used meet the
quality standards).

The only network-element that is different in the 2 environments is the
router...



Jonas.
Post by Gareth Blades
Echo cannot be caused by a router.
The zoipher softphone is probably being used with a headset and I
suspect the microphone is picking up the sounds from the earphones
resulting in echo. Try turning down the earphone volume to see if this
helps. If it does invest in some better headphone preferably ones where
the microphone has built in background noise cancelation.
For the analogue phone it could be a similar issue. Some phones are
better than others. Cant you use a proper SIP phone? They work so much
better.
Gareth Blades
2010-06-30 09:36:51 UTC
Permalink
Routers wont cause echo. In order for them to do so they would have to
store the outbound voice traffic, delay it and then mix it into the
inbound voice.

Telephones inherently cause echo. For domestic calls the audio path is
normally so short that any echo arrives back so quick the human ear does
not detect it. For international calls the telco uses expensive echo
cancelation technology.
When you switch to voip you are often suddenly introducing a much larger
delay so any excho which was present before but not noticed suddenly
becomes noticable.

You need to analyse the audio path your calls are taking, where the
delays are being introduced and where echo cancelation is being applied.

You also havent stated which end of the conversation is hearing the echo.
Post by Jonas Kellens
Hello,
I also thought about echo because the Zoiper softphone is used with a
headset. But that didn't explain why the echo also appeared on the
analogue phone + gateway.
I have the same Grandstream GXW 4008 gateway with 5 analoge phones
attached in another environment and there, there are no echo-problems.
Can't say the analogue phones that are being used there are top of the
bill, rather cheap stuff actually.
When calling through the analogue phone line, there is no echo (and it
seems therefore that the analogue phones that are being used meet the
quality standards).
The only network-element that is different in the 2 environments is the
router...
Jonas.
Post by Gareth Blades
Echo cannot be caused by a router.
The zoipher softphone is probably being used with a headset and I
suspect the microphone is picking up the sounds from the earphones
resulting in echo. Try turning down the earphone volume to see if this
helps. If it does invest in some better headphone preferably ones where
the microphone has built in background noise cancelation.
For the analogue phone it could be a similar issue. Some phones are
better than others. Cant you use a proper SIP phone? They work so much
better.
Jonas Kellens
2010-06-30 10:04:36 UTC
Permalink
Hello,

I stated in my first post that both ends hear an echo when one speaks to
the other...

The only place where echo cancellation is being applied is in the
Asterisk server. I have the following in sip.conf :


;------------------------------ JITTER BUFFER CONFIGURATION
--------------------------
jbenable = yes ; Enables the use of a jitterbuffer on the
receiving side of a
; SIP channel. Defaults to "no". An
enabled jitterbuffer will
; be used only if the sending side can
create and the receiving
; side can not accept jitter. The SIP
channel can accept jitter,
; thus a jitterbuffer on the receive SIP
side will be used only
; if it is forced and enabled.

jbforce = no ; Forces the use of a jitterbuffer on the
receive side of a SIP
; channel. Defaults to "no".
;-----------------------------------------------------------------------------------


Thank you for your replies.

Kind regards.
Jonas.
Post by Gareth Blades
Routers wont cause echo. In order for them to do so they would have to
store the outbound voice traffic, delay it and then mix it into the
inbound voice.
Telephones inherently cause echo. For domestic calls the audio path is
normally so short that any echo arrives back so quick the human ear does
not detect it. For international calls the telco uses expensive echo
cancelation technology.
When you switch to voip you are often suddenly introducing a much larger
delay so any excho which was present before but not noticed suddenly
becomes noticable.
You need to analyse the audio path your calls are taking, where the
delays are being introduced and where echo cancelation is being applied.
You also havent stated which end of the conversation is hearing the echo.
Gareth Blades
2010-06-30 10:20:54 UTC
Permalink
Thats the jitter buffer. It has no effect on echo.

So you get echo when calling from the softphone to the analogue phone?
What about when one of those calls somewhere else?
What if they call a regular telephone number?
How do you connect in order to send calls to normal phone numbers?
Post by Jonas Kellens
Hello,
I stated in my first post that both ends hear an echo when one speaks to
the other...
The only place where echo cancellation is being applied is in the
;------------------------------ JITTER BUFFER CONFIGURATION
--------------------------
jbenable = yes ; Enables the use of a jitterbuffer on the
receiving side of a
; SIP channel. Defaults to "no". An
enabled jitterbuffer will
; be used only if the sending side can
create and the receiving
; side can not accept jitter. The SIP
channel can accept jitter,
; thus a jitterbuffer on the receive SIP
side will be used only
; if it is forced and enabled.
jbforce = no ; Forces the use of a jitterbuffer on the
receive side of a SIP
; channel. Defaults to "no".
;-----------------------------------------------------------------------------------
Thank you for your replies.
Kind regards.
Jonas.
Post by Gareth Blades
Routers wont cause echo. In order for them to do so they would have to
store the outbound voice traffic, delay it and then mix it into the
inbound voice.
Telephones inherently cause echo. For domestic calls the audio path is
normally so short that any echo arrives back so quick the human ear does
not detect it. For international calls the telco uses expensive echo
cancelation technology.
When you switch to voip you are often suddenly introducing a much larger
delay so any excho which was present before but not noticed suddenly
becomes noticable.
You need to analyse the audio path your calls are taking, where the
delays are being introduced and where echo cancelation is being applied.
You also havent stated which end of the conversation is hearing the echo.
Jonas Kellens
2010-06-30 12:43:42 UTC
Permalink
Post by Gareth Blades
So you get echo when calling from the softphone to the analogue phone?
Gareth Blades
2010-06-30 12:48:26 UTC
Permalink
Post by Gareth Blades
So you get echo when calling from the softphone to the analogue phone?
Jonas Kellens
2010-06-30 13:13:16 UTC
Permalink
Internet Telephony Service Provider = SIP provider. The company that
connects the Asterisk-server via a SIP trunk with the other networks
like GSM, analogue carriers...


Jonas.
By ITSP do you mean a SIP provider?
Gareth Blades
2010-06-30 13:52:26 UTC
Permalink
Post by Jonas Kellens
Internet Telephony Service Provider = SIP provider. The company that
connects the Asterisk-server via a SIP trunk with the other networks
like GSM, analogue carriers...
Jonas.
By ITSP do you mean a SIP provider?
Thats where I believe the problem lies. You are sending audio to them
and they are putting it onto the PSTN network. When the audio comes back
from the PSTN it has echo on it. They are not performing echo cancellation.
If it is an international call from the ITSP's perspective then teh
network operator should be performing echo cancelation anyway. If its a
national call then the telco doesnt perform echo cancelation but the
ITSP should do it themselves. The only time this is not needed is if the
phones have a very low delay to the ITSP but since this is normally not
the case echo cancelation must be performed at this point.
Jonas Kellens
2010-06-30 14:14:22 UTC
Permalink
Gareth,

multiple users/SIP-accounts use this asterisk server from many
locations. Like I said: in another location with a similar setup, there
are no echo-complaints on received or made calls.

If you say that it has nothing to do with the Cisco-router, I don't
really know what to go looking for...

I will take your advise and try with a SIP-phone (snom 320).

What do I do if :

1. I also have echo with a SIP-phone ?
2. I do not have echo with a SIP-phone ?


Jonas.
Post by Gareth Blades
Thats where I believe the problem lies. You are sending audio to them
and they are putting it onto the PSTN network. When the audio comes back
from the PSTN it has echo on it. They are not performing echo cancellation.
If it is an international call from the ITSP's perspective then teh
network operator should be performing echo cancelation anyway. If its a
national call then the telco doesnt perform echo cancelation but the
ITSP should do it themselves. The only time this is not needed is if the
phones have a very low delay to the ITSP but since this is normally not
the case echo cancelation must be performed at this point.
Gareth Blades
2010-06-30 14:24:44 UTC
Permalink
Try the SIP phone. If it is better then you might try looking to see if
there are any echo cancelation settings on the softphone or analogue
adapter you can change. Try turning echo cancelation off aswell since if
there are two running they can interfere with each other and make the
situation worse.

If you hear echo on that phone then it might be that the network
connection from that location has a higher latency making the echo far
more noticeable.
If the other party you are connecting to hears echo then this could be
down to the phone or the jitter buffer. If you start with a small jitter
buffer the echo cancelation will train to that but if you get increased
jitter the buffer will grow and add an additional delay to the audio.
Often echo cancelation only trains at the start of a call.
Maybe try disabling the jitter buffer.
Post by Jonas Kellens
Gareth,
multiple users/SIP-accounts use this asterisk server from many
locations. Like I said: in another location with a similar setup, there
are no echo-complaints on received or made calls.
If you say that it has nothing to do with the Cisco-router, I don't
really know what to go looking for...
I will take your advise and try with a SIP-phone (snom 320).
1. I also have echo with a SIP-phone ?
2. I do not have echo with a SIP-phone ?
Jonas.
Post by Gareth Blades
Thats where I believe the problem lies. You are sending audio to them
and they are putting it onto the PSTN network. When the audio comes back
from the PSTN it has echo on it. They are not performing echo cancellation.
If it is an international call from the ITSP's perspective then teh
network operator should be performing echo cancelation anyway. If its a
national call then the telco doesnt perform echo cancelation but the
ITSP should do it themselves. The only time this is not needed is if the
phones have a very low delay to the ITSP but since this is normally not
the case echo cancelation must be performed at this point.
Jonas Kellens
2010-06-30 14:49:52 UTC
Permalink
Will turning off the jitter buffer affect the quality of the other calls ??

jbenable = no

I must say I'm not really into these jitter-settings in asterisk. I made
jbenable=yes as "it can do no harm"...


Jonas.
Post by Gareth Blades
Try the SIP phone. If it is better then you might try looking to see if
there are any echo cancelation settings on the softphone or analogue
adapter you can change. Try turning echo cancelation off aswell since if
there are two running they can interfere with each other and make the
situation worse.
If you hear echo on that phone then it might be that the network
connection from that location has a higher latency making the echo far
more noticeable.
If the other party you are connecting to hears echo then this could be
down to the phone or the jitter buffer. If you start with a small jitter
buffer the echo cancelation will train to that but if you get increased
jitter the buffer will grow and add an additional delay to the audio.
Often echo cancelation only trains at the start of a call.
Maybe try disabling the jitter buffer.
Gareth Blades
2010-06-30 15:04:23 UTC
Permalink
Yes if you have a link where there is a lot of jitter it may affect the
call quality. I would try turning it off to see if it cures the problem
and if it does then you can restore the setting and implement a workaround.
Post by Jonas Kellens
Will turning off the jitter buffer affect the quality of the other calls ??
jbenable = no
I must say I'm not really into these jitter-settings in asterisk. I made
jbenable=yes as "it can do no harm"...
Jonas.
Post by Gareth Blades
Try the SIP phone. If it is better then you might try looking to see if
there are any echo cancelation settings on the softphone or analogue
adapter you can change. Try turning echo cancelation off aswell since if
there are two running they can interfere with each other and make the
situation worse.
If you hear echo on that phone then it might be that the network
connection from that location has a higher latency making the echo far
more noticeable.
If the other party you are connecting to hears echo then this could be
down to the phone or the jitter buffer. If you start with a small jitter
buffer the echo cancelation will train to that but if you get increased
jitter the buffer will grow and add an additional delay to the audio.
Often echo cancelation only trains at the start of a call.
Maybe try disabling the jitter buffer.
Jonas Kellens
2010-07-05 08:04:35 UTC
Permalink
Hello Gareth,

echo also appears when making calls with a SIP phone. These are outgoing
calls.

Another site now also gives feedback on echo, telling they sometimes
also have echo on outgoing calls and if they recall right then sometimes
also on incoming calls (coming from a queue).

This one site that now also gives feedback on echo has a fiber optic
internet connection, so I don't think the latency plays a role here.

I will now turn off the buffer in sip.conf and see how this goes...

I hope I can resolve this echo-problem.


Jonas.
Post by Gareth Blades
Try the SIP phone. If it is better then you might try looking to see if
there are any echo cancelation settings on the softphone or analogue
adapter you can change. Try turning echo cancelation off aswell since if
there are two running they can interfere with each other and make the
situation worse.
If you hear echo on that phone then it might be that the network
connection from that location has a higher latency making the echo far
more noticeable.
If the other party you are connecting to hears echo then this could be
down to the phone or the jitter buffer. If you start with a small jitter
buffer the echo cancelation will train to that but if you get increased
jitter the buffer will grow and add an additional delay to the audio.
Often echo cancelation only trains at the start of a call.
Maybe try disabling the jitter buffer.
Steve Howes
2010-06-30 13:17:20 UTC
Permalink
By ITSP do you mean a SIP provider?
ITSP: Internet Telephony Service Provider

S
Philipp von Klitzing
2010-06-30 13:20:14 UTC
Permalink
Hi!
analogue+GXW / softphone --> Linksys WAG160N --> Asterisk server --> ITSP
--> other networks
Do it step-by-step: Take the Asterisk server out of the equation, i.e.
call the destination directly with your softphone or the Grandstream ATA
and see if that removes the echo.

That fact that both sides are hearing echo is a bit unusual - especially
when calling a mobile destination things should be different. Check twice
that the analog devices in the setup are ok, and replace them for a test
if you can.

You could also test with a destination that is run by a different
operator (or is located in a different country).

Another test: Use the Echo() application on Asterisk and call it from
both sides.

Also: You could capture the traffic and look at it with Wireshark, the
delay/latency in particular.

Philipp

P.S.: I do think a jitter buffer matters for echo, simply because it
introduces an additional delay. However the Asterisk server should not
use its jitter buffer because jbforce is set to no and the Asterisk
server is not the final endpoint (it only sits in between).
dotnetdub
2010-06-30 09:38:23 UTC
Permalink
Post by Jonas Kellens
Hello,
I also thought about echo because the Zoiper softphone is used with a
headset. But that didn't explain why the echo also appeared on the analogue
phone + gateway.
It will present it self on the analogue phone when it is introduced in
Zoiper. As the orignal respondent said, routers dont introduce echo.
Jonas Kellens
2010-06-30 10:22:33 UTC
Permalink
Hello,

I did not say that the analogue phone calls the Zoiper softphone or vica
versa.

Calls are made to from the Zoiper to an external number like a cellphone.
Calls are also made from the analogue phone to external numbers like an
international number in Holland...


Jonas.
Post by Jonas Kellens
Hello,
I also thought about echo because the Zoiper softphone is used
with a headset. But that didn't explain why the echo also appeared
on the analogue phone + gateway.
It will present it self on the analogue phone when it is introduced in
Zoiper. As the orignal respondent said, routers dont introduce echo.
Danny Nicholas
2010-06-30 14:54:23 UTC
Permalink
The "harm" in any of these settings is environmentally controlled. What
"does no harm" in one setup can be a deal breaker on a smaller machine or
slightly different technology. How harmful or harmless jbenable is depends
on your hardware and what your other settings are.



_____

From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Jonas Kellens
Sent: Wednesday, June 30, 2010 9:50 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Echo problem in VoIP-calls



Will turning off the jitter buffer affect the quality of the other calls ??

jbenable = no

I must say I'm not really into these jitter-settings in asterisk. I made
jbenable=yes as "it can do no harm"...


Jonas.


On 06/30/2010 04:24 PM, Gareth Blades wrote:

Try the SIP phone. If it is better then you might try looking to see if
there are any echo cancelation settings on the softphone or analogue
adapter you can change. Try turning echo cancelation off aswell since if
there are two running they can interfere with each other and make the
situation worse.

If you hear echo on that phone then it might be that the network
connection from that location has a higher latency making the echo far
more noticeable.
If the other party you are connecting to hears echo then this could be
down to the phone or the jitter buffer. If you start with a small jitter
buffer the echo cancelation will train to that but if you get increased
jitter the buffer will grow and add an additional delay to the audio.
Often echo cancelation only trains at the start of a call.
Maybe try disabling the jitter buffer.
Continue reading on narkive:
Loading...