[asterisk-bugs] [JIRA] (ASTERISK-27259) chan_pjsip: Outgoing leg does not use all configured codecs, but subset based on caller

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Dec 20 14:34:08 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-27259:
-------------------------------------

    Target Release Version/s: 15.2.0

> chan_pjsip: Outgoing leg does not use all configured codecs, but subset based on caller
> ---------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27259
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27259
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 15.0.0-rc1
>         Environment: Ubuntu 16.04 LTS
>            Reporter: lvl
>            Assignee: Unassigned
>              Labels: pjsip
>      Target Release: 15.0.0, 15.1.0, 15.2.0
>
>         Attachments: asterisk transcoding.txt, notranscode_forcemediaoffer.txt, notranscode_regular.txt, pjsip_wizard.conf, sip.conf
>
>
> Asterisk is refusing to perform transcoding between two PJSIP channels that don't share a common codec capability. Reproducing is simple:
> - Create two PJSIP endpoints with a limited set of allowed codecs, for example "g722,alaw"
> - Launch a SIP phone using the first endpoint's credentials with only the g722 codec enabled
> - Launch a SIP phone using the second endpoint's credentials with only the alaw codec enabled
> - Create a simple dialplan so endpoint1 can dial PJSIP/endpoint2
> Expected: Asterisk will use g722 on the 1st channel, use alaw on the 2nd channel, and transcode between them
> Observed: Asterisk will try to force endpoint2 to use g722 even though its SDP doesn't contain it. The call will fail. Whichever codec is used on the incoming channel, will be forced onto the outgoing channel as well.
> The following things don't make a difference:
> - Setting asymmetric_rtp_codec to yes or no
> - Setting preferred_codec_only to yes or no
> - Answer()'ing the incoming call before the outgoing Dial()
> - Limiting the "allow" list of codecs for endpoint1 to only "g722" and for endpoint2 to only "alaw"
> The only thing that made a difference is using the PJSIP_MEDIA_OFFER function in a pre-dial handler. Setting PJSIP_MEDIA_OFFER(audio)=g722,alaw,ulaw will make Asterisk offer all these 3 codecs in the outgoing call's SDP. However, immediately after the call is answered by endpoint2, Asterisk sends a re-invite to endpoint1 offering only endpoint2's codecs, causing endpoint1 to drop the call.
> Exactly the same setup (same dialplan, same Asterisk version, same phone configuration) works fine using chan_sip! Attached are the configuration files used and the logfile for the two scenarios.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list