<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Helvetica 75 Bold";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.msipfootered91ed98, li.msipfootered91ed98, div.msipfootered91ed98
{mso-style-name:msipfootered91ed98;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Cambria",serif">H<span style="color:#002060">ello all,<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif">Sending this question one more time, hope i can’t get some ideas to move forward.<span style="color:#002060"><o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif;color:#002060">We are trying to implement the « REFER » method in opensips 3.3. we used this documentation :<o:p></o:p></span></p>
<p class="MsoNormal"><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2FDocumentation%2FTutorials-B2BUA%23toc15&data=05%7C01%7Camel.guesmi%40orange.com%7C181723563d0c43181dce08db9429c16f%7C90c7a20af34b40bfbc48b9253b6f5d20%7C0%7C0%7C638266679269197623%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=icy4eVaC2QsWW%2FZRcnUT0xQfGYAPYDUNiJyE2pW7NtY%3D&reserved=0">openSIPS
| Documentation / Tutorials-B2BUA</a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif;color:#002060">When we detect a REFER method, we are excuting those functions :<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR">
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> b2b_send_reply(202, "Accepted");<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> # Example: Send NOTIFY request<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> $var(destination) = $hdr(Refer-From);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> $var(message_body) = "This is the message body of the NOTIFY";<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> send_request("NOTIFY", $var(destination), $hdr(Refer-To), $var(message_body));
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> <o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> # create the client entity corresponding to<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> # the user specified in the 'Refer-To' header<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> b2b_client_new("referee", $hdr(Refer-To));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> # bridge the referrer's peer with the referee<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> b2b_bridge("peer", "referee");<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> #b2b_end_dlg_leg();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Cambria",serif;color:#002060">With that scenario, we succeeded in transfering a call after the REFER and we are tryning now to implement that process with « Notify » after the REFER (see the flow
</span><span lang="EN-US" style="font-family:"Cambria",serif">in the following link<span style="color:#002060">).<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><a href="https://assets.cdn.prod.twilio.com/images/REFER_-_User_docs_2.width-800.png">REFER_-_User_docs_2.width-800.png (720×540) (twilio.com)</a><span style="font-family:"Cambria",serif;color:#002060"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Cambria",serif;color:#002060">For this, when we open the new client session, we don’t end the session with the one sending the REFER and we need to detect when the call is accepted by the Callee
</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR">(200 OK)</span><span lang="EN-US" style="font-family:"Cambria",serif;color:#002060"> when we are using that function</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">
:</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"> b2b_client_new("referee", $hdr(Refer-To));<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Cambria",serif">My question :
<span style="color:#002060">How can we detect the </span></span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:FR">200 OK</span><span lang="EN-US" style="font-family:"Cambria",serif;color:#002060"> in that B2B mode in order to send
the NOTIFY before ending the session with Alice.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Cambria",serif">Thank you very much
<span style="color:#002060"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family:"Cambria",serif;color:#002060">BR, Amel
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="msipfootered91ed98" align="center" style="margin:0cm;text-align:center">
<span style="font-size:8.0pt;font-family:"Helvetica 75 Bold";color:#ED7D31">Orange Restricted</span><o:p></o:p></p>
</div>
</body>
</html>