Module: kamailio
Branch: master
Commit: bd70a78ce22ab419a52e8733bc7ee27765d14cac
URL:
https://github.com/kamailio/kamailio/commit/bd70a78ce22ab419a52e8733bc7ee27…
Author: Stefan Mititelu <stefan.mititelu(a)net2phone.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-12-14T11:52:02+01:00
topos: Updates for topos_htable module
Add htable storage modparam.
End storage dialog on negative replies.
---
Modified: src/modules/topos/doc/topos_admin.xml
Modified: src/modules/topos/topos_mod.c
Modified: src/modules/topos/tps_msg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bd70a78ce22ab419a52e8733bc7ee27…
Patch:
https://github.com/kamailio/kamailio/commit/bd70a78ce22ab419a52e8733bc7ee27…
---
diff --git a/src/modules/topos/doc/topos_admin.xml
b/src/modules/topos/doc/topos_admin.xml
index 4ccc4b7790f..f4fa47556e2 100644
--- a/src/modules/topos/doc/topos_admin.xml
+++ b/src/modules/topos/doc/topos_admin.xml
@@ -99,6 +99,11 @@
<emphasis>redis</emphasis> - Redis Backend
</para>
</listitem>
+ <listitem>
+ <para>
+ <emphasis>htable</emphasis> - htable module Backend
+ </para>
+ </listitem>
</itemizedlist>
<para>
<emphasis>
diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c
index 3214bdeb66d..c0db6ec72ec 100644
--- a/src/modules/topos/topos_mod.c
+++ b/src/modules/topos/topos_mod.c
@@ -288,6 +288,9 @@ static int mod_init(void)
_tpsdbf.close(topos_db_con);
topos_db_con = NULL;
}
+ } else if(_tps_storage.len == 6
+ && strncmp(_tps_storage.s, "htable", 6) == 0) {
+ // use htable module api
} else {
if(_tps_storage.len != 7 && strncmp(_tps_storage.s, "redis", 5) != 0)
{
LM_ERR("unknown storage type: %.*s\n", _tps_storage.len,
diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index e0e1c211923..7fff763fe26 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -1081,6 +1081,14 @@ int tps_response_received(sip_msg_t *msg)
tps_reappend_rr(msg, &btsd, &btsd.x_rr);
tps_append_xbranch(msg, &mtsd.x_vbranch1);
+ if(msg->first_line.u.reply.statuscode > 299
+ && (get_cseq(msg)->method_id
+ & (METHOD_INVITE | METHOD_SUBSCRIBE))) {
+ LM_DBG("%d reply end dialog storage\n",
+ msg->first_line.u.reply.statuscode);
+ tps_storage_end_dialog(msg, &mtsd, &stsd);
+ }
+
return 0;
error: