Hi, Olaf!
Oops, I accidentally deleted the semi-colon(;) at the closing of the IF statement. I know that the SIP messages are routed according to the URI and that's the reason why I need to change the URI (of the TO header). But I 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@mySER.net:5060 To : sip:88888888@anotherSIP.net:5060
The actual FROM/TO uri that I WANT will be, From : sip:12345@mySER.net:5060 To : sip:88888888@anotherSIP.net:5060
I've checked on the regular expression, and it's fine with that. Am I using the correct function - rewritehostport()?
Thanks.
Best regards, Roa Yu
-----Original Message----- From: Olaf Bergmann [mailto:Olaf.Bergmann@freenet-ag.de] Sent: Tuesday, July 03, 2007 3:07 PM To: roayu Cc: serusers@lists.iptel.org Subject: Re: [Serusers] How SER communicate to other SIP server
roayu wrote:
routing
to sipB.net? If yes, how do I change the TO header or make it route to sipB.net?
No, SIP messages are routed according to their request URI. I am not sure if the regular expression in your if-clause was corrupted by the E-Mail service (if not, at least a closing bracket is missing). I suggest, you start with a simplified version of this regexp to be sure that the then-part is evaluated at all. Use xlog() to add a couple of debug messages to find out which routing blocks are evaluated.
Regards, Olaf