[OpenSIPS-Users] OpenSIPS B2B / RFC 4579

Nick Altmann nick at altmann.pro
Mon Mar 29 20:54:58 EST 2021


Hi Carsten,

"404 not here" can't be generated by the b2b module itself, it means that
"404 not here" came from another part, I think from part C.
Best way to check this is to capture sip traffic.

--
Nick


пн, 29 мар. 2021 г. в 22:08, Carsten Bock <carsten at ng-voice.com>:

> 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
> _______________________________________________
> 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/20210329/513f6943/attachment.html>


More information about the Users mailing list