Module: sip-router
Branch: master
Commit: 9d5a1ff7736d49794d5ca0f29e118d90f0ee5b68
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d5a1ff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Dec 20 12:46:10 2009 +0100
topoh: add prefix to encoded callid
---
modules/topoh/th_msg.c | 9 +++++----
modules/topoh/topoh_mod.c | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c
index 9f078f6..bd9cdaa 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -46,6 +46,7 @@ extern str th_cookie_name;
extern str th_cookie_value;
extern str th_via_prefix;
extern str th_uri_prefix;
+extern str th_callid_prefix;
extern str th_ip;
extern str th_uparam_name;
@@ -215,8 +216,8 @@ int th_mask_callid(sip_msg_t *msg)
return -1;
}
- out.s = th_mask_encode(msg->callid->body.s, msg->callid->body.len, 0,
- &out.len);
+ out.s = th_mask_encode(msg->callid->body.s, msg->callid->body.len,
+ &th_callid_prefix, &out.len);
if(out.s==NULL)
{
LM_ERR("cannot encode callid\n");
@@ -451,8 +452,8 @@ int th_unmask_callid(sip_msg_t *msg)
return -1;
}
- out.s = th_mask_decode(msg->callid->body.s, msg->callid->body.len, 0, 0,
- &out.len);
+ out.s = th_mask_decode(msg->callid->body.s, msg->callid->body.len,
+ &th_callid_prefix, 0, &out.len);
if(out.s==NULL)
{
LM_ERR("cannot decode callid\n");
diff --git a/modules/topoh/topoh_mod.c b/modules/topoh/topoh_mod.c
index c1a8b9c..37eefae 100644
--- a/modules/topoh/topoh_mod.c
+++ b/modules/topoh/topoh_mod.c
@@ -62,6 +62,7 @@ str th_uparam_prefix = {"sr-", 0};
str th_vparam_name = {"branch", 0};
str th_vparam_prefix = {"z9hG4bKsr-", 0};
+str th_callid_prefix = {"!!:", 3};
str th_via_prefix = {0, 0};
str th_uri_prefix = {0, 0};