[Home]

Summary:ASTERISK-28871: res_pjsip_session: Unnecessary re-Invite on call answer
Reporter:Alexei Gradinari (alexei gradinari)Labels:patch
Date Opened:2020-05-04 15:46:17Date Closed:2020-05-21 10:36:09
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Resources/res_pjsip_session
Versions:16.10.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast_16_10_test540.txt
( 1) ast16_9_test540.txt
( 2) ast16-10-sip-flow.png
( 3) ast16-9-sip-flow.png
( 4) ASTERISK-28871.diff
( 5) extensions.conf
( 6) pjsip.conf
Description:Asterisk version 16.10
Asterisk sends INVITE to PJSIP endpoint with the list of 3 codecs.
Endpoint answers with one codec.
Asterisk immediately sends re-Invite to endpoint with the list of 3 codecs.
Endpoint replies 200 OK
RTP traffic.

Asterisk version 16.9
Asterisk sends INVITE to PJSIP endpoint with the list of 3 codecs.
Endpoint answers with one codec.
RTP traffic.

The re-Invite is unwanted in this case.
Comments:By: Asterisk Team (asteriskteam) 2020-05-04 15:46:19.104-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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Alexei Gradinari (alexei gradinari) 2020-05-04 15:47:37.807-0500

ast16-9-sip-flow.png - SIP flow, asterisk version 16.9
ast16-10-sip-flow.png - SIP flow, asterisk version 16.10

By: Joshua C. Colp (jcolp) 2020-05-04 15:51:31.540-0500

What is the actual configuration for both sides, and what is the SIP traces for both sides?

By: Alexei Gradinari (alexei gradinari) 2020-05-04 16:13:17.738-0500

Asterisk version 16.10, if only one codec is allowed then there is not re-Invite.

I think it's related to
https://gerrit.asterisk.org/c/testsuite/+/14359
pjsip/resolver: Limit codec usage to ulaw.

Something was changed in version 16.10 and it broke these tests.


By: Alexei Gradinari (alexei gradinari) 2020-05-04 17:21:02.071-0500

ast16_9_test540.txt - SIP trace (asterisk 16.9)
ast16_10_test540.txt - SIP trace (asterisk 16.10)
extensions.conf  - context for test540
pjsip.conf - test540 and test555 endpoints configuration.

Scenario
test540 calls 555
asterisk plays ring tone
asterisk places call to test555



By: Joshua C. Colp (jcolp) 2020-05-18 09:09:18.109-0500

Please try the attached patch. This returns the behavior to that of past versions. Improved codec negotiation is occurring for Asterisk 18, and this functionality could be revisited then to be improved.

By: Alexei Gradinari (alexei gradinari) 2020-05-19 15:52:04.828-0500

I've checked only on test server with test calls.
The weren't the re-Invites on call answer with the patch ASTERISK-28871.diff.

I haven't checked on production server yet.


By: Friendly Automation (friendly-automation) 2020-05-21 10:36:10.458-0500

Change 14440 merged by Friendly Automation:
bridge: Don't try to match audio formats.

[https://gerrit.asterisk.org/c/asterisk/+/14440|https://gerrit.asterisk.org/c/asterisk/+/14440]

By: Friendly Automation (friendly-automation) 2020-05-21 10:38:20.539-0500

Change 14439 merged by Joshua Colp:
bridge: Don't try to match audio formats.

[https://gerrit.asterisk.org/c/asterisk/+/14439|https://gerrit.asterisk.org/c/asterisk/+/14439]

By: Friendly Automation (friendly-automation) 2020-05-21 10:38:41.920-0500

Change 14420 merged by Joshua Colp:
bridge: Don't try to match audio formats.

[https://gerrit.asterisk.org/c/asterisk/+/14420|https://gerrit.asterisk.org/c/asterisk/+/14420]

By: Friendly Automation (friendly-automation) 2021-02-26 09:13:04.247-0600

Change 15444 merged by Joshua Colp:
bridge: Don't try to match audio formats.

[https://gerrit.asterisk.org/c/asterisk/+/15444|https://gerrit.asterisk.org/c/asterisk/+/15444]