Menu

Double_rr and rr_preset

Nergal
2009-02-26
2013-05-09
  • Nergal

    Nergal - 2009-02-26

    Hello, 

    Is it planned to develop a record_route_preset function (RR module) wich is working on a double_rr context?

    A pool of SIP proxys, for Presence use, is in a DMZ and so uses two
    disconnected networks (front & back).
    But I need to show a specific IP or hostname for each record-route:
    Client or Presence server has to send their requests to the cluster IP
    (front or back) and not directly to a specific proxy.

    It would be better to use this record_route_preset function than 2
    differents instances of Opensips (Front-end interface/ Back-end
    interface) for performance and exploitation needs.

    Thank you for your help.

    Alexis

     
    • Bogdan-Andrei Iancu

      Hi Alexis,

      Use a single proxy - it is more or less the same, but more simpler.

      Have you tried to call twice the RR_preset() function ? once for inbound interface and once for the outbound interface ?

      Regards,
      Bogdan

       
    • Nergal

      Nergal - 2009-03-16

      Hello,

      If I call twice record_route_preset() function, only the first call is applied. Is it possible to modify this behavior and be able to call twice this function?

      Thank you for your help
      Alexis

      -----------------------------------------------
      Test:
      record_route_preset("1.2.3.4:5090");
      record_route_preset("4.5.6.7:5090");

      Results:
      Record-Route: <sip:1.2.3.4:5090;ftag=29947SIPpTag001;lr=on>

       
      • Bogdan-Andrei Iancu

        no, do not call it twice as it will not work -> you will get a bogus request.

        Regards,
        Bogdan

         
    • Nergal

      Nergal - 2009-03-25

      Hello,

      Thank you Bogdan.

      While I am waiting for this bogus request, I will test the patch "Change to listen= syntax to support per-interface advertised - ID: 2706135".
      Is it compliant to Opensips v1.5?
      Will it be included in a future released?

      Best regards,
      Alexis

       
    • Nergal

      Nergal - 2009-04-07

      Hello,

      I tested the patch "Change to listen= syntax to support per-interface advertised - ID: 2706135" and it works perfectly for my needs.

      Will it be included in a future release?

      Thank you for your help.

      Alexis
      ---------------------
      Results of my test:

      Extract of conf:
      # Virtual service
      listen=udp:real_IP_back:5060 AS VirtualIP_back:5060
      listen=udp:real_IP_front:5060 AS VirtualIP_front:5060
      # Real service for direct access
      listen=udp:real_IP_back:15060
      listen=udp:real_IP_front:15060
      # Module conf
      modparam("rr", "enable_double_rr", 1)
      # Main conf
      record_route();
      # Routing bloc
      force_send_socket(real_IP_back:5060);

      Test1 "Direct access":
      Record-Route:  <sip:VirtualIP_back:5060;r2=on;lr=...>
      Record-Route:  <sip:real_IP_front:15060;r2=on;lr=...>
      and on Server side:
      Via: SIP/2.0/UDP VirtualIP_back:5060;branch=...

      Test2 "Virtual access":
      Record-Route:  <sip:VirtualIP_back:5060;r2=on;lr=...>
      Record-Route:  <sip:VirtualIP_front:5060;r2=on;lr=...>
      and on Server side:
      Via: SIP/2.0/UDP VirtualIP_back:5060;branch=...

       
      • Bogdan-Andrei Iancu

        yes, the patch will be soon uploaded on SVN and it will be part of the next major release.

        Thanks and regards,
        Bogdan

         
    • Nergal

      Nergal - 2009-05-07

      Hello,

      I have a bug on the patch "Change to listen= syntax to support per-interface advertised - ID: 2706135". In the first Record-Route header, a random caracter ends the <IP:Port> entry (see below 2 tests with the same configuration and the extra caracter is ';').
      Could you help me to fix it?
      I can do more test or give you more information if you need.

      Maybe a clue: the Advertised port is 4 digits long but the real port is 5 digits long.

      conf extract:
      - X.X.X.X is a public IP
      - listen=tcp:10.143.136.8:15060 AS 10.143.136.29:5060
      - force_send_socket(10.143.136.8:15060);
      - t_relay("tcp:10.143.81.130:5060")

      --- Test OK / proto TCP ---
      1. Before SIP proxy processing (Front interface capture)
      SUBSCRIBE sip:service@pilote-sip.my_domain:5060 SIP/2.0
      Via: SIP/2.0/TCP 10.95.10.1:10005;branch=z9hG4bK-1338-1-0
      From: userA@sfr.fr <sip:sipp@10.95.10.1:10005>;tag=1338SIPpTag001
      To: userA@sfr.fr <sip:service@pilote-sip.my_domain:5060>
      Call-ID: 1-1338@10.95.10.1
      CSeq: 1 SUBSCRIBE
      Contact: sip:sipp@10.95.10.1:10005
      Max-Forwards: 70
      Subject: Subscribe Test
      Content-Length: 0

      2. After SIP proxy processing (Back interface capture)
      SUBSCRIBE sip:service@pilote-sip.my_domain:5060 SIP/2.0
      Record-Route: <sip:10.143.136.29:5060;transport=tcp;r2=on;lr=on;ftag=1338SIPpTag001>
      Record-Route: <sip:X.X.X.X:5060;transport=tcp;r2=on;lr=on;ftag=1338SIPpTag001>
      Via: SIP/2.0/TCP 10.143.136.29:5060;branch=z9hG4bKa4b3.1d7725a.0;i=9e8f
      Via: SIP/2.0/TCP 10.95.10.1:10005;rport=32769;received=10.95.10.1;branch=z9hG4bK-1338-1-0
      From: userA@sfr.fr <sip:sipp@10.95.10.1:10005>;tag=1338SIPpTag001
      To: userA@sfr.fr <sip:service@pilote-sip.my_domain:5060>
      Call-ID: 1-1338@10.95.10.1
      CSeq: 1 SUBSCRIBE
      Contact: sip:sipp@10.95.10.1:10005
      Max-Forwards: 69
      Subject: Subscribe Test
      Content-Length: 0
      --- end Test OK ---

      --- Test NOK / proto TCP ---
      1. Before SIP proxy processing (Front interface capture)
      SUBSCRIBE sip:service@pilote-sip.my_domain:5060 SIP/2.0
      Via: SIP/2.0/TCP 10.95.10.1:10003;branch=z9hG4bK-1571-1-0
      From: userA@sfr.fr <sip:sipp@10.95.10.1:10003>;tag=1571SIPpTag001
      To: userA@sfr.fr <sip:service@pilote-sip.my_domain:5060>
      Call-ID: 1-1571@10.95.10.1
      CSeq: 1 SUBSCRIBE
      Contact: sip:sipp@10.95.10.1:10003
      Max-Forwards: 70
      Subject: Subscribe Test
      Content-Length: 0

      2. After SIP proxy processing (Back interface capture)
      SUBSCRIBE sip:service@pilote-sip.my_domain:5060 SIP/2.0
      Record-Route: <sip:10.143.136.29:5060;transport=tcp;r2=on;lr=on;ftag=1571SIPpTag001>
      Record-Route: <sip:X.X.X.X:5060;;transport=tcp;r2=on;lr=on;ftag=1571SIPpTag001>
      Via: SIP/2.0/TCP 10.143.136.29:5060;branch=z9hG4bK60ec.650af5e3.0;i=83401
      Via: SIP/2.0/TCP 10.95.10.1:10003;rport=32808;received=10.95.10.1;branch=z9hG4bK-1571-1-0
      From: userA@sfr.fr <sip:sipp@10.95.10.1:10003>;tag=1571SIPpTag001
      To: userA@sfr.fr <sip:service@pilote-sip.my_domain:5060>
      Call-ID: 1-1571@10.95.10.1
      CSeq: 1 SUBSCRIBE
      Contact: sip:sipp@10.95.10.1:10003
      Max-Forwards: 69
      Subject: Subscribe Test
      Content-Length: 0
      --- end Test NOK ---

      Best regards
      Alexis

       
    • Bogdan-Andrei Iancu

      Alexis,

      Please add this bug report on the tracker, where the patch "Change to listen= syntax to support per-interface advertised - ID: 2706135" is uploaded - so that, when overviewing it, I will not forget about the bug.

      Regards,
      Bogdan

       
MongoDB Logo MongoDB