[Serusers] How SER communicate to other SIP server
roayu
roayu at ctisys.net
Tue Jul 3 11:43:26 CEST 2007
Hi, Olaf!
In that case, since it's not recommended to change the TO header, is there
any other ways I can make the SER to route to another SIP server without
using rewritehostport()?
Thanks.
Best regards,
Roa Yu
-----Original Message-----
From: Olaf Bergmann [mailto:Olaf.Bergmann at freenet-ag.de]
Sent: Tuesday, July 03, 2007 4:36 PM
To: roayu
Cc: serusers at lists.iptel.org
Subject: Re: [Serusers] How SER communicate to other SIP server
roayu wrote:
> that's the reason why I need to change the URI (of the TO header).
No, it is not. At least if your user agent and other servers
implement the same RFC 3261 as most of the other SIP servers in the
world do.
> just failed to change the uri at the TO header. Therefore, it couldn't
route
> to another SIP server.
>
> Current FROM/TO uri that I get,
> From : <sip:12345 at mySER.net:5060>
> To : <sip:88888888 at mySER.net:5060>
>
> The actual FROM/TO uri that I WANT will be,
> From : <sip:12345 at mySER.net:5060>
> To : <sip:88888888 at anotherSIP.net:5060>
>
> I've checked on the regular expression, and it's fine with that. Am I
using
> the correct function - rewritehostport()?
Well, rewritehostport() changes the request URI, not the URI part of
the To header field. This is fine for most applications, but if you
really want to change the contents of the To header, you will have
to use something like replace_hf(). But it is not recommended to do
that. Really. SIP is designed to work without replacing the To. In
fact, applications are more likely to break if it is changed.
Regards,
Olaf
More information about the sr-users
mailing list