Hi all~ I wonder that pjmedia_codec_modify() is only for VAD temporarily disable and re-enable. if you search pjmedia_codec_modify() on the stream.c file in pjmedia library, you can see the below, ----------------------------------------------------------------------------------------------------- /* Initially disable the VAD in the stream, to help traverse NAT better */ stream->vad_enabled = stream->codec_param.setting.vad; if (PJMEDIA_STREAM_VAD_SUSPEND_MSEC > 0 && stream->vad_enabled) { stream->codec_param.setting.vad = 0; stream->ts_vad_disabled = 0; pjmedia_codec_modify(stream->codec, &stream->codec_param); PJ_LOG(4,(stream->port.info.name.ptr,"VAD temporarily disabled")); } ------------------------------------------------------------------------------------------------------ and -------------------------------------------------------------------------------------------------------- /* If VAD is temporarily disabled during creation, enable it * after transmitting for VAD_SUSPEND_SEC seconds. */ if (stream->vad_enabled != stream->codec_param.setting.vad && (stream->tx_duration - stream->ts_vad_disabled) > PJMEDIA_PIA_SRATE(&stream->port.info) * PJMEDIA_STREAM_VAD_SUSPEND_MSEC / 1000) { stream->codec_param.setting.vad = stream->vad_enabled; pjmedia_codec_modify(stream->codec, &stream->codec_param); PJ_LOG(4,(stream->port.info.name.ptr,"VAD re-enabled")); } ------------------------------------------------------------------------------------------------------- That is, it means that pjmedia_codec_modify() is just only for swithcing VAD. But, if codec or media property is changed by negotiation like ptime or something, how can i apply them? In my opinion, the pjmedia_codec_modify() function need to be called everytime when session is initiated to modify codec or media property. What do think about it? Please give me advice. thank you. -muxxc1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120403/451802c4/attachment.html>