From db536954528ad3c9344444f26181898175fc77a5 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 6 Jan 2013 10:02:18 +0100 Subject: mobile: Display progress message, if received --- src/host/layer23/src/mobile/mnccms.c | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index 2db81672..75cde8e4 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -32,6 +32,15 @@ #include #include +/* FIXME: move this to libosmocore gsm_04_08.h */ +#define GSM48_PI_NOT_END_TO_END_ISDN 1 +#define GSM48_PI_DEST_ADDR_NOT_ISDN 2 +#define GSM48_PI_ORIG_ADDR_NOT_ISDN 3 +#define GSM48_PI_CALL_RETURNED_ISDN 4 +#define GSM48_PI_INBAND_INFO 8 +#define GSM48_PI_END_TO_END_ISDN 32 +#define GSM48_PI_QUEUEING 64 + void *l23_ctx; static uint32_t new_callref = 1; static LLIST_HEAD(call_list); @@ -373,6 +382,42 @@ int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg) data->cause.value); free_call(call); break; + case MNCC_PROGRESS_IND: + vty_notify(ms, NULL); + switch (data->progress.descr) { + case GSM48_PI_NOT_END_TO_END_ISDN: + vty_notify(ms, "Call is in progress: " + "Not end-to-end PLMN/ISDN\n"); + break; + case GSM48_PI_DEST_ADDR_NOT_ISDN: + vty_notify(ms, "Call is in progress: " + "Destination address not PLMN/ISDN\n"); + break; + case GSM48_PI_ORIG_ADDR_NOT_ISDN: + vty_notify(ms, "Call is in progress: " + "Originating address not PLMN/ISDN\n"); + break; + case GSM48_PI_CALL_RETURNED_ISDN: + vty_notify(ms, "Call is in progress: " + "Returned to PLMN/ISDN\n"); + break; + case GSM48_PI_INBAND_INFO: + vty_notify(ms, "Call is in progress: " + "Inband information available\n"); + break; + case GSM48_PI_END_TO_END_ISDN: + vty_notify(ms, "Call is in progress: " + "End-to-end PLMN/ISDN\n"); + break; + case GSM48_PI_QUEUEING: + vty_notify(ms, "Call is in progress: Queueing\n"); + break; + default: + vty_notify(ms, "Call is in progress\n"); + } + LOGP(DMNCC, LOGL_INFO, "Call is in progress (descr=%d)\n", + data->progress.descr); + break; case MNCC_CALL_PROC_IND: vty_notify(ms, NULL); vty_notify(ms, "Call is proceeding\n"); -- cgit v1.2.3