Added GSM IMSI dialing by using dialing "imsi-<number>".
[lcr.git] / dss1.cpp
index c8adb27..1191b9e 100644 (file)
--- a/dss1.cpp
+++ b/dss1.cpp
@@ -1064,8 +1064,10 @@ void Pdss1::disconnect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3
        dec_ie_display(l3m, (unsigned char *)display, sizeof(display));
        end_trace();
 
-       if (cause < 0)
+       if (cause < 0) {
                cause = 16;
+               location = LOCATION_PRIVATE_LOCAL;
+       }
 
        /* release if remote sends us no tones */
        if (!p_m_mISDNport->earlyb) {
@@ -1152,8 +1154,10 @@ void Pdss1::release_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
        dec_ie_display(l3m, (unsigned char *)display, sizeof(display));
        end_trace();
 
-       if (cause < 0)
+       if (cause < 0) {
                cause = 16;
+               location = LOCATION_PRIVATE_LOCAL;
+       }
 
        /* sending release to endpoint */
        if (location == LOCATION_PRIVATE_LOCAL)
@@ -1203,8 +1207,10 @@ void Pdss1::release_complete_ind(unsigned int cmd, unsigned int pid, struct l3_m
        if (location == LOCATION_PRIVATE_LOCAL)
                location = LOCATION_PRIVATE_REMOTE;
 
-       if (cause < 0)
+       if (cause < 0) {
                cause = 16;
+               location = LOCATION_PRIVATE_LOCAL;
+       }
 
        /* sending release to endpoint */
        while(p_epointlist) {
@@ -1860,7 +1866,7 @@ void Pdss1::message_information(unsigned int epoint_id, int message_id, union pa
                enc_ie_called_pn(l3m, 0, 1, (unsigned char *)number, max);
                if ((p_m_d_ntmode || p_m_d_tespecial) && display[0]) {
                        enc_ie_display(l3m, (unsigned char *)display);
-                       display = "";
+                       display = (char *)"";
                }
                end_trace();
                p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_INFORMATION, p_m_d_l3id, l3m);
@@ -1902,7 +1908,6 @@ void Pdss1::message_setup(unsigned int epoint_id, int message_id, union paramete
        memcpy(&p_dialinginfo, &param->setup.dialinginfo, sizeof(p_dialinginfo));
        memcpy(&p_capainfo, &param->setup.capainfo, sizeof(p_capainfo));
        memcpy(&p_redirinfo, &param->setup.redirinfo, sizeof(p_redirinfo));
-//             SCPY(&p_m_tones_dir, param->setup.ext.tones_dir);
        /* screen outgoing caller id */
        do_screen(1, p_callerinfo.id, sizeof(p_callerinfo.id), &p_callerinfo.ntype, &p_callerinfo.present, p_m_mISDNport->ifport->interface);
        do_screen(1, p_callerinfo.id2, sizeof(p_callerinfo.id2), &p_callerinfo.ntype2, &p_callerinfo.present2, p_m_mISDNport->ifport->interface);