Subject: [Megaco] Question on echo control direction

From: "Soncodi, Adrian" <[email-masked]>
Date: Wed, 17 Mar 2004 17:50:34 -0600

Hi,

When an MCG turns on echo control for a TDM termination on the MG, which one of the following audio streams becomes "clean" of echo:
a) The stream from the termination outwards to the TDM facility, or
b) The stream from the termination inwards into the context (presumably going out on another facility associated with another termination in the context)
(I am assuming that only a half-echo canceller is inserted, because most of the MGs can only do that. The other half would be on the other termination.)

Where is this specified? the TDM package in H.248 annex E does not say.

Thanks,

Adrian

_______________________________________________
Megaco mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/megaco

---

From: "Kevin Boyle" <[email-masked]>
Date: Wed, 17 Mar 2004 19:12:21 -0500

Ecan generally applies to the network transition point to avoid reflections
off the transition.  Therefore, it would make sense that the echo canceller
on the TDM termination would cancel echo outwards toward the TDM facility.

I cannot find anything that specifies this, but I don't know why someone
would use an echo canceller to cancel echo inside the context... Why not
just fix the DSP to not introduce the echo in the first place?  You don't
generally find echo on the transition from TDM<->packet.

Kevin

-----Original Message-----
From: Soncodi, Adrian [mailto:[email-masked]] 
Sent: Wednesday, March 17, 2004 6:51 PM
To: [email-masked]
Subject: [Megaco] Question on echo control direction

Hi,

When an MCG turns on echo control for a TDM termination on the MG, which one
of the following audio streams becomes "clean" of echo:
a) The stream from the termination outwards to the TDM facility, or
b) The stream from the termination inwards into the context (presumably
going out on another facility associated with another termination in the
context) (I am assuming that only a half-echo canceller is inserted, because
most of the MGs can only do that. The other half would be on the other
termination.)

Thanks,

Adrian

---

From: "Kevin Boyle" <[email-masked]>
Date: Wed, 17 Mar 2004 19:12:21 -0500

Kevin

-----Original Message-----
From: Soncodi, Adrian [mailto:[email-masked]] 
Sent: Wednesday, March 17, 2004 6:51 PM
To: [email-masked]
Subject: [Megaco] Question on echo control direction

Hi,

Thanks,

Adrian

---

From: "Soncodi, Adrian" <[email-masked]>
Date: Thu, 18 Mar 2004 11:13:14 -0600

Kevin,
 
In your message you say:
 "I cannot find anything that specifies this, but I don't know why someone would use an echo canceller to cancel echo inside the context... Why not just fix the DSP to not introduce the echo in the first place?  You don't generally find echo on the transition from TDM<->packet."

Actually, it's not the DSP that introduces echo. It's the 4-wire to 2-wire conversion beyond the TDM termination. So for a TDM-packet-TDM call, we have the following:
 
- Typically, echo is cancelled at both ends of the call. Originating and terminating switch each cancel in different directions.
 
