Support of GSM uses socket interface for both network and mobile
[lcr.git] / mISDN.cpp
index 087963c..46cf1a5 100644 (file)
--- a/mISDN.cpp
+++ b/mISDN.cpp
@@ -1113,7 +1113,7 @@ void message_bchannel_from_remote(class JoinRemote *joinremote, int type, unsign
                chan_trace_header(mISDNport, isdnport, "MESSAGE_BCHANNEL (from remote application)", DIRECTION_NONE);
                add_trace("type", NULL, "export request");
                end_trace();
-               isdnport->p_m_remote_ref = joinremote->j_serial;
+               isdnport->p_m_remote_ref = joinremote->j_remote_ref;
                isdnport->p_m_remote_id = joinremote->j_remote_id;
                if (mISDNport && i>=0) {
                        bchannel_event(mISDNport, i, B_EVENT_EXPORTREQUEST);
@@ -1367,7 +1367,11 @@ void PmISDN::bchannel_receive(struct mISDNhead *hh, unsigned char *data, int len
                if ((cont&(~DTMF_TONE_MASK)) == DTMF_TONE_VAL) {
                        chan_trace_header(p_m_mISDNport, this, "BCHANNEL control", DIRECTION_IN);
                        add_trace("DTMF", NULL, "%c", cont & DTMF_TONE_MASK);
+                       if (!p_m_dtmf)
+                               add_trace("info", NULL, "DTMF is disabled");
                        end_trace();
+                       if (!p_m_dtmf)
+                               return;
                        message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_DTMF);
                        message->param.dtmf = cont & DTMF_TONE_MASK;
                        PDEBUG(DEBUG_PORT, "PmISDN(%s) PH_CONTROL INDICATION  DTMF digit '%c'\n", p_name, message->param.dtmf);