[sr-dev] git:kamailio_3.0: topoh: add prefix to encoded callid
Daniel-Constantin Mierla
miconda at gmail.com
Sun Jan 3 12:01:25 CET 2010
Module: sip-router
Branch: kamailio_3.0
Commit: 89c8c1733777f48a94004eedb6a891717260c0e5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=89c8c1733777f48a94004eedb6a891717260c0e5
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Sun Dec 20 12:46:10 2009 +0100
topoh: add prefix to encoded callid
(cherry picked from commit 9d5a1ff7736d49794d5ca0f29e118d90f0ee5b68)
---
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 eab6a42..5a4837c 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -39,6 +39,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;
@@ -208,8 +209,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");
@@ -444,8 +445,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 fdba6a1..53eb111 100644
--- a/modules/topoh/topoh_mod.c
+++ b/modules/topoh/topoh_mod.c
@@ -47,6 +47,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};
More information about the sr-dev
mailing list