I'm trying to register on a SIP server. Both client and SIP server are behind NAT and I configured port forwarding on the router (RB450) SIP server behind. SIP ALG are enabled on both NAT routers. I sniffed the traffic on my RB450 and I see that SIP ALG works fine changing IP on Layer 7 in a appropriate way for the first step in registration process:
My client send REGISTER packet. Server answers UNAUTHORIZED as it should be. Now, client sends authorization data and I see that SIP ALG doesn't amend authorization URI. It's still the WAN IP of my RB450, not the IP of SIP Server that packets forwarded to. SIP Server simply doesn't answer the packet with IP in authorization URI that doesn't belong to SIP Server. As a result client сan't register on the SIP Server.
My question is: Does SIP ALG work correctly? It replaces every IP after port forwarding in packet - in "Request line", in "To" header but not the one in authorization URI.