WIP: chan_lcr support for Asterisk 11.5
[lcr.git] / dss1.cpp
index fe4188a..c4a0aa4 100644 (file)
--- a/dss1.cpp
+++ b/dss1.cpp
@@ -1685,7 +1685,7 @@ void Pdss1::facility_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
 
        message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_FACILITY);
        message->param.facilityinfo.len = fac_len;
-       memcpy(message->param.facilityinfo.data, fac_ie, fac_len);
+       memcpy(message->param.facilityinfo.data, fac_ie + 1, fac_len);
        message_put(message);
 }
 
@@ -2327,17 +2327,17 @@ void Pdss1::message_3pty(unsigned int epoint_id, int message_id, union parameter
        if (param->threepty.result) {
                fac.comp = CompReturnResult;
                fac.u.retResult.invokeId = param->threepty.invoke_id;
+               fac.u.retResult.operationValuePresent = 1;
+               if (param->threepty.begin)
+                       fac.u.retResult.operationValue = Fac_Begin3PTY;
+               if (param->threepty.end)
+                       fac.u.retResult.operationValue = Fac_End3PTY;
        }
        if (param->threepty.error) {
                fac.comp = CompReturnError;
                fac.u.retError.invokeId = param->threepty.invoke_id;
                fac.u.retError.errorValue = FacError_Gen_InvalidCallState;
        }
-       fac.u.retResult.operationValuePresent = 1;
-       if (param->threepty.begin)
-               fac.u.retResult.operationValue = Fac_Begin3PTY;
-       if (param->threepty.end)
-               fac.u.retResult.operationValue = Fac_End3PTY;
        encodeFac(fac_ie, &fac);
 
        /* sending facility */