- For an echo device to cancel in one direction, it has to take the other path as reference, wait for the signal to turn around from the user, and then compare the two and clean the echo. This involves a delay buffer (echo tail), typically up to 64 ms, sometimes up to 128 ms (I don't know of MGs that can do more).
 
- As a consequence, each switch typically cancels echo over the short path. For a TDM-packet-TDM call, the short path is usually the TDM, while the long path is the packet network plus the other TDM. If you wait for the signal to turn around on the packet side, many times the delay is bigger than the buffer size and the EC device becomes ineffective.
 
- Consider two MG-s interconnected by a packet network. If these were traditional TDM switches, each one would clean the stream going towards the other (for example, the echo indications in ISUP IAM/ACM are designed to achieve this result). This corresponds to the direction into the packet network.
 
- Another reason to clean the stream into the packet network is that if the stream has echo, then the encoding/decoding performed by some compression algorithms results in lower quality voice (i.e. some algorithms are optimized for "clean" voice).
 
- A solution for this would be to turn echo control on the packet-side terminations. Then if these terminations work like you say they should, the desired result would be achieved. Unfortunately, all the MGs I know cannot do this. They can only apply a half EC device on the TDM termination (probably because the package name is TDM)
 
- Another aspect: For a conference call with N TDM terminations in a context, in order cancel the echo generated by one TDM circuit it is simpler to clean its stream going into the context than the other N-1 going out of the context.
 
- Until now, I thought I knew the answer to this one. Although this does not seem to be clearly specified either in MGCP or in MEGACO, for all the MGs I've seen, if you turn on echo on a TDM termination they clear the stream going into the packet network. They reference the backwards stream to TDM, which is turned around over the short path. So it looks like most of the existing MGs do not work like you recommended -- people, correct me if I'm wrong here.
 
- However, recently I stumbled upon an MG that behaves exactly the opposite. So now I really have a problem, because there is no way for an MGC to know whether the ec property results in the insertion of a full EC device or a half device, and which direction.
 
- By analogy with signals (although ec is a propery not a signal), this should work as you said, i.e. towards the outside of the context. But if you would like to standardize this behavior, already a lot of MGs would be non-compliant (again, people?).
 
- There is also no way for an MGC to audit for this behavior. But if MGs were allowed to behave both ways, then you could have different MGs at the two ends and then of a TDM-packet-TDM call, and it becomes impossible to provide two-way echo cancellation.
 
So how do you propose we clarify all this?
 
Thanks,
 
Adrian

-----Original Message-----
From: Kevin Boyle [mailto:[email-masked]]
Sent: Wednesday, March 17, 2004 6:12 PM
To: Soncodi, Adrian; [email-masked]
Subject: RE: [Megaco] Question on echo control direction

Ecan generally applies to the network transition point to avoid reflections off the transition.  Therefore, it would make sense that the echo canceller on the TDM termination would cancel echo outwards toward the TDM facility.

I cannot find anything that specifies this, but I don't know why someone would use an echo canceller to cancel echo inside the context... Why not just fix the DSP to not introduce the echo in the first place?  You don't generally find echo on the transition from TDM<->packet.

Kevin 

-----Original Message----- 
From: Soncodi, Adrian [ mailto:[email-masked]] 
Sent: Wednesday, March 17, 2004 6:51 PM 
To: [email-masked] 
Subject: [Megaco] Question on echo control direction 

Hi, 

a) The stream from the termination outwards to the TDM facility, or 
b) The stream from the termination inwards into the context (presumably going out on another facility associated with another termination in the context) (I am assuming that only a half-echo canceller is inserted, because most of the MGs can only do that. The other half would be on the other termination.)

Thanks, 

Adrian

---

From: "Soncodi, Adrian" <[email-masked]>
Date: Thu, 18 Mar 2004 11:13:14 -0600

Kevin,
 
In your message you say:

 

 

 

 

Thanks,
 
Adrian

-----Original Message-----
From: Kevin Boyle [mailto:[email-masked]]
Sent: Wednesday, March 17, 2004 6:12 PM
To: Soncodi, Adrian; [email-masked]
Subject: RE: [Megaco] Question on echo control direction

Kevin 

-----Original Message----- 
From: Soncodi, Adrian [ mailto:[email-masked]] 
Sent: Wednesday, March 17, 2004 6:51 PM 
To: [email-masked] 
Subject: [Megaco] Question on echo control direction 

Hi, 

Thanks, 

Adrian

---

From: [email-masked]
Date: Fri, 19 Mar 2004 10:06:28 +0100

Adrian,
I couldn't find any contradiction between Kevin's and your statements.

My understanding is that the "basic" EC settings for circuit-to-packet MGs,
where the POTS/ISDN terminal is accessed via a circuit-switched network,
are:
- near-end EC, and
- half way only ("I don't know the exact G.168 terminology").

I think that this common understanding may be derived from legacy PSTN/ISDN
networks.
Any EC requirement in addition, e.g., like
- far-end EC,
- 2 near-end "H.248 TDM Terminations" (in a TDM-to-TDM call), and/or
- full way
must be signalled correspondingly.

My impression is that the "basic settings" are sufficient for almost all
cases. The additional EC capabilities are valid network scenarios (e.g.,
inter-operater interworking, replacement of an international exchange,
tandem echo cancellation, two satellite links in the TDM-to-TDM call
scenario, missing near-end EC capability in peer MG, etc), but rather
exeptional cases (like in pre-NGN TDM networks).

Regards,
Albrecht

                      "Soncodi, Adrian"                                                                                                              
                      <Adrian.Soncodi@t         To:      "Kevin Boyle" <[email-masked]>, <[email-masked]>                                
                      ekelec.com>               cc:                                                                                                  
                      Sent by:                  Subject: RE: [Megaco] Question on echo control direction                                             
                      megaco-admin@ietf                                                                                                              
                      .org                                                                                                                           

                      18.03.2004 18:13                                                                                                               

