Module: kamailio
Branch: 5.0
Commit: 5738001c0f2ab2c1fd6bee9dbfdec5414fb9bce0
URL:
https://github.com/kamailio/kamailio/commit/5738001c0f2ab2c1fd6bee9dbfdec54…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-28T18:55:59+02:00
topos: proper storing of b-side record routing
- special credits to Sergey Basov for troubleshooting
(cherry picked from commit fec80f51a64ab102aca79c44d61c6c783b0baa46)
---
Modified: src/modules/topos/tps_msg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5738001c0f2ab2c1fd6bee9dbfdec54…
Patch:
https://github.com/kamailio/kamailio/commit/5738001c0f2ab2c1fd6bee9dbfdec54…
---
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);