From 989bef0875f3123681bd0d6b1fd8d7ce16fa9eec Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 26 Mar 2016 16:33:15 +0100 Subject: app: Translate payload name to IETF codec name Convert the MNCC codec type to the IETF codec name. --- src/app.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 747625e..81b3dfc 100644 --- a/src/app.c +++ b/src/app.c @@ -22,6 +22,7 @@ #include "call.h" #include "logging.h" #include "mncc.h" +#include "mncc_protocol.h" void app_mncc_disconnected(struct mncc_connection *conn) { @@ -72,3 +73,18 @@ void app_route_call(struct call *call, const char *source, const char *dest) call_leg_release(call->initial); } } + +const char *app_media_name(int ptmsg) +{ + if (ptmsg == GSM_TCHF_FRAME) + return "GSM"; + if (ptmsg == GSM_TCHF_FRAME_EFR) + return "GSM-EFR"; + if (ptmsg == GSM_TCHH_FRAME) + return "GSM-HR-08"; + if (ptmsg == GSM_TCH_FRAME_AMR) + return "AMR"; + + LOGP(DAPP, LOGL_ERROR, "Unknown ptmsg(%d). call broken\n", ptmsg); + return "unknown"; +} -- cgit v1.2.3