Module: kamailio
Branch: 4.3
Commit: 648834a64d63aed64076dacf85ec5af1a5702333
URL: https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-10T13:59:16+02:00
rls: proper detection of initial subscribe to send notify with full state
- use to-tag conditions, previously was sending only based on db mode
- reported by GH#276
(cherry picked from commit b99e9e96592a5d708ff565343f3c810b2d264577)
---
Modified: modules/rls/subscribe.c
---
Diff: https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
Patch: https://github.com/kamailio/kamailio/commit/648834a64d63aed64076dacf85ec5af…
---
diff --git a/modules/rls/subscribe.c b/modules/rls/subscribe.c
index a4735b2..9c24ac7 100644
--- a/modules/rls/subscribe.c
+++ b/modules/rls/subscribe.c
@@ -781,9 +781,9 @@ int rls_handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_doma
}
}
- if (dbmode != RLS_DB_ONLY)
+ if (get_to(msg)->tag_value.s==NULL || get_to(msg)->tag_value.len==0)
{
- /* sending notify with full state */
+ /* initial subscriber - sending notify with full state */
if(send_full_notify(&subs, service_node, &subs.pres_uri, hash_code)<0)
{
LM_ERR("failed sending full state notify\n");
Module: kamailio
Branch: 4.3
Commit: a58c136c3abad48b2d01a4b54b1e56e0901b8246
URL: https://github.com/kamailio/kamailio/commit/a58c136c3abad48b2d01a4b54b1e56e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-10T13:59:16+02:00
dialog: safety check not to store dialog vars and data when state initial
- acc callbacks for cdrs can trigger setting dialog vars in initial
state, which then try to save in db, however, initial state might not
have all required fields for a proper db reload, storing being
desinged to be done when all mandatory fields are set
(cherry picked from commit cecdd0817052046e634152d6e512165451b5f6d4)
---
Modified: modules/dialog/dlg_db_handler.c
---
Diff: https://github.com/kamailio/kamailio/commit/a58c136c3abad48b2d01a4b54b1e56e…
Patch: https://github.com/kamailio/kamailio/commit/a58c136c3abad48b2d01a4b54b1e56e…
---
diff --git a/modules/dialog/dlg_db_handler.c b/modules/dialog/dlg_db_handler.c
index 117db20..aaa8ff4 100644
--- a/modules/dialog/dlg_db_handler.c
+++ b/modules/dialog/dlg_db_handler.c
@@ -711,6 +711,11 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
&sflags_column, &toroute_name_column, &req_uri_column,
&xdata_column, &iflags_column };
+ if(cell->state<DLG_STATE_EARLY) {
+ LM_DBG("not storing dlg in db during initial state\n");
+ return 0;
+ }
+
i = 0;
if( (cell->dflags & DLG_FLAG_NEW) != 0
|| (cell->dflags & DLG_FLAG_CHANGED_VARS) != 0) {
Module: kamailio
Branch: master
Commit: b99e9e96592a5d708ff565343f3c810b2d264577
URL: https://github.com/kamailio/kamailio/commit/b99e9e96592a5d708ff565343f3c810…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-10T12:24:07+02:00
rls: proper detection of initial subscribe to send notify with full state
- use to-tag conditions, previously was sending only based on db mode
- reported by GH#276
---
Modified: modules/rls/subscribe.c
---
Diff: https://github.com/kamailio/kamailio/commit/b99e9e96592a5d708ff565343f3c810…
Patch: https://github.com/kamailio/kamailio/commit/b99e9e96592a5d708ff565343f3c810…
---
diff --git a/modules/rls/subscribe.c b/modules/rls/subscribe.c
index a4735b2..9c24ac7 100644
--- a/modules/rls/subscribe.c
+++ b/modules/rls/subscribe.c
@@ -781,9 +781,9 @@ int rls_handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_doma
}
}
- if (dbmode != RLS_DB_ONLY)
+ if (get_to(msg)->tag_value.s==NULL || get_to(msg)->tag_value.len==0)
{
- /* sending notify with full state */
+ /* initial subscriber - sending notify with full state */
if(send_full_notify(&subs, service_node, &subs.pres_uri, hash_code)<0)
{
LM_ERR("failed sending full state notify\n");