[Home]

Summary:ASTERISK-26339: asterisk change the codec of inbound channel when bridge to another channel.
Reporter:Aaron An (aaron)Labels:
Date Opened:2016-09-06 01:30:02Date Closed:2016-09-09 00:43:53
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.8.0 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-26317 res_pjsip_session: Add ability to use preferred codec only
Environment:CentOS6.5x64Attachments:( 0) 4.cap
( 1) debug_log_26339
( 2) snapshot.png
Description:think about this scenario.
Alice call in asterisk. Asterisk dialplan answer Alice and then playback "welcome and wait to dial Bob", then dialplan dial Bob. When Bob answer the call and bridge to Alice, the codec of Alice channel read/write direction are not same.
something like this:
{noformat}
Alice========Asteriks==========Bob
-----G729---------->answer
<----G729-----------playback
                            dial
                                    ----------ulaw-------->
                                   <--------ulaw---------
--------G729-------->bridged
<---------ulaw-------
{noformat}

this scenario will cause oneway voice on Dialogic Gateway.
Comments:By: Asterisk Team (asteriskteam) 2016-09-06 01:30:03.214-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Aaron An (aaron) 2016-09-06 01:33:36.219-0500

I have review the code of asterisk codec negotiation. It seems that this situation is by design. asterisk change the codec sent to gateway from g729 to ulaw after ib call established. But our Dialogic gateway not support it, how to avoid it?

By: Joshua C. Colp (jcolp) 2016-09-06 05:14:08.241-0500

Thanks for the report and debug. However we also need protocol specific debug captured at the time of the issue. Please include the following:

* Asterisk log files generated using the instructions on the Asterisk wiki [1], with the appropriate protocol debug options enabled, e.g. 'pjsip set logger on' if the issue involves the chan_pjsip channel driver.
* Configuration information for the relevant channel driver, e.g. pjsip.conf.
* A wireshark compatible packet capture, captured at the same time as the Asterisk log output.

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Aaron An (aaron) 2016-09-06 20:55:28.695-0500

endpoint "sip-proxy" has config codec allow="729,alaw,ulaw"。
endpoint "test" has config codec allow="alaw,ulaw"

By: Richard Mudgett (rmudgett) 2016-09-08 13:13:05.307-0500

There is no negotiation problem shown in the packet capture.  The caller says he can do g729, ulaw, and alaw.  Asterisk says OK to all three codecs.  No reINVITE is necessary to switch between the negotiated codecs since the codecs are distinguished by the RTP patyload type values negotiated.

This is really a problem with the caller when it cannot handle receiving RTP payload types other than the first in the response.

ASTERISK-26317 Works around the limitation of the caller in this issue by supplying a patch adding a configuration option.

By: Aaron An (aaron) 2016-09-09 00:43:33.197-0500

Thank you for the clarification. You are right, it is a problem of the caller.