<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=us-ascii">
<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:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* 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:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle23
{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:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1321080092;
mso-list-template-ids:394565224;}
@list l1
{mso-list-id:1870220627;
mso-list-template-ids:1429095356;}
@list l1:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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="EN-CA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Bogdan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yes, I’m trying to figure out a way to implement correct Id in event header of NOTIFY for REFER. Can I ask for the suggestion on how to move forward?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Li<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-CA">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-CA"> Bogdan-Andrei Iancu <bogdan@opensips.org>
<br>
<b>Sent:</b> August 9, 2022 5:00 AM<br>
<b>To:</b> OpenSIPS users mailling list <users@lists.opensips.org>; Li Cai <Li.Cai@comtech.com><br>
<b>Subject:</b> Re: [OpenSIPS-Users] About obstacles to implement the matched Id in event header of NOTIFY(REFER)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <span style="mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:3.0pt"><strong><span style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:red;border:solid gray 3.0pt;padding:0cm;background:lightgrey">WARNING: External Email: Exercise Caution</span></strong><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
<br>
</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Hi Li,<br>
<br>
If I understand correctly, you try to improve the b2b support in OpenSIPS in order to properly handle that NOTIFY for REFER, right ?<br>
<br>
Regards,<br>
<br>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre> <a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7CLi.Cai%40comtech.com%7Caa7c80c3658c4d3945f408da79e59f87%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637956324395132469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VIMtpd2MeOVvrbL2OZTpZTgE9WkrNqkAhpblo%2BHzEDE%3D&reserved=0">https://www.opensips-solutions.com</a><o:p></o:p></pre>
<pre>OpenSIPS Summit 27-30 Sept 2022, Athens<o:p></o:p></pre>
<pre> <a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7CLi.Cai%40comtech.com%7Caa7c80c3658c4d3945f408da79e59f87%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637956324395132469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CANaT64J1XgnShZ9q4gOIfT5PHG8LRUoB%2BSKkGFrUMk%3D&reserved=0">https://www.opensips.org/events/Summit-2022Athens/</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 7/22/22 11:02 PM, Li Cai wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi experts,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m working on the implementation for ‘2.4.6 Multiple REFER Requests in a Dialog’ of RFC3515 in a B2B SIP Proxy. Right now, I got stuck with two problems in the solution. Please see the paragraph from RFC- </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> A REFER creates an implicit subscription sharing the dialog</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> identifiers in the REFER request. If more than one REFER is issued</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> in the same dialog (a second attempt at transferring a call for</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> example), the dialog identifiers do not provide enough information to</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> associate the resulting NOTIFYs with the proper REFER.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> Thus, for the second and subsequent REFER requests a UA receives in a</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> given dialog, it MUST include an id parameter[2] in the Event header</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> field of each NOTIFY containing the sequence number (the number from</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> the CSeq header field value) of the REFER this NOTIFY is associated</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> with. This id parameter MAY be included in NOTIFYs to the first</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> REFER a UA receives in a given dialog. A SUBSCRIBE sent to refresh</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> or terminate this subscription MUST contain this id parameter.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Different from the definition in RFC, the NOTIFY forwarded by the proxy contains the same Id in Event header as the other side. Please see the below chart –</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> B2BProxy</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> |
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> <- REFER 2 (Cseq=2) | <-REFER 1 (Cseq=1003)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> . . . | . . .</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">->NOTIFY 1 (event:<b>id=2</b>) | ->NOTIFY 2 (<u>event<b>:id=2</b>)</u></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">The current problem is, the above NOTIFY on the right side should
<u>include ‘id=1003’ instead of ‘id=2’</u>.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">The solution I’m trying is as in the following flow –</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> 1. get CSeq 1 of REFER 1 in route[b2b_request]{} -></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> 2. get CSeq 2 of REFER 2 in local_route{}, then save the pair(key=CSeq2, value=CSeq1) in a map set-></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> 3. get Id from NOTIFY 1 event in route[b2b_request]{} -></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> 4. use Id as key then get matched CSeq1 from the map set, use remove_hf() and append_hf() to modify the event header in local_route{}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">My two questions are:</span><o:p></o:p></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3"><span lang="EN-US">To transfer Cseq 1 from step1 to step2, I tried a variable in the AVP type but it didn’t work. The script variable can work but it doesn’t fit because the processing
is based on per request. Can I ask if you have any suggest on how to transfer the value from route[b2b_request]{} to local_route{}? </span><o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3"><span lang="EN-US">In the step2, I tried to create and operate a JSON map set to save the CSeq pairs. But the JSON data didn’t work for me.</span><o:p></o:p></li></ol>
<p class="MsoListParagraph"><span lang="EN-US"> My source : </span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> $json(csList) = ””; # Initialize the data set, not sure if it’s correct</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> $json(csList/”$cs”) = “$avp(csNum)”;</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> The error I got:</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> ERROR:core:do_assign: setting PV failed</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> ERROR:core:do_assign: error at /usr/local//et/opensips/opensips.cfg:531</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thank you very much for the help! Any your suggests are very welcomed.
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Li</span><o:p></o:p></p>
<p class="MsoListParagraph"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-CA">NOTICE TO RECIPIENT: This email, including attachments, may contain information which is confidential, proprietary, attorney-client privileged and / or controlled under U.S. export laws and regulations
and may be restricted from disclosure by applicable State and Federal law. Nothing in this email shall create any legal binding agreement between the parties unless expressly stated herein and provided by an authorized representative of Comtech Telecommunications
Corp. or its subsidiaries. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify us immediately
by return email and permanently delete all copies of the original email and any attached documentation from any computer or other media.
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7CLi.Cai%40comtech.com%7Caa7c80c3658c4d3945f408da79e59f87%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637956324395132469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5WE09OJAM1ASRTd%2BRNiRXbOtXqFZyvynlPhNScOyybk%3D&reserved=0">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-CA"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>