Record-Route port is not the same as local used port

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Record-Route port is not the same as local used port

OpenSIPS - Users mailing list
Hi,

I am using opensips 2.1. I have an opensips server acting as a proxy using the dispatcher module. The destinations in the dispatcher table are TCP destinations with a destination port of 10000. From sniffing the network I see that opensips picks a random local port to send TCP messages from. 

If I use record_route() from my configuration then the rr header thats added to the SIP message contains my proxy IP and port 10000 instead of the actual port used. Of course when I receive following SIP messages I will receive them through 10000 and reject them as not coming in through the right port.

What am I missing here?

Royee

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Record-Route port is not the same as local used port

OpenSIPS - Users mailing list
I think I understand now the concept now and this is actually how it should work.

I have another problem though. I am doing protocol conversion on the proxy side (tls->tcp) and record_route() adds a double rr header. The issue is that one of them contains the private IP instead of the public IP. When the device receives this it fails to connect back to this address. How can I set both of the rr headers to the public IP? I am using: advertised address, global 'listen' for ports: 5060, 10000, 10002 (tls).

Thanks,
Royee

On Sun, Dec 17, 2017 at 1:41 PM Royee Tichauer <[hidden email]> wrote:
Hi,

I am using opensips 2.1. I have an opensips server acting as a proxy using the dispatcher module. The destinations in the dispatcher table are TCP destinations with a destination port of 10000. From sniffing the network I see that opensips picks a random local port to send TCP messages from. 

If I use record_route() from my configuration then the rr header thats added to the SIP message contains my proxy IP and port 10000 instead of the actual port used. Of course when I receive following SIP messages I will receive them through 10000 and reject them as not coming in through the right port.

What am I missing here?

Royee

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Record-Route port is not the same as local used port

Bogdan-Andrei Iancu-2
Hi Royee,

OpenSIPS will add the in the 2 RR headers the inbound and outbound listening interfaces (if not override by an advertise address). So can you share the listening sockets you have (priv versus public), the advertise value and what you get into RR headers ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 12/18/2017 12:22 PM, Royee Tichauer via Users wrote:
I think I understand now the concept now and this is actually how it should work.

I have another problem though. I am doing protocol conversion on the proxy side (tls->tcp) and record_route() adds a double rr header. The issue is that one of them contains the private IP instead of the public IP. When the device receives this it fails to connect back to this address. How can I set both of the rr headers to the public IP? I am using: advertised address, global 'listen' for ports: 5060, 10000, 10002 (tls).

Thanks,
Royee

On Sun, Dec 17, 2017 at 1:41 PM Royee Tichauer <[hidden email]> wrote:
Hi,

I am using opensips 2.1. I have an opensips server acting as a proxy using the dispatcher module. The destinations in the dispatcher table are TCP destinations with a destination port of 10000. From sniffing the network I see that opensips picks a random local port to send TCP messages from. 

If I use record_route() from my configuration then the rr header thats added to the SIP message contains my proxy IP and port 10000 instead of the actual port used. Of course when I receive following SIP messages I will receive them through 10000 and reject them as not coming in through the right port.

What am I missing here?

Royee


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users