Module: kamailio
Branch: master
Commit: 721daf5ca55a8fb366cff2821e249bfff64d8f87
URL:
https://github.com/kamailio/kamailio/commit/721daf5ca55a8fb366cff2821e249bf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-25T10:48:16+02:00
usrloc: adde random and pid to call-id for keepalive requests
- GH #3225
---
Modified: src/modules/usrloc/ul_keepalive.c
---
Diff:
https://github.com/kamailio/kamailio/commit/721daf5ca55a8fb366cff2821e249bf…
Patch:
https://github.com/kamailio/kamailio/commit/721daf5ca55a8fb366cff2821e249bf…
---
diff --git a/src/modules/usrloc/ul_keepalive.c b/src/modules/usrloc/ul_keepalive.c
index ffe37fdc73..ba855eb011 100644
--- a/src/modules/usrloc/ul_keepalive.c
+++ b/src/modules/usrloc/ul_keepalive.c
@@ -38,6 +38,7 @@
#include "../../core/parser/parse_from.h"
#include "../../core/parser/parse_to.h"
#include "../../core/parser/parse_rr.h"
+#include "../../core/rand/fastrand.h"
#include "ul_keepalive.h"
@@ -66,7 +67,7 @@ Content-Length: 0\r\n\r\n"
"%s%.*s%.*s" \
"From: <%.*s>;tag=%.*s-%x-%lx-%lx-%x.%x\r\n" \
"To: <sip:%.*s%s%.*s>\r\n" \
- "Call-ID: " ULKA_CALLID_PREFIX "%u.%u\r\n" \
+ "Call-ID: " ULKA_CALLID_PREFIX "%x-%x-%x.%x\r\n" \
"CSeq: 80 %.*s\r\n" \
"Content-Length: 0\r\n\r\n"
@@ -243,6 +244,7 @@ int ul_ka_urecord(urecord_t *ur)
ur->aor.len, ur->aor.s,
(aortype==1)?"":"@",
(aortype==1)?0:ul_ka_domain.len, (aortype==1)?"":ul_ka_domain.s,
+ fastrand(), my_pid(),
_ul_ka_counter, bcnt,
ul_ka_method.len, ul_ka_method.s);
if(kabuf_len<=0 || kabuf_len>=ULKA_BUF_SIZE) {