Module: kamailio
Branch: master
Commit: fec80f51a64ab102aca79c44d61c6c783b0baa46
URL:
https://github.com/kamailio/kamailio/commit/fec80f51a64ab102aca79c44d61c6c7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-28T16:10:59+02:00
topos: proper storing of b-side record routing
- special credits to Sergey Basov for troubleshooting
---
Modified: src/modules/topos/tps_msg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fec80f51a64ab102aca79c44d61c6c7…
Patch:
https://github.com/kamailio/kamailio/commit/fec80f51a64ab102aca79c44d61c6c7…
---
diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index 41dcd90..462dedd 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -443,8 +443,15 @@ int tps_pack_message(sip_msg_t *msg, tps_data_t *ptsd)
ptsd->a_rr.len++;
} else {
/* sip response - get b-side record route */
+ if(i==1) {
+ ptsd->b_rr.s = ptsd->cp;
+ }
+ if(i>1) {
+ *ptsd->cp = ',';
+ ptsd->cp++;
+ ptsd->b_rr.len++;
+ }
*ptsd->cp = '<';
- ptsd->b_rr.s = ptsd->cp;
ptsd->cp++;
ptsd->b_rr.len++;
memcpy(ptsd->cp, rr->nameaddr.uri.s, rr->nameaddr.uri.len);