Hello,
On 11/7/13 10:39 AM, Julia wrote:
Hello Daniel,
Version 3.3.5,
We use uac_replace_to() in branch route and without patch the "To" in local CANCEL is taken from original INVITE.
3.3.x doesn't have it. The patch you mentioned is fixing it, but not like it is on 4.0 or master branch -- it will just make it always to use to header from outgoing branch. The right way is to backport from 4.0 or master, so it preserves the behaviour when upgrading form 3.3 to newer version. There is an item on tracker as well, but no developer jumped on it and I couldn't find the time to check all changes towards 4.0 and do the patch. If someone will provide it, I will review it quickly and commit.
Cheers, Daniel
Thank you,
Julia
*From:*sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] *On Behalf Of *Daniel-Constantin Mierla *Sent:* Thursday, November 07, 2013 11:30 AM *To:* Kamailio (SER) - Users Mailing List *Subject:* Re: [SR-Users] Wrong "To" header in CANCEL, when "To" has been rewritten by uac_replace_to() in branch route
Hello,
what version do you have and what function is used to change the To header?
If you use uac_replace_to() with latest stable version, the new To header should be used for local CANCEL and ACK.
Cheers, Daniel
On 11/7/13 9:31 AM, Julia wrote:
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 thereare carriers that do it, we need full support for this manipulation for all messages in the call flow.
Ifound in list a fewmails 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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda http://twitter.com/#%21/miconda -http://www.linkedin.com/in/miconda Kamailio Advanced Trainings -Berlin, Nov 25-28
- more details about Kamailio trainings athttp://www.asipto.com -