Feature #6171


mgcp-client API: there should be a separate mgcp_codec_param for each codec in mgcp_msg.codecs[]

Added by dexter 14 days ago. Updated 14 days ago.

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


Spec Reference:


This was previously discussed in ticket #5723, which got deleted due to an error.

There is a problem we face with the mgcp_client API. mgcp_client_fsm in particular.

The problem is that we are not able to assign different payload type numbers for the same codec. So it is not possible to have the following configuration:

codec: AMR, payload-type: 112
codec: AMR, payload-type: 113

However, this would be necessary in case we want to define AMR once in octet-aligned and once in bandwith-efficient configuration, which brings us to the second problem. Since there is only one mgcp_codec_param struct member "param", which only lets us to define exactly one set of codec parameters we cannot even define two different configurations.

Also in some cases it would be also convenient to circumvent the SDP parsing/generation of osmo-mgcp-client and use a user defined SDP string directly.

Actions #1

Updated by dexter 14 days ago

I have now resumed working on this:

For the problem we have with ptmap I found an elegant fix that won't break the ABI or API. We now can just define multiple occurrences of the same codec in ptmap. In case multiple occurrences are used, then the order must match the order that is used in codecs[]. mgcp_client_fsm: allow the same codec multiple times in ptmap [NEW]

For the problem with the codec params we still have to add an array. I have done this now. I also re-defined struct mgcp_codec_param as mgcp_codec_param2 since I think a union makes more sense than the _present logic of the old mgcp_codec_param. mgcp_client_fsm: explain member param in struct mgcp_conn_peer better [NEW] mgcp_client_fsm: fix inconsistent API (param_present, param). [NEW]

(I have not forgotten the approach where we can pass in SDP directly. I will add this in a follow up patch)

Actions #2

Updated by dexter 14 days ago

  • % Done changed from 0 to 30

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)