[Home]

Summary:ASTERISK-05760: Problem negotiating mid-call codecs between two gateways having * in the loop
Reporter:luisbe (luisbe)Labels:
Date Opened:2005-12-02 08:17:11.000-0600Date Closed:2006-01-26 12:57:00.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) fax_trace.txt
( 1) traza_fax
Description:This is the scenario: GW1 -> * -> GW2, Prefered codec g.729 is supported in the three of them.
Once the call is connected, GW2 detects a fax tone and tries to fallback to g711, Asterisk propagates this INVITE to GW1 correctly but responds to GW2 with an OK having codec g729 on it (packet ASTERISK-16 on ethereal). Asterisk allways send in this OK the first codec that GW1 sent as prefered codec in the first INVITE (packet #1 on ethereal)


****** ADDITIONAL INFORMATION ******

I am attaching two files:
traza_fax: this is an ethereal trace
fax_trace.txt output of sip debug in asterisk
Comments:By: Olle Johansson (oej) 2005-12-02 10:23:19.000-0600

Ok, this is clearly a bug. We get a re-invite with *only* G711 as an option and happily answer "G.729 and G.711"...

By: Olle Johansson (oej) 2005-12-02 10:24:39.000-0600

From the debug:
--------------
Capabilities: us - 0x108 (alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
We're at 192.168.7.3 port 15706
Adding codec 0x100 (g729) to SDP
Adding codec 0x8 (alaw) to SDP
---------------
Combined - only alaw. Regardless, we're adding g729 to SDP.

By: Mark Spencer (markster) 2005-12-02 15:07:07.000-0600

Actually this isn't a bug, it's a behavioral issue....  We're not supposed to respond *only* with what's common, we're supposed to say *everything* we support.  *They* are selecting to use G.729 even though we clearly agree to support alaw.  What is needed is some way to tell asterisk to go with what the *calling* party wants, not what *we* want.  Specifically, the codecpriority option from iax could be ported to sip.

By: Andrew Lindh (andrew) 2005-12-02 22:15:24.000-0600

It would be nice to have an option that would try to limit transcoding. This option would limit the codecs offered by asterisk so the system has to do the least amount of work (but can still be in the audio path). This would also have the affect of offering only codecs in common to both parties that will work end-to-end and in this case would solve the issue.

It might be a good idea to have several levels, ie. offerall, offerlowcost, offercommon, offercaller, offercalled... this is somewhat related to the sip allow/disallow but would be more of a dynamic system wide feature...

By: Olle Johansson (oej) 2006-01-03 12:35:15.000-0600

Seems like this issue report turned into a feature request. Will close this shortly if no patch turns up. If it does, we can always re-open.

By: Andrew Lindh (andrew) 2006-01-04 10:24:05.000-0600

This seems to be related to bug 0004825 which is how best to choose the correct codec between two end points...not exactly a fix for this, but it is work on the behavior of codec sellection.

By: Olle Johansson (oej) 2006-01-26 12:56:59.000-0600

Closing this open issue as feature request. It will still be reachable in the archives.