Module: kamailio
Branch: master
Commit: dc851040054692a955b92cf601eb308878017013
URL:
https://github.com/kamailio/kamailio/commit/dc851040054692a955b92cf601eb308…
Author: Piotr Gregor <piotr(a)signalwire.com>
Committer: Piotr Gregor <piotr(a)signalwire.com>
Date: 2021-03-18T17:58:14Z
stirshaken: handle NULL or empty origid by generating random uuid
---
Modified: src/modules/stirshaken/stirshaken_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dc851040054692a955b92cf601eb308…
Patch:
https://github.com/kamailio/kamailio/commit/dc851040054692a955b92cf601eb308…
---
diff --git a/src/modules/stirshaken/stirshaken_mod.c
b/src/modules/stirshaken/stirshaken_mod.c
index ce42e57935..bc4a04f0fb 100644
--- a/src/modules/stirshaken/stirshaken_mod.c
+++ b/src/modules/stirshaken/stirshaken_mod.c
@@ -741,7 +741,16 @@ static int ki_stirshaken_add_identity_with_key(sip_msg_t *msg, str
*x5u, str *at
.origtn_val = origtn_val ? origtn_val->s : NULL,
.origid = origid ? origid->s : NULL
};
+ char uuid_str[37] = { 0 };
+ if (!params.origid || !strlen(params.origid)) {
+
+ uuid_t uuid;
+
+ uuid_generate(uuid);
+ uuid_unparse_lower(uuid, uuid_str);
+ params.origid = uuid_str;
+ }
if (keypath && keypath->s) {