|
@@ -880,14 +880,13 @@ int tps_request_received(sip_msg_t *msg, int dialog)
|
|
|
memset(&mtsd, 0, sizeof(tps_data_t));
|
|
|
memset(&stsd, 0, sizeof(tps_data_t));
|
|
|
|
|
|
+ tps_unmask_callid(msg);
|
|
|
+
|
|
|
if(tps_pack_message(msg, &mtsd)<0) {
|
|
|
LM_ERR("failed to extract and pack the headers\n");
|
|
|
return -1;
|
|
|
}
|
|
|
-
|
|
|
- tps_unmask_callid(msg);
|
|
|
- LM_DBG("Request message after CALLID Unmask-> [%.*s] \n",msg->len,msg->buf);
|
|
|
-
|
|
|
+
|
|
|
ret = tps_dlg_message_update(msg, &mtsd, _tps_contact_mode);
|
|
|
if(ret<0) {
|
|
|
LM_ERR("failed to update on dlg message\n");
|
|
@@ -1022,16 +1021,15 @@ int tps_response_received(sip_msg_t *msg)
|
|
|
memset(&mtsd, 0, sizeof(tps_data_t));
|
|
|
memset(&stsd, 0, sizeof(tps_data_t));
|
|
|
memset(&btsd, 0, sizeof(tps_data_t));
|
|
|
-
|
|
|
+
|
|
|
+ tps_unmask_callid(msg);
|
|
|
+
|
|
|
if(tps_pack_message(msg, &mtsd)<0) {
|
|
|
LM_ERR("failed to extract and pack the headers\n");
|
|
|
return -1;
|
|
|
}
|
|
|
- tps_unmask_callid(msg);
|
|
|
- LM_DBG("Response message after CALLID Unmask-> [%.*s] \n",msg->len,msg->buf);
|
|
|
-
|
|
|
lkey = msg->callid->body;
|
|
|
-
|
|
|
+
|
|
|
tps_storage_lock_get(&lkey);
|
|
|
if(tps_storage_load_branch(msg, &mtsd, &btsd, 0)<0) {
|
|
|
goto error;
|
|
@@ -1097,8 +1095,8 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local)
|
|
|
|
|
|
if(dialog!=0) {
|
|
|
if(tps_get_xuuid(msg, &xuuid)<0) {
|
|
|
- LM_DBG("no x-uuid header -Local message only Call-ID Mask if downstream \n");
|
|
|
- /* ACK and CANCEL go downstream so Call-ID mask required*/
|
|
|
+ LM_DBG("no x-uuid header - local message only - Call-ID mask if downstream \n");
|
|
|
+ /* ACK and CANCEL go downstream so Call-ID mask required */
|
|
|
if(get_cseq(msg)->method_id==METHOD_ACK
|
|
|
|| get_cseq(msg)->method_id==METHOD_CANCEL) {
|
|
|
tps_mask_callid(msg);
|
|
@@ -1170,13 +1168,10 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local)
|
|
|
|
|
|
done:
|
|
|
tps_storage_lock_release(&lkey);
|
|
|
- /*DownStream Request sent MASK CALLID */
|
|
|
if(direction == TPS_DIR_DOWNSTREAM) {
|
|
|
- /* mask CallID */
|
|
|
tps_mask_callid(msg);
|
|
|
- LM_DBG("SENT message after CALLID CHG->[%.*s] \n",msg->len,msg->buf);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return 0;
|
|
|
|
|
|
error:
|
|
@@ -1273,12 +1268,9 @@ int tps_response_sent(sip_msg_t *msg)
|
|
|
if(tps_storage_update_dialog(msg, &mtsd, &stsd, TPS_DBU_CONTACT)<0) {
|
|
|
goto error1;
|
|
|
}
|
|
|
-
|
|
|
- /*DownStream Response sent MASK CALLID */
|
|
|
+
|
|
|
if(direction == TPS_DIR_UPSTREAM) {
|
|
|
- /* mask CallID */
|
|
|
tps_mask_callid(msg);
|
|
|
- LM_DBG("SENT Response message after CALLID CHG->[%.*s] \n",msg->len,msg->buf);
|
|
|
}
|
|
|
return 0;
|
|
|
|