Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"
Hi , That should be ok. Regards, Bogdan Pauba, Kevin L wrote: > Thanks for the offer, Bogdan. I've patched it up myself just to see that it > works as expected. In msg_translator.c:received_builder() I added the #ifdef > ... #else ... #endif: > > #ifdef NOTDEFINED > memcpy(buf, RECEIVED, RECEIVED_LEN); > if ( (tmp=ip_addr2a(source_ip))==0) > return 0; /* error*/ > tmp_len=strlen(tmp); > len=RECEIVED_LEN+tmp_len; > memcpy(buf+RECEIVED_LEN, tmp, tmp_len); > #else > len=0; > #endif > > The original code was between the #ifdef and #else. This seems to work fine > although I welcome any suggested improvements. > > I was just looking for an alternative since changing OpenSIPs code is my last > resort. This LB is not SIP aware and is almost more pain to work with that > it's worth but I'm being forced into using it. > > OpenSIPs has been a great addition to our platform as it's simplified many > tasks when trying to get different SIP endpoints working together. I'm > thankful for it. > > Keep up the good work! :) > > -Original Message- > From: users-boun...@lists.opensips.org > [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu > Sent: Tuesday, February 16, 2010 5:29 AM > To: OpenSIPS users mailling list > Subject: Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY" > > Hi, > > The received param is automatically added by OpenSIPS (as per RFC) as it > detects a difference between the IP address in the VIA hdr (the UAC's > IP) and the source IP at network level (the LB's IP). > > There is no way to disable this (as it is standard SIP processing), but > if something really important for you, I can give you a patch to > disable it. > > Regards, > Bogdan > > Pauba, Kevin L wrote: > >> We are using a commercial load balancer in front of a pair of OpenSIPs >> proxies (V1.6.1). >> >> The proxies add a Via header of the form: >> >> Via: SIP/2.0/UDP >> XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3 >> >> ... and forward() on the request. >> >> The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load >> balancer) but it can't figure out where to send them (so they appear to get >> dropped). The replies need to get sent to XXX.XXX.XXX.XXX instead. >> >> Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from >> the Via? >> >> I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route >> and adding the same subst() call just before the forward() but those didn't >> work. >> >> Thanks! >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"
Thanks for the offer, Bogdan. I've patched it up myself just to see that it works as expected. In msg_translator.c:received_builder() I added the #ifdef ... #else ... #endif: #ifdef NOTDEFINED memcpy(buf, RECEIVED, RECEIVED_LEN); if ( (tmp=ip_addr2a(source_ip))==0) return 0; /* error*/ tmp_len=strlen(tmp); len=RECEIVED_LEN+tmp_len; memcpy(buf+RECEIVED_LEN, tmp, tmp_len); #else len=0; #endif The original code was between the #ifdef and #else. This seems to work fine although I welcome any suggested improvements. I was just looking for an alternative since changing OpenSIPs code is my last resort. This LB is not SIP aware and is almost more pain to work with that it's worth but I'm being forced into using it. OpenSIPs has been a great addition to our platform as it's simplified many tasks when trying to get different SIP endpoints working together. I'm thankful for it. Keep up the good work! :) -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: Tuesday, February 16, 2010 5:29 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY" Hi, The received param is automatically added by OpenSIPS (as per RFC) as it detects a difference between the IP address in the VIA hdr (the UAC's IP) and the source IP at network level (the LB's IP). There is no way to disable this (as it is standard SIP processing), but if something really important for you, I can give you a patch to disable it. Regards, Bogdan Pauba, Kevin L wrote: > We are using a commercial load balancer in front of a pair of OpenSIPs > proxies (V1.6.1). > > The proxies add a Via header of the form: > > Via: SIP/2.0/UDP > XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3 > > ... and forward() on the request. > > The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load > balancer) but it can't figure out where to send them (so they appear to get > dropped). The replies need to get sent to XXX.XXX.XXX.XXX instead. > > Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from > the Via? > > I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route > and adding the same subst() call just before the forward() but those didn't > work. > > Thanks! > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"
Hi, The received param is automatically added by OpenSIPS (as per RFC) as it detects a difference between the IP address in the VIA hdr (the UAC's IP) and the source IP at network level (the LB's IP). There is no way to disable this (as it is standard SIP processing), but if something really important for you, I can give you a patch to disable it. Regards, Bogdan Pauba, Kevin L wrote: > We are using a commercial load balancer in front of a pair of OpenSIPs > proxies (V1.6.1). > > The proxies add a Via header of the form: > > Via: SIP/2.0/UDP > XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3 > > ... and forward() on the request. > > The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load > balancer) but it can't figure out where to send them (so they appear to get > dropped). The replies need to get sent to XXX.XXX.XXX.XXX instead. > > Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from > the Via? > > I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route > and adding the same subst() call just before the forward() but those didn't > work. > > Thanks! > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Via with "received=YYY.YYY.YYY.YYY"
We are using a commercial load balancer in front of a pair of OpenSIPs proxies (V1.6.1). The proxies add a Via header of the form: Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;received=YYY.YYY.YYY.YYY;branch=z9hG4bK0eB35ab4ec1c3e0e2d3 ... and forward() on the request. The replies received by the proxy are then sent to YYY.YYY.YYY.YYY (the load balancer) but it can't figure out where to send them (so they appear to get dropped). The replies need to get sent to XXX.XXX.XXX.XXX instead. Is there some way I can remove the "received=YYY.YYY.YYY.YYY;" portion from the Via? I've tried using subst("/received=YYY\.YYY\.YYY\.YYY//") in the local_route and adding the same subst() call just before the forward() but those didn't work. Thanks! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users