[sr-dev] git:master:5d652fa2: tm: copy on_reply and on_failure routes to new branch on DNS based failover

Alex Hermann alex at speakup.nl
Tue Aug 30 13:47:55 CEST 2016


Module: kamailio
Branch: master
Commit: 5d652fa27cdffd90a5328b725220bc8fdb079fa3
URL: https://github.com/kamailio/kamailio/commit/5d652fa27cdffd90a5328b725220bc8fdb079fa3

Author: Alex Hermann <alex at speakup.nl>
Committer: Alex Hermann <alex at speakup.nl>
Date: 2016-08-02T12:13:10+02:00

tm: copy on_reply and on_failure routes to new branch on DNS based failover

---

Modified: modules/tm/t_fwd.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5d652fa27cdffd90a5328b725220bc8fdb079fa3.diff
Patch: https://github.com/kamailio/kamailio/commit/5d652fa27cdffd90a5328b725220bc8fdb079fa3.patch

---

diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index b1a047c..51335ee 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -1019,6 +1019,9 @@ int add_uac_dns_fallback(struct cell *t, struct sip_msg* msg,
 			/* copy the dns handle into the new uac */
 			dns_srv_handle_cpy(&t->uac[t->nr_of_outgoings].dns_h,
 								&old_uac->dns_h);
+			/* copy the onreply and onfailure routes */
+			t->uac[t->nr_of_outgoings].on_failure = old_uac->on_failure;
+			t->uac[t->nr_of_outgoings].on_reply = old_uac->on_reply;
 
 			if (cfg_get(tm, tm_cfg, reparse_on_dns_failover)){
 				/* Reuse the old buffer and only replace the via header.




More information about the sr-dev mailing list