[SR-Users] Wrong "To" header in CANCEL, when "To" has been rewritten by uac_replace_to() in branch route

Julia juliabo at gmail.com
Thu Nov 7 09:31:10 CET 2013


Hello,

 

I know it was already discussed, that not recommended to modify "To" header
and no routing should ever be done on "To".

But as long as there are carriers that do it, we need full support for this
manipulation for all messages in the call flow.

 

I found in list a few mails with the same problem of wrong header "To" in
CANCEL after "To" rewriting.

And one solution from Vitaliy Aleksandrov :

http://lists.sip-router.org/pipermail/sr-dev/2012-October/016657.html

 
"Kamailio builds "To" header from the received INVITE.
 
Patch to fix it:
 
--- ./kamailio-3.2.3/modules/tm/t_cancel.c      2012-08-22 
10:39:21.000000000 +0300
+++ ./kamailio-3.2.3-fixed/modules/tm/t_cancel.c       2012-10-01 
18:25:57.000000000 +0300
@@ -284,7 +284,7 @@
         if (cfg_get(tm, tm_cfg, reparse_invite)) {
                 /* build the CANCEL from the INVITE which was sent out */
                 cancel = build_local_reparse(t, branch, &len, CANCEL, 
CANCEL_LEN,
- &t->to
+                                                                       NULL
         #ifdef CANCEL_REASON_SUPPORT
                                                                          ,
reason
         #endif /* CANCEL_REASON_SUPPORT */"
 
 
 
We use header "To" manipulation in branch route (after failure route) and
this patch solved our problem with "To" in CANCEL.
 
But a patch is not committed.
 
Is it possible to commit this solution?
 
Thank you,
 
Julia
 
 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131107/642660c6/attachment.html>


More information about the sr-users mailing list