[OpenSIPS-Users] OpenSips as an inbound loadbalancer and outbound proxy - issue with routing BYES

Vlad Paiu vladpaiu at opensips.org
Mon Nov 14 10:10:27 CET 2011


Hello,

fix_route_dialog() uses the information from the Contact of the 200 OK. 
So if that is ok, you can use fix_route_dialog() to fix the bogus BYE 
messages.

Regards,

Vlad Paiu
OpenSIPS Developer


On 11/12/2011 06:22 PM, Matt Stockton wrote:
> After doing some reading, thinking that I may be able to solve my 
> problem using the dialog module and fix_route_dialog(). Since the 
> Contact Header is being re-written by the Provider, will 
> fix_route_dialog() change it on the way in to the appropriate value in 
> the dialog, causing the message to be forwarded correctly? The code 
> for what I'm thinking is below. Unfortunately, the issue is so 
> intermittent that I have not been able to re-produce the case of the 
> Provider re-writing the Contact Header since I started trying this 
> modification. Does anyone know if this strategy will work?
>
>        if (!has_totag()) {
>                 create_dialog();
>                 # initial request
>                 record_route();
>         }
>         else {
>                 # sequential request - obey the indicated route
>                 loose_route();
>
>                 if ($DLG_status!=NULL) {
>                    if (!validate_dialog()) {
>                       fix_route_dialog();
>                    }
>                 }
>
>                 t_relay();
>                 exit;
>         }
>
>
> On Fri, Nov 11, 2011 at 9:23 AM, Matt Stockton <mstockton at harqen.com 
> <mailto:mstockton at harqen.com>> wrote:
>
>     I added the following to my config:
>
>     onreply_route[pstn_outgoing] {
>        setflag(1);
>        if(t_check_status("200")) {
>          if(search("Content-type: application/sdp")) {
>             fix_nated_sdp("8", "x.x.x.x");
>          }
>        }
>     }
>
>     And the only thing that seemed to have changed in the SIP
>     signalling is, when my provider sends SIP 200 OK to OpenSips,
>     OpenSips is just re-writing the OK Content before sending onto
>     Freeswitch. It doesn't look like any messages have changed that
>     are going from OpenSips to the provider, and the provider is still
>     sending the BYE message with the Contact Header intermittently to
>     the different IPs as I described. Any more thoughts on this?
>
>     My end goal is to simply have the same OpenSips act as both an
>     inbound proxy and outbound proxy, with no registration
>     requirements. If there is an easier way to do this with OpenSips,
>     please let me know. I've looked around and checked out all the
>     referenced tutorials on the site w/r/t load balancing and routing
>
>     v=0
>     o=Sonus_UAC 14270 3732 IN IP4 x.x.x.x
>     s=SIP Media Capabilities
>     c=IN IP4 67.231.0.110
>     t=0 0
>     m=audio 25620 RTP/AVP 0 101
>     a=rtpmap:0 PCMU/8000
>     a=rtpmap:101 telephone-event/8000
>     a=fmtp:101 0-15
>     a=sendrecv
>     a=maxptime:20
>     a=oldmediaip:ACTUAL_IP
>
>
>
>     On Thu, Nov 10, 2011 at 7:17 PM, ddgiants <ddgiants at gmail.com
>     <mailto:ddgiants at gmail.com>> wrote:
>
>         Matt,
>         Sounds like you may not be topology hiding the 200OKs.
>         Some/most SIP
>         devices/SBC's etc will send a BYE to the ip address in the
>         o(owner) line of
>         the SDP of the 200OK. Some devices do not and send BYE to the
>         initator/proxy
>         they are configured for. The 200OK will have o and c. O is the
>         owner,
>         meaning signaling owner and C is the connection IP as in where
>         to send the
>         actual RTP. I use the below to change the o portion of the SDP
>         in 200 OKs
>         and works for me. Give it a try and let me know.
>
>         onreply_route[1] {
>          setflag(1);
>          if(t_check_status("200")) {
>            if(search("Content-type: application/sdp")) {
>              fix_nated_sdp("8", "x.x.x.x");
>            }
>          }
>         }
>
>         DD
>
>         --
>         View this message in context:
>         http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSips-as-an-inbound-loadbalancer-and-outbound-proxy-issue-with-routing-BYES-tp6984017p6984067.html
>         Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
>         _______________________________________________
>         Users mailing list
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111114/3f36423d/attachment.htm>


More information about the Users mailing list