Kevin,

In your message you say:

 "I cannot find anything that specifies this, but I don't know why someone
would use an echo canceller to cancel echo inside the context... Why not
just fix the DSP to not introduce the echo in the first place?  You don't
generally find echo on the transition from TDM<->packet."

Actually, it's not the DSP that introduces echo. It's the 4-wire to 2-wire
conversion beyond the TDM termination. So for a TDM-packet-TDM call, we
have the following:

- Typically, echo is cancelled at both ends of the call. Originating and
terminating switch each cancel in different directions.

- For an echo device to cancel in one direction, it has to take the other
path as reference, wait for the signal to turn around from the user, and
then compare the two and clean the echo. This involves a delay buffer (echo
tail), typically up to 64 ms, sometimes up to 128 ms (I don't know of MGs
that can do more).

- As a consequence, each switch typically cancels echo over the short path.
For a TDM-packet-TDM call, the short path is usually the TDM, while the
long path is the packet network plus the other TDM. If you wait for the
signal to turn around on the packet side, many times the delay is bigger
than the buffer size and the EC device becomes ineffective.

- Consider two MG-s interconnected by a packet network. If these were
traditional TDM switches, each one would clean the stream going towards the
other (for example, the echo indications in ISUP IAM/ACM are designed to
achieve this result). This corresponds to the direction into the packet
network.

- Another reason to clean the stream into the packet network is that if the
stream has echo, then the encoding/decoding performed by some compression
algorithms results in lower quality voice (i.e. some algorithms are
optimized for "clean" voice).

- A solution for this would be to turn echo control on the packet-side
terminations. Then if these terminations work like you say they should, the
desired result would be achieved. Unfortunately, all the MGs I know cannot
do this. They can only apply a half EC device on the TDM termination
(probably because the package name is TDM)

- Another aspect: For a conference call with N TDM terminations in a
context, in order cancel the echo generated by one TDM circuit it is
simpler to clean its stream going into the context than the other N-1 going
out of the context.

- Until now, I thought I knew the answer to this one. Although this does
not seem to be clearly specified either in MGCP or in MEGACO, for all the
MGs I've seen, if you turn on echo on a TDM termination they clear the
stream going into the packet network. They reference the backwards stream
to TDM, which is turned around over the short path. So it looks like most
of the existing MGs do not work like you recommended -- people, correct me
if I'm wrong here.

- However, recently I stumbled upon an MG that behaves exactly the
opposite. So now I really have a problem, because there is no way for an
MGC to know whether the ec property results in the insertion of a full EC
device or a half device, and which direction.

- By analogy with signals (although ec is a propery not a signal), this
should work as you said, i.e. towards the outside of the context. But if
you would like to standardize this behavior, already a lot of MGs would be
non-compliant (again, people?).

- There is also no way for an MGC to audit for this behavior. But if MGs
were allowed to behave both ways, then you could have different MGs at the
two ends and then of a TDM-packet-TDM call, and it becomes impossible to
provide two-way echo cancellation.

Thanks,

Adrian

      -----Original Message-----
      From: Kevin Boyle [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:12 PM
      To: Soncodi, Adrian; [email-masked]
      Subject: RE: [Megaco] Question on echo control direction

      Ecan generally applies to the network transition point to avoid
      reflections off the transition.  Therefore, it would make sense that
      the echo canceller on the TDM termination would cancel echo outwards
      toward the TDM facility.

      I cannot find anything that specifies this, but I don't know why
      someone would use an echo canceller to cancel echo inside the
      context... Why not just fix the DSP to not introduce the echo in the
      first place?  You don't generally find echo on the transition from
      TDM<->packet.

      Kevin

      -----Original Message-----
      From: Soncodi, Adrian [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:51 PM
      To: [email-masked]
      Subject: [Megaco] Question on echo control direction

      Hi,

      When an MCG turns on echo control for a TDM termination on the MG,
      which one of the following audio streams becomes "clean" of echo:

      a) The stream from the termination outwards to the TDM facility, or
      b) The stream from the termination inwards into the context
      (presumably going out on another facility associated with another
      termination in the context) (I am assuming that only a half-echo
      canceller is inserted, because most of the MGs can only do that. The
      other half would be on the other termination.)

      Where is this specified? the TDM package in H.248 annex E does not
      say.

      Thanks,

      Adrian

---

From: [email-masked]
Date: Fri, 19 Mar 2004 10:06:28 +0100

Adrian,

Regards,
Albrecht

                      "Soncodi, Adrian"                                                                                                              

                      18.03.2004 18:13                                                                                                               

Kevin,

In your message you say:

Thanks,

Adrian

      -----Original Message-----
      From: Kevin Boyle [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:12 PM
      To: Soncodi, Adrian; [email-masked]
      Subject: RE: [Megaco] Question on echo control direction

      Kevin

      -----Original Message-----
      From: Soncodi, Adrian [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:51 PM
      To: [email-masked]
      Subject: [Megaco] Question on echo control direction

      Hi,

      Thanks,

      Adrian

---

From: "Soncodi, Adrian" <[email-masked]>
Date: Fri, 19 Mar 2004 11:46:37 -0600

Albrecht,

Let's say both switches perform near-end, half way EC as you suggest. Then the question is: what do you mean by "near-end half way EC"? Is it:
a) Cancelling echo towards the near-end user, so that he does not hear echo? or
b) Cancelling echo generated by the near end, so that the far end user does not hear echo?

In other words, which one happens when the MGC instructs the MG to turn EC on? I'm not saying it should be one or another, I'm saying that the H.248 standard should specify it, because it matters.

Kevin says it should be a). I just point out that most of the MGs today do b). And I found one MG that does a). So if MGCs follow the ISUP procedures to turn EC on at both ends using b), they may have the surprise that some EC devices are "flipped over", and thus they become ineffective as they work over the long path. Or, instead of being complementary, both EC devices cancel in the same direction ... you see the problem.

I don't quite understand the rest of you e-mail. What do you mean by "Any EC requirement in addition ... must be signalled correspondingly." Signaled where? in H.248 you only have one ec property.

Are you suggesting that the MGC just signals "ec=on", and then the exact behavior of the MG (i.e. the direction of the half-way EC device etc.) depends on the local MG provisioning? This could be a solution, but even so, the H.248 standard should make it clear. And the MGC would still have to know what is the case in order to properly implement two-way echo control procedures.

To conclude, I'm still trying to find out what the MG's expected behavior is. See my long e-mail for pros and cons of a) and b). But I believe if we don't clarify it, there will be interop problems.

Adrian

-----Original Message-----
From: [email-masked] [mailto:[email-masked]]
Sent: Friday, March 19, 2004 3:06 AM
To: Soncodi, Adrian
Cc: Kevin Boyle; [email-masked]; [email-masked]
Subject: RE: [Megaco] Question on echo control direction

Adrian,

Regards,
Albrecht

                      "Soncodi, Adrian"                                                                                                              

                      18.03.2004 18:13                                                                                                               

Kevin,

In your message you say:

Thanks,

Adrian

      -----Original Message-----
      From: Kevin Boyle [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:12 PM
      To: Soncodi, Adrian; [email-masked]
      Subject: RE: [Megaco] Question on echo control direction

      Kevin

      -----Original Message-----
      From: Soncodi, Adrian [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:51 PM
      To: [email-masked]
      Subject: [Megaco] Question on echo control direction

      Hi,

      Thanks,

      Adrian

---

From: "Soncodi, Adrian" <[email-masked]>
Date: Fri, 19 Mar 2004 11:46:37 -0600

Albrecht,

Adrian

-----Original Message-----
From: [email-masked] [mailto:[email-masked]]
Sent: Friday, March 19, 2004 3:06 AM
To: Soncodi, Adrian
Cc: Kevin Boyle; [email-masked]; [email-masked]
Subject: RE: [Megaco] Question on echo control direction

Adrian,

Regards,
Albrecht

                      "Soncodi, Adrian"                                                                                                              

                      18.03.2004 18:13                                                                                                               

Kevin,

In your message you say:

Thanks,

Adrian

      -----Original Message-----
      From: Kevin Boyle [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:12 PM
      To: Soncodi, Adrian; [email-masked]
      Subject: RE: [Megaco] Question on echo control direction

      Kevin

      -----Original Message-----
      From: Soncodi, Adrian [mailto:[email-masked]]
      Sent: Wednesday, March 17, 2004 6:51 PM
      To: [email-masked]
      Subject: [Megaco] Question on echo control direction

      Hi,

      Thanks,

      Adrian