Added new option to interface.conf: "nonotify" to disable notify messages.
[lcr.git] / dss1.cpp
index 610049f..75ff448 100644 (file)
--- a/dss1.cpp
+++ b/dss1.cpp
@@ -402,7 +402,7 @@ void Pdss1::setup_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
        int bearer_coding, bearer_capability, bearer_mode, bearer_rate, bearer_multi, bearer_user;
        int exclusive, channel;
        int ret;
-       unsigned char keypad[32] = "";
+       unsigned char keypad[33] = "";
        unsigned char useruser[128];
        int useruser_len = 0, useruser_protocol;
        class Endpoint *epoint;
@@ -746,7 +746,7 @@ void Pdss1::setup_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
 void Pdss1::information_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
 {
        int type, plan;
-       unsigned char keypad[32] = "", display[128] = "";
+       unsigned char keypad[33] = "", display[128] = "";
        struct lcr_msg *message;
 
        l1l2l3_trace_header(p_m_mISDNport, this, L3_INFORMATION_IND, DIRECTION_IN);
@@ -1900,8 +1900,6 @@ void Pdss1::message_information(unsigned int epoint_id, int message_id, union pa
 }
 
 
-int newteid = 0;
-
 /* MESSAGE_SETUP */
 void Pdss1::message_setup(unsigned int epoint_id, int message_id, union parameter *param)
 {
@@ -2100,6 +2098,9 @@ void Pdss1::message_setup(unsigned int epoint_id, int message_id, union paramete
                enc_ie_called_pn(l3m, 0, 1, (unsigned char *)p_dialinginfo.id, max);
                SCPY(p_m_d_queue, p_dialinginfo.id + max);
        }
+       /* keypad */
+       if (p_dialinginfo.keypad[0])
+               enc_ie_keypad(l3m, (unsigned char *)p_dialinginfo.keypad);
        /* sending complete */
        if (p_dialinginfo.sending_complete)
                enc_ie_complete(l3m, 1);
@@ -2239,7 +2240,14 @@ void Pdss1::message_notify(unsigned int epoint_id, int message_id, union paramet
        int notify;
        int plan = 0, type = -1, present = 0;
 
-       printf("if = %d\n", param->notifyinfo.notify);
+       if (p_m_mISDNport->ifport->nonotify) {
+               l1l2l3_trace_header(p_m_mISDNport, this, L3_NOTIFY_REQ, DIRECTION_OUT);
+               add_trace("info", NULL, "blocked by config");
+               end_trace();
+               return;
+       }
+
+//     printf("if = %d\n", param->notifyinfo.notify);
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
                notify = param->notifyinfo.notify & 0x7f;
        else