rtp_engine: keep payload types in correct range
authorScott Griepentrog <sgriepentrog@digium.com>
Wed, 31 Dec 2014 18:54:37 +0000 (18:54 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Wed, 31 Dec 2014 18:54:37 +0000 (18:54 +0000)
In r428708 additional codecs were added including
a payload type of 128 which is outside of nominal
range of 0-127.  This change moves changes 128 to
96 to avoid causing a pjsip assertion when making
a call to an endpoint configured with allow=all.

ASTERISK-24367 #close
Review: https://reviewboard.asterisk.org/r/4286/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430164 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp_engine.c

index 977e47c..962899b 100644 (file)
@@ -2189,7 +2189,8 @@ int ast_rtp_engine_init()
        add_static_payload(125, ast_format_slin44, 0);
        add_static_payload(126, ast_format_slin48, 0);
        add_static_payload(127, ast_format_slin96, 0);
-       add_static_payload(128, ast_format_slin192, 0);
+       /* payload types above 127 are not valid */
+       add_static_payload(96, ast_format_slin192, 0);
        /* Opus and VP8 */
        add_static_payload(100, ast_format_vp8, 0);
        add_static_payload(107, ast_format_opus, 0);