[sr-dev] git:master:9d9bb4c0: dlgs: fill in the totag on answer response
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jun 25 09:18:06 CEST 2020
Module: kamailio
Branch: master
Commit: 9d9bb4c02e8dc870e5a65a5fb87ec28c825738d1
URL: https://github.com/kamailio/kamailio/commit/9d9bb4c02e8dc870e5a65a5fb87ec28c825738d1
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-06-25T09:17:38+02:00
dlgs: fill in the totag on answer response
---
Modified: src/modules/dlgs/dlgs_records.c
---
Diff: https://github.com/kamailio/kamailio/commit/9d9bb4c02e8dc870e5a65a5fb87ec28c825738d1.diff
Patch: https://github.com/kamailio/kamailio/commit/9d9bb4c02e8dc870e5a65a5fb87ec28c825738d1.patch
---
diff --git a/src/modules/dlgs/dlgs_records.c b/src/modules/dlgs/dlgs_records.c
index 08b0ab4bad..1a21f355db 100644
--- a/src/modules/dlgs/dlgs_records.c
+++ b/src/modules/dlgs/dlgs_records.c
@@ -570,6 +570,15 @@ int dlgs_update_item(sip_msg_t *msg)
|| it->state==DLGS_STATE_PROGRESS) {
it->state = DLGS_STATE_ANSWERED;
it->ts_answer = tnow;
+ if(it->ttag.len<=0) {
+ to_body_t *tb;
+ tb = get_to(msg);
+ if(tb!=NULL && tb->tag_value.len>0
+ && (tb->tag_value.len<DLGS_TOTAG_SIZE-1)) {
+ it->ttag.len = tb->tag_value.len;
+ memcpy(it->ttag.s, tb->tag_value.s, tb->tag_value.len);
+ }
+ }
}
} else if(rcode>=300) {
if(it->state==DLGS_STATE_INIT
More information about the sr-dev
mailing list