[asterisk-bugs] [JIRA] (ASTERISK-22070) Investigate PJMEDIA's implicit codec negotiation behavior

Joshua Colp (JIRA) noreply at issues.asterisk.org
Fri Sep 20 13:29:03 CDT 2013


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

Joshua Colp closed ASTERISK-22070.
----------------------------------

    Resolution: Fixed
    
> Investigate PJMEDIA's implicit codec negotiation behavior
> ---------------------------------------------------------
>
>                 Key: ASTERISK-22070
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22070
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 12
>            Reporter: Mark Michelson
>
> While attempting to make an equivalent option to chan_sip's preferred_codec_only, I ran across interesting behavior in chan_gulp. I configured two peers, carol and bob. carol is configured to allow=g722,ulaw,alaw. bob is configured to allow=ulaw. Direct media is not enabled.
> Carol places a call to Bob through Asterisk. Carol's INVITE contains an SDP offer with ulaw, alaw, g.722, and other codecs. Asterisk sends an INVITE to bob that contains only a ulaw offer. Bob's phone replies with a 200 OK with a ulaw answer. Asterisk then sends a 200 OK with an SDP answer for Carol that contains only g.722. If I change the order of the allow statement for Carol to be allow=ulaw,g722,alaw, then in the same situation, the SDP in the 200 OK from Asterisk to carol contains only ulaw.
> From my debugging, it appeared that when the initial INVITE from Carol arrived, Asterisk properly determined the intersection of the offered codecs in the INVITE and the configured codecs for Carol. Asterisk then called the create_outgoing_sdp_stream() callback and added the codecs to the local SDP.  After Bob answered the call, PJSIP called into Carol's inv_session's on_media_update() callback. When we call pjmedia_sdp_neg_get_active_local(), the returned SDP's audio stream contains only the first configured codec for the endpoint.
> We should be answering with all configured codecs for Carol since she supports them all. An investigation needs to be conducted to see if
> 1) The SDP negotiator in PJMEDIA needs to be told to place multiple codecs in its negotiated SDPs.
> 2) We are misusing the SDP that PJMEDIA gives us in the on_media_update() callback
> 3) If there is some other erroneous code that is causing this behavior.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list