GSM-BS: Add MPTY and ECT
[lcr.git] / gsm.cpp
diff --git a/gsm.cpp b/gsm.cpp
index 0a42b14..6d98bd0 100644 (file)
--- a/gsm.cpp
+++ b/gsm.cpp
@@ -838,6 +838,9 @@ void Pgsm::message_notify(unsigned int epoint_id, int message_id, union paramete
 //     printf("if = %d\n", param->notifyinfo.notify);
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE) {
                notify = param->notifyinfo.notify & 0x7f;
+               /* skip all notifiy ids that are not 0, 1, 2 */
+               if (notify > 2)
+                       return;
                if (p_state!=PORT_STATE_CONNECT /*&& p_state!=PORT_STATE_IN_PROCEEDING*/ && p_state!=PORT_STATE_IN_ALERTING) {
                        /* queue notification */
                        if (p_g_notify_pending)
@@ -1057,6 +1060,13 @@ void Pgsm::message_disconnect(unsigned int epoint_id, int message_id, union para
        add_trace("cause", "coding", "%d", mncc->cause.coding);
        add_trace("cause", "location", "%d", mncc->cause.location);
        add_trace("cause", "value", "%d", mncc->cause.value);
+#ifdef WITH_GSM_MS
+       /* special case for BS mode */
+       if (param->disconnectinfo.transfer.result && (p_type & PORT_CLASS_GSM_MASK) == PORT_CLASS_GSM_BS) {
+               ((class Pgsm_bs *)this)->enc_ie_facility_ect(mncc, &param->disconnectinfo.transfer);
+               gsm_trace_facility((unsigned char *)mncc->facility.info, mncc->facility.len);
+       }
+#endif
        end_trace();
        send_and_free_mncc(p_g_lcr_gsm, mncc->msg_type, mncc);