--- asterisk-1.4.2/main/rtp.c 2007-03-12 03:21:12.000000000 +0200 +++ main/rtp.c 2007-04-03 18:44:08.000000000 +0200 @@ -1358,6 +1358,7 @@ [97] = {1, AST_FORMAT_ILBC}, [99] = {1, AST_FORMAT_H264}, [101] = {0, AST_RTP_DTMF}, + [102] = {1, AST_FORMAT_ILBC}, [110] = {1, AST_FORMAT_SPEEX}, [111] = {1, AST_FORMAT_G726}, [112] = {1, AST_FORMAT_G726_AAL2}, @@ -1613,6 +1614,19 @@ ast_mutex_unlock(&rtp->bridge_lock); } +/*! \brief Disable iLBC payload type 97 + */ +void ast_rtp_set_ilbc_type(struct ast_rtp* rtp, int pt) +{ + if ((pt == 97) || (pt == 102)) { + ast_mutex_lock(&rtp->bridge_lock); + rtp->current_RTP_PT[97].code = 0; + rtp->current_RTP_PT[102].code = 0; + rtp->current_RTP_PT[pt].code = AST_FORMAT_ILBC; + ast_mutex_unlock(&rtp->bridge_lock); + } +} + /*! \brief Make a note of a RTP payload type (with MIME type) that was seen in * an SDP "a=rtpmap:" line. */