[OpenSIPS-Users] OpenSIPS B2B / RFC 4579

Carsten Bock carsten at ng-voice.com
Mon Mar 29 20:05:48 EST 2021


Hi,

I have a question. I am trying to handle REFER requests as per RFC 4579 in
OpenSIPS B2BUA Module.

User-A wants to initiate a conference with User-B and User-C.

step 1: Create Conference:
=> INVITE sip:conference at conference-url
<= 200 OK
=> ACK
--
This INVITE is forwarded to FreeSwitch to dial into a conference bridge.
--

Step 2: Add User-B to conference:
=> REFER sip:conference at conference-url (in-dialog), Refer-To: User-B
<= 202 Accepted
--
I want to send an INVITE to the same Conference Bridge in the first step
and an INVITE to User-B with a Replaces header and then bridge this
together.
It works until this step.
-- 

Step 3: Add User-C to conference:
=> REFER sip:conference at conference-url (in-dialog), Refere-To: User-C
<= 202 Accepted
--
Even though it is the same logic as for User-C, this fails with a "404 not
here" created in the b2b module, as it fails to find the dialog from Step
1?!?!?
--

Config:
route{
    if (is_method("INVITE") && !has_totag()) {
        loose_route();

        # create the server entity
        b2b_server_new("caller");

        # create the initial client entity, to connect the caller with the
callee
        b2b_client_new("callee", $ru);

        # initialize B2B session for the "refer" scenario
        b2b_init_request("refer");
        exit;
    }
}

route[b2b_logic_request] {
    if ($rm != "REFER") {
        # for requests other than REFER, no special actions needs to be
done,
        # just pass the request to the peer
        b2b_pass_request();
        exit;
    }

    if ($b2b_logic.ctx(conf) == "1") {
        b2b_send_reply(202, "Accepted");

        $var(uri) =
"sip:"+$(hdr(Refer-To){nameaddr.uri}{uri.user}{s.select,0,;})+"@"+$(hdr(Refer-To){nameaddr.uri}{uri.host});

        b2b_client_new("conf", "$ru");

        # create the client entity corresponding to
        # the user specified in the 'Refer-To' header
            b2b_client_new("referee", $var(uri));
        # bridge the referrer's peer with the referee
        b2b_bridge("conf", "referee");
   }
}

Nothing spectacular. Anyone any hints as, why the second REFER fails?

Thanks,
Carsten


--
Carsten Bock I CTO & Founder

ng-voice GmbH

Trostbrücke 1 I 20457 Hamburg I Germany
T +49 40 524 75 93-40 | M +49 179 2021244 I www.ng-voice.com

Registry Office at Local Court Hamburg, HRB 120189
Managing Directors: Dr. David Bachmann, Carsten Bock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210329/526c2a76/attachment.html>


More information about the Users mailing list