[OpenSIPS-Users] Protocol conversion - Double record route issue
Hamid Hashmi
hamid2kviii at hotmail.com
Tue Feb 23 06:33:15 CET 2016
I am using opensips as an edge proxy on Amazon EC2 (server behind NAT) and it works fine if It only works on UDP or TCP. but if I need to translate from TCP -> UDP, ACK does not reach proxy server due to private IP in record-route.
EdgeProxy -> B#
INVITE sip:923003000200 at 182.185.200.42:46488;transport=tcp;line=fd2af176e9c88c3 SIP/2.0
Record-Route: <sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=ae2b3a03>
Record-Route: <sip:192.168.26.180:6080;r2=on;lr;ftag=ae2b3a03>
Record-Route: <sip:+923003000200 at 192.168.26.181:8000;lr;ftag=ae2b3a03;did=077.9923f675;nat=yes>
Record-Route: <sip:52.76.50.195:6080;r2=on;lr;ftag=ae2b3a03;EdgeProxy=true>
Record-Route: <sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=ae2b3a03;EdgeProxy=true>
Via: SIP/2.0/TCP 52.76.50.195:6080;branch=z9hG4bK4a7b.55d0e535.0
Via: SIP/2.0/UDP 192.168.26.181:8000;branch=z9hG4bK4a7b.0b4f27b4.0
Via: SIP/2.0/UDP 52.76.50.195:6080;rport=6080;received=192.168.26.180;branch=z9hG4bK4a7b.45d0e535.0;i=2
Via: SIP/2.0/TCP 103.255.5.24:47590;received=103.255.5.24;branch=z9hG4bK-524287-1---74668ff8d4027b7c;rport=47590
Max-Forwards: 67
Contact: <sip:923007777777 at 103.255.5.24:47590;transport=TCP>
To: <sip:+923003000200 at 52.76.50.195:6080;transport=TCP>
From: "+923007777777"<sip:+923007777777 at 52.76.50.195>;tag=ae2b3a03
EdgeProxy -> A#
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.10.13:6060;received=182.185.200.42;rport=47103;branch=z9hG4bK801489929
Record-Route: <sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=1252633513>
Record-Route: <sip:192.168.26.180:6080;r2=on;lr;ftag=1252633513>
Record-Route: <sip:+923007777777 at 192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes>
Record-Route: <sip:52.76.50.195:6080;r2=on;lr;ftag=1252633513;EdgeProxy=true>
Record-Route: <sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=1252633513;EdgeProxy=true>
Contact: <sip:923007777777 at 103.255.5.24:48469;transport=TCP>
To: <sip:+923007777777 at 52.76.50.195:6080>;tag=12b65b6d
From: <sip:923003000200 at 52.76.50.195:6080>;tag=1252633513
A# -> EdgeProxy
ACK sip:923007777777 at 103.255.5.24:48469;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 192.168.10.13:6060;rport;branch=z9hG4bK184821964
Route: <sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=1252633513;EdgeProxy=true>
Route: <sip:52.76.50.195:6080;r2=on;lr;ftag=1252633513;EdgeProxy=true>
Route: <sip:+923007777777 at 192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes>
Route: <sip:192.168.26.180:6080;r2=on;lr;ftag=1252633513>
Route: <sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=1252633513>
From: <sip:923003000200 at 52.76.50.195:6080>;tag=1252633513
To: <sip:+923007777777 at 52.76.50.195:6080>;tag=12b65b6d
Client send ACK to Private IP of Edge proxy. While it should send it to its Public IP.
opensips inserts routes inversely incase of protocol translation. It should insert Double route with private IP first and public IP afterwards INSTEAD of public IP first for OUTBOUND INVITEs.
Hamid R. HashmiSoftware Engineer - VoIPVopium A/S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160223/4876f24e/attachment.htm>
More information about the Users
mailing list