From: "Mike Tkachuk" mike@yes.net.ua
Has somebody any idea how to rewrite the part of the 'To' field (165) the same as the part of header field (700403)..? in other words, how to make the 'user' field of this part of both messages the same?
INVITE sip:123456@20.30.40.50 SIP/2.0 To: sip:789@myserver.com;user=phone
I'm betting you'll find the answer is 'that's not a good thing to do'. I'm in the same spot right now, and have decided just to patch ser to make this happen on our server. We need to interop with a provider who expects the To to be in e.164 format, and since we can't expect our users to dial a + on their phone, we have to rewrite it. Looking in the developer's guide, it seems this has come up for discussion before. If you look under the documentation for the transaction module you will see:
a.. Review whether there is not potential for to-tag rewriting and ACK matching.
So this issue has obviously been visited before. However, when I asked, the answer was 'don't rewrite to' and there's that answer several times in the archives. Other SIP servers apparently do it as this provider says that they are getting the proper messages from them. A sample exchange used an Asterisk server, and some investigation turns up that Asterisk seems to have no problems rewriting.
-Keith, TSS Support