[asterisk-bugs] [JIRA] Commented: (ASTERISK-20296) In certain scenarios, asterisk can send rtp in an unsupported payload type to an endpoint

Mark Michelson (JIRA) noreply at issues.asterisk.org
Fri Aug 31 16:13:07 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196517#comment-196517 ] 

Mark Michelson commented on ASTERISK-20296:
-------------------------------------------

The attached scenarios helped to debug this a lot. Thank you very much for that.

The proper fix is actually much simpler than the patch you have submitted. The if statement you have patched in bridge_p2p_rtp_write of res_rtp_asterisk.c is doing an incorrect check for failure on its first condition. It assumes that a zero return is a failure for ast_rtp_codecs_payload_code(), but in actuality, a failing result is -1. Changing the first condition to compare to -1 fixes the issue for me when I use your attached scenarios.

The problem with your patch is that it removes the format comparison logic that was there before. For static payload types (such as G.729 and G.711 alaw) this does not pose a problem. My fear is that for dynamic payload types, this may cause bridges to break due to incompatibility concerns that are not true. I am going to commit the simpler patch and close the issue. If you find a reason for this to be incorrect, then you can re-open this one and explain why.

> In certain scenarios, asterisk can send rtp in an unsupported payload type to an endpoint
> -----------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20296
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20296
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Interoperability
>    Affects Versions: 11.0.0-beta1
>         Environment: OS: Debian squeeze distribution x86_64 architecture
>            Reporter: NITESH BANSAL
>         Attachments: codec_negotiation.patch, codec_negotiation.patch, CODEC_NEGOTIATION_SIPP_SCRIPTS_AND_SIP_CONF.tar.gz
>
>
> SIP caller A supports alaw/ulaw
> Asterisk is configured to support alaw,ulaw,g729 and places all 3 in the offer to B
> SIP called B supports g729,alaw,ulaw putting all 3 in the 200 OK.
> Asterisk sees that there is one common codec between A and B, it sets up a packet to packet bridge
> If B sends audio in G.729, it gets forwarded to A without transcoding which is expecting alaw/ulaw. Asterisk does not check the incoming payload from the peer and forwards to another peer
> even if the payload received was different from the payload expected on the bridge.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list