[Home]

Summary:ASTERISK-29109: res_pjsip_session: Asterisk 18 does not progress calls due to codec negotiation after upgrading from Asterisk 16
Reporter:Ross Beer (rossbeer)Labels:
Date Opened:2020-10-06 08:10:06Date Closed:2020-10-13 11:15:42
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_session
Versions:18.0.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 7Attachments:
Description:If you have a phone using an endpoint only allowing 'g722' and attempt a call to a second endpoint (trunk) that has 'alaw, g722' but the far end answering the call only supports 'alaw' the call ends with '488 Unsupported Media Type'.

This is due to the outgoing SIP packet only contains one codec, 'g722', which is the common codec between the phones endpoint configuration and the trunk endpoint configuration.

{noformat}
[phone]
disallow=all
allow=g722

[trunk]
disallow=all
allow=alaw,g722
{noformat}

Outgoing SIP packet Asterisk 18:

{noformat}
Session Initiation Protocol (INVITE)
   Request-Line: INVITE sip:+<TEL>@<IP>:5060 SIP/2.0
   Message Header
   Message Body
       Session Description Protocol
           Session Description Protocol Version (v): 0
           Owner/Creator, Session Id (o): - 1534344650 1534344650 IN IP4 <IP>
           Session Name (s): Asterisk
           Connection Information (c): IN IP4 <IP>
           Time Description, active time (t): 0 0
           Media Description, name and address (m): audio 22170 RTP/AVP 9 101
           Media Attribute (a): rtpmap:9 G722/8000
           Media Attribute (a): rtpmap:101 telephone-event/8000
           Media Attribute (a): fmtp:101 0-16
           Media Attribute (a): ptime:20
           Media Attribute (a): maxptime:150
           Media Attribute (a): sendrecv
           [Generated Call-ID: 9e176b7f-cb95-4c64-9ce2-59f41c94997d]

{noformat}

When using the same configuration via Asterisk 16, asterisk passes both codecs on the trunk call.

Outgoing SIP packet Asterisk 16:

{noformat}
Session Initiation Protocol (INVITE)
   Request-Line: INVITE sip:+<TEL>@<IP>:5060 SIP/2.0
   Message Header
   Message Body
       Session Description Protocol
           Session Description Protocol Version (v): 0
           Owner/Creator, Session Id (o): - 1351849362 1351849362 IN IP4 <IP>
           Session Name (s): Asterisk
           Connection Information (c): IN IP4 <IP>
           Time Description, active time (t): 0 0
           Media Description, name and address (m): audio 19714 RTP/AVP 9 8 101
           Media Attribute (a): rtpmap:9 G722/8000
           Media Attribute (a): rtpmap:8 PCMA/8000
           Media Attribute (a): rtpmap:101 telephone-event/8000
           Media Attribute (a): fmtp:101 0-16
           Media Attribute (a): ptime:20
           Media Attribute (a): maxptime:150
           Media Attribute (a): sendrecv
           [Generated Call-ID: b8e5a1b8-f507-48e6-9bc4-67ea255347f3]
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2020-10-06 08:10:07.977-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Ross Beer (rossbeer) 2020-10-07 08:33:27.744-0500

I've tested the patch from Gerrit and confirm that it resolves the issue.

By: Friendly Automation (friendly-automation) 2020-10-13 11:15:43.743-0500

Change 15040 merged by Joshua Colp:
res_pjsip: Adjust outgoing offer call pref.

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

By: Friendly Automation (friendly-automation) 2020-10-13 11:16:01.253-0500

Change 15047 merged by Joshua Colp:
res_pjsip: Adjust outgoing offer call pref.

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

By: Friendly Automation (friendly-automation) 2020-10-13 11:16:15.477-0500

Change 15046 merged by Joshua Colp:
res_pjsip: Adjust outgoing offer call pref.

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