mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
Unfortunately OsmoMGW was never really tested with multiple different codecs on either side of the connection. While OsmoMSC and OsmoBSC only assign exactly one codec on each side this has never been a problem, however it might become a problem when a call agent assigns multiple codecs on one side. This has been observed in a setup where OsmoMGW had one leg towards an external call agent. Also due to recent upgrades to the TTCN3 tests we are now able to simulate different codecs on both sides to pinpoint issues. Testing has shown that OsmoMGW has difficulties with multiple codecs. The reason for this is that the function that makes the codec decision was not fully finished. So let's finish the codec decision function and let's also use that decision when patching the payload type of outgoing RTP packets. Related: OS#5461 Change-Id: I6c3291f825488e5d8ce136aeb18450156794aeb5
22 lines
1011 B
C
22 lines
1011 B
C
#pragma once
|
|
|
|
#define DEFAULT_RTP_AUDIO_FRAME_DUR_NUM 20
|
|
#define DEFAULT_RTP_AUDIO_FRAME_DUR_DEN 1000
|
|
#define DEFAULT_RTP_AUDIO_PACKET_DURATION_MS 20
|
|
#define DEFAULT_RTP_AUDIO_DEFAULT_RATE 8000
|
|
#define DEFAULT_RTP_AUDIO_DEFAULT_CHANNELS 1
|
|
|
|
#define PTYPE_UNDEFINED (-1)
|
|
|
|
struct mgcp_conn_rtp;
|
|
|
|
void mgcp_codec_summary(struct mgcp_conn_rtp *conn);
|
|
void mgcp_codec_reset_all(struct mgcp_conn_rtp *conn);
|
|
int mgcp_codec_add(struct mgcp_conn_rtp *conn, int payload_type, const char *audio_name, const struct mgcp_codec_param *param);
|
|
int mgcp_codec_decide(struct mgcp_conn_rtp *conn_src, struct mgcp_conn_rtp *conn_dst);
|
|
const struct mgcp_rtp_codec *mgcp_codec_pt_find_by_subtype_name(struct mgcp_conn_rtp *conn,
|
|
const char *subtype_name, unsigned int match_nr);
|
|
bool mgcp_codec_amr_align_mode_is_indicated(const struct mgcp_rtp_codec *codec);
|
|
bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec);
|
|
struct mgcp_rtp_codec *mgcp_codec_from_pt(struct mgcp_conn_rtp *conn, int payload_type);
|