>BTW, can someone explain to a libart major like me (;-)) where echo comes on in a telephone conversation? I seem to recall it's due to the length of the line between the CO and the local party, but I'm not sure.
Yes, I'll tackle that. It takes a finite amount of time for the electrical signal originating in one phone to arrive at another phone over whatever path it is taking. If the path is copper, that time can be fairly small. If the path is satellite, the time will have to exceed the 1/4 second round trip to the bird. If there are SIP packets involved, the time must be larger than twice the packet size because of the time taken to collect the data in the packet and then to serialize it at the other and after it arrives. If the path involves the internet, there is the path delay there to be added in (ping will give you an idea of what that is, but it can often be 50 - 200 ms). All of this constitutes a delay. It can be a bit annoying in its own right because one person asks a question, and twice the delay time elapses before they start hearing the answer. However, if there are POTS analog circuits involved anywhere, a second factor comes into play. A POTS analog circuit is two wires, which carry an electrical representation of sound. Both sides of the conversation are carried over the same wire. (its called a 2 wire circuit. There are also four wire circuits where each direction travels on a separate pair of wires. They don't have echo problems. Digital circuits also have separate paths for each direction, so are immune to echo) The problem with a two wire circuit is how to separate the sound going in both directions. That is done by something called a 2 wire to 4 wire converter, also commonly known as a hybrid. It basically works by subtracting out what it knows is being sent at the near end from what it sees on the wire. If that subtraction is perfect, only what came from the other end is left and that is presented to the listener. In the real world, this isn't perfectly possible, but it can be done fairly well. However, there is a side effect that comes with the transition from two wire to four wire. Some of the signal originating at one end of the wire gets to the other end and is reflected back. For an analogy, tie the end of a long rope to a pipe, stretch it out and snap the other end. You will see a wave travel to the pipe and then come back. If you were able to attach the rope to the pipe with a suitable dashpot or something that would fully absorb the wave, nothing would come back. This reflection from the other end is the cause of echo. If the path is terminated in exactly the correct impedance, there would be no echo. However, for real circuits over the range of frequencies that make up sound, that impedance is a complex quantity, and cannot be exactly matched. The bottom line is that any circuit with one or more 2 wire analog portions is going to have some echo. Since most of the circuits provided by a phone company are POTS, they are two wire analog from the subscriber to the CO. If the subscriber equipment is Asterisk, then a 2 wire to 4 wire conversion and digitization takes place there. Likewise virtually all telco links are digital and a conversion takes place in the switch in the CO. Then at the other end the process is repeated. That makes a total of 4 interfaces where echo can originate in a typical phone call. If part of the call is SIP, or internet or satellite, the delay is large enough to guarantee it will be noticeable. Since there are several interfaces there can be several echoes. Another example that illustrates the concept is a speaker phone. If the person on the other end is using a speakerphone, then some of what you say comes out of the speakerphone, bounces off the walls of the room, gets picked up in the mic and comes back to you. Again, if the delay is very large, it will be an echo by the time it gets back to you. Speakerphones (if they are full duplex--i.e. allow both parties to talk at once) have to have echo cancellers to prevent this from happening. >Is there a way to keep track of this issue, and overtime, to configure it to answer a call by expecting such and such echo, and thus, avoid starting sampling from scratch every time? Unfortunately not. If you've followed the discussion to this point, you understand that the magnitude (loudness) of the echo depends on the impedance mismatch which is unique to the circuitry at each end (for a typical call) of the call. The delay time is unique to the call path, which is likely different for each call, and in the case of internet calls, can vary within the call. The echo canceller must constantly do pattern matching to recognize changes and adjust for them. Its job is to subtracting out a signal of exactly the same amplitude as the echo, but of the opposite polarity and delayed by exactly the path delay the echo is travelling through. Since there can easily be four or more echos, the math gets even messier. Wilton _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
