@ -6078,6 +6078,7 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si
ast_udptl_setqos ( p - > udptl , global_tos_audio , global_cos_audio ) ;
ast_udptl_setqos ( p - > udptl , global_tos_audio , global_cos_audio ) ;
p - > maxcallbitrate = default_maxcallbitrate ;
p - > maxcallbitrate = default_maxcallbitrate ;
p - > autoframing = global_autoframing ;
p - > autoframing = global_autoframing ;
ast_rtp_codec_setpref ( p - > rtp , & p - > prefs ) ;
}
}
if ( useglobal_nat & & sin ) {
if ( useglobal_nat & & sin ) {
@ -6989,23 +6990,20 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
ast_debug ( 1 , " Can't read framing from SDP: %s \n " , a ) ;
ast_debug ( 1 , " Can't read framing from SDP: %s \n " , a ) ;
}
}
}
}
if ( framing & & last_rtpmap_codec ) {
if ( framing & & p - > autoframing ) {
if ( p - > autoframing ) {
struct ast_codec_pref * pref = ast_rtp_codec_getpref ( p - > rtp ) ;
struct ast_codec_pref * pref = ast_rtp_codec_getpref ( p - > rtp ) ;
int codec_n ;
int codec_n ;
int format = 0 ;
int format = 0 ;
for ( codec_n = 0 ; codec_n < last_rtpmap_codec ; codec_n + + ) {
for ( codec_n = 0 ; codec_n < MAX_RTP_PT ; codec_n + + ) {
format = ast_rtp_codec_getformat ( found_rtpmap_codecs[ codec_n] ) ;
format = ast_rtp_codec_getformat ( codec_n) ;
if ( ! format ) /* non-codec or not found */
if ( ! format ) /* non-codec or not found */
continue ;
continue ;
ast_debug ( 1 , " Setting framing for %d to %ld \n " , format , framing ) ;
if ( option_debug )
ast_log ( LOG_DEBUG , " Setting framing for %d to %ld \n " , format , framing ) ;
ast_codec_pref_setsize ( pref , format , framing ) ;
ast_codec_pref_setsize ( pref , format , framing ) ;
}
}
ast_rtp_codec_setpref ( p - > rtp , pref ) ;
ast_rtp_codec_setpref ( p - > rtp , pref ) ;
}
}
}
memset ( & found_rtpmap_codecs , 0 , sizeof ( found_rtpmap_codecs ) ) ;
last_rtpmap_codec = 0 ;
continue ;
continue ;
} else if ( ! strncmp ( a , red_fmtp , strlen ( red_fmtp ) ) ) {
} else if ( ! strncmp ( a , red_fmtp , strlen ( red_fmtp ) ) ) {