Module: kamailio
Branch: master
Commit: 8301f366538ef7e63096d9fe10fa5c2aee780e81
URL:
https://github.com/kamailio/kamailio/commit/8301f366538ef7e63096d9fe10fa5c2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-01T09:44:59+02:00
topos: store branch record before dialog record
---
Modified: src/modules/topos/tps_storage.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8301f366538ef7e63096d9fe10fa5c2…
Patch:
https://github.com/kamailio/kamailio/commit/8301f366538ef7e63096d9fe10fa5c2…
---
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index ae4a635c1f..ae7a4ec2c1 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -545,6 +545,8 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int
dir)
ret = tps_storage_link_msg(msg, td, dir);
if(ret<0) goto error;
+ ret = _tps_storage_api.insert_branch(td);
+ if(ret<0) goto error;
if(dialog==0) {
if(td->as_contact.len <= 0 && td->bs_contact.len <= 0) {
LM_WARN("no local address - do record routing for all initial requests\n");
@@ -552,8 +554,6 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int
dir)
ret = _tps_storage_api.insert_dialog(td);
if(ret<0) goto error;
}
- ret = _tps_storage_api.insert_branch(td);
- if(ret<0) goto error;
return 0;