[Serusers] Help rewriting "To" URI

José Nunes jnunes at av.it.pt
Wed Nov 26 14:00:35 CET 2003


Hello Bernie,

Indeed I was taking the wrong way to solve my problem (I should do a more
thorough reading of the docs :-)).
I do not intend to go so far as to implementing a B2BUA, in the moment I
only want redirection, not keeping the dialog state.
Now I can achieve my goal using the do_action function to change the request
URI.

Thanks for your help,

José Nunes
----- Original Message -----
From: "Bernie Hoeneisen" <bhoeneis at switch.ch>
To: "José Nunes" <jnunes at av.it.pt>
Cc: <serusers at lists.iptel.org>
Sent: Tuesday, November 25, 2003 5:11 PM
Subject: Re: [Serusers] Help rewriting "To" URI


Hi Jose!

Routing decisions are never made based on the To: header field.
Only the Request-URI and the topmost Route: haeder field are basis for
routing decisions (see also RFC 3261).
I guess this is why your implementation doesn't work as planned.

AFAIK a proxy changing the To: header field is not allowed, except
adding a tag.
Furthermore I would expect interoperability problems, if a proxy in the
middle changes the To: header field. (Certainly such problems occur with
legacy RFC 2543 UAs.)

What you are trying to implement looks like a Back-2-Back-User-Agent
(B2BUA).

 T: Bernie


On Tue, 25 Nov 2003, José Nunes wrote:

> Hello,
>
> I've been working whit SER for a while, and I need to have some way of
> redirecting Invites dynamicly. The idea is similar to the definition of
> groups (local,ld,...), only I want to be able to define the redirection
> address without having to rewrite ser.cfg (and therefor reinitialize
> SER).  The part of defining these new groups and addresses was
> straightforward, after that I tried to build a module that would have a
> function to do the writing of the "To" URI. The only function I found to
> alter the destination URI was append_branch. The module compiles without
> error and SER works normally, except it does not do the redirections
> that I was hoping. Are there any other ways of adding/rewriting
> something to the body of "To" in the SIP message? Or one can only do
> that in ser.cfg?
>
> Thanks in advance,
>
> José Nunes





More information about the sr-users mailing list