Klaus,
Thanks for your continued help.
How? Does it change the Contact header?
Yes, the proxy changes the Contact header.
So the SIP server is the registrar?
Correct.
The contact usually is the IP address of the client.
So, if you the SIP
server routes based on the contact header, it should send the INVITE
directly to the client not to the proxy. Somehow this all does not fit
together.
Clarification : Both clients A and B have the proxy as an outbound
proxy. Clients register to the SIP server through the proxy. The SIP
server routes the INVITE (INVITE from A that was proxied to SIP server)
to the proxy with the R-URI being constructed based on the contents of
the Contact header (IP only no port info). This is what I meant by
saying the SIP server routes INVITE based on registered Contact (R-URI
of INVITE is based on Contact header of client B's REGISTER message).
It depends on how is the registrar - proxy or the SIP
server.
The workaround also depends on the respective buggy behavior of the sip
server (if there is one at all).
I think it is not possible to further debug this problem without a
complete trace of the scenario:
ngrep -W byline -t -d any -P "" port 5060
Attached to the email is a sip trace captured at the proxy showing
- Registration of client B
- INVITE messages originated by client A trying to call client B
- The sip trace has been edited to remove "duplicate" messages arising
from authentication
- Towards the end, the sip trace shows 4 INVITE messages from proxy to
Client B. However none of these messages reach client B because proxy
is sending to port 5060, while client B is reachable at Nated port
55000. This port information is not specified in the R-URI of INVITE
by SIP server.
- Eventually a timeout will occur (not shown in log for sake of brevity)
- Both clients A,B are behind same NAT (public ip x.x.x.226)
What needs to be done at the proxy to ensure INVITE is forwarded to the
correct port (55000 in this case) instead of the default port 5060 ?
Once again thanks for your help.
Regards,
Vikram.