summaryrefslogtreecommitdiffstats
path: root/src/app.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-26 16:33:15 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-26 16:33:15 +0100
commit989bef0875f3123681bd0d6b1fd8d7ce16fa9eec (patch)
tree74ae7cecf0018facb7bd63d04d0b42e9a5897a01 /src/app.c
parentf9ba5612a9338417e7dc8e3953140c953cf5c274 (diff)
app: Translate payload name to IETF codec name
Convert the MNCC codec type to the IETF codec name.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c16
1 files changed, 16 insertions, 0 deletions
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";
+}