#220 B2B_LOGIC: completely lumps support

trunk
closed-accepted
modules (179)
5
2013-01-28
2012-04-20
Nick Altmann
No

Now you can change all parts of message before b2b_init_request call and in b2b_request/b2b_reply routes.

It useful for add additional headers before b2b_init_request to pass through b2b (don't forget custom_headers param) and also for NAT processing in b2b_request/b2b_reply routes.

Instead of patch #3515749. Please, ignore/remove old patch.

Discussion

    • assigned_to: nobody --> bogdan_iancu
     
  • Nick Altmann
    Nick Altmann
    2012-09-10

    Added actual v3 patch.

     
  • Nick Altmann
    Nick Altmann
    2012-10-18

    Added v4 patch.
    Fixed:
    - b2b_request_route called before tm transaction created. Now we can use force_rport() and change contact header in b2b_request_route. We use it to process NAT on b2b.

     
  • Nick Altmann
    Nick Altmann
    2012-10-18

    The way we use this patch in our production environment to process NAT via b2b:

    route {
    force_rport();

    # Here are some checks, deny non-invite requests.

    # Fix NATed contact and SDP in client requests
    if (nat_uac_test("19")) fix_nated_contact();
    if ( (has_body("application/sdp")) && (nat_uac_test("8")) ) fix_nated_sdp("10");

    b2b_init_request("top hiding");
    exit;
    }

    route[B2B_REQUEST] {
    force_rport();

    # Fix NATed contact and SDP in client requests
    if (nat_uac_test("19")) fix_nated_contact();
    if ( (has_body("application/sdp")) && (nat_uac_test("8")) ) fix_nated_sdp("10");

    # Also we can add this our custom headers
    }

    route[B2B_REPLY] {
    # Here we can also add our custom headers
    }

    onreply_route {
    # Fix NATed contact and SDP in client replies
    if (nat_uac_test("97")) fix_nated_contact();
    if ( (has_body("application/sdp")) && (nat_uac_test("8")) ) fix_nated_sdp("10");
    }

     
    • status: open --> closed-accepted