Bug #3442

fix int mgcp_codec_decide() in mgcp_codec.c

Added by dexter over 2 years ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


The function mgcp_codec_decide() selects the codec that is later returned with the MGCP response in MGCP. The response is generated from rtp->codec, which is set by mgcp_codec_decide().

Unfortunately, the current implementation of mgcp_codec_decide() makes no sense at all. It only causes no trouble at the moment because endp->tcfg->no_audio_transcoding is set to 0, which means that transcoding is turned on at the moment even though we do not support trans coding.

mgcp_codec_decide() should be revised in the following way:
We remove rtp->codec, because Technically an MGW does not have one selected codec, it knows about several codecs and may make choices based on its transcoding capabilities and policies. In practice this would mean that mgcp_codec_decide() removes all the unsupported codecs from rtp->codecs[]. The functions that generate the SDP will then find only the selected codecs and return them. At the moment we can only return one codec from inside the SDP because we use rtp->codec as data source.

Since we do not support transcoding at the moment there will not be much in mgcp_codec_decide(), endp->tcfg->no_audio_transcoding is set to 0 we can display a warning that tells the user that transcoding is not supported yet.


#1 Updated by dexter over 2 years ago

We need to fix mgcp_write_response_sdp() first, so that it can send multiple payload type numbers and rtpmap lines.

I have done some preliminary cleanup here, it does not change the functionality yet: mgcp_sdp: restructure mgcp_write_response_sdp() (rtpmap) mgcp_sdp: restructure mgcp_write_response_sdp() (audio)

#2 Updated by laforge over 1 year ago

  • Assignee deleted (dexter)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)