<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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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:970205549;
        mso-list-type:hybrid;
        mso-list-template-ids:945348916 1142163502 269025283 269025285 269025281 269025283 269025285 269025281 269025283 269025285;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:>;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.25pt;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:56.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:92.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:128.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:164.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:200.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:236.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:272.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:308.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1686517449;
        mso-list-type:hybrid;
        mso-list-template-ids:1951447680 -1183654392 269025305 269025307 269025295 269025305 269025307 269025295 269025305 269025307;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi experts,<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">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-  <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   A REFER creates an implicit subscription sharing the dialog<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   identifiers in the REFER request.  If more than one REFER is issued<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   in the same dialog (a second attempt at transferring a call for<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   example), the dialog identifiers do not provide enough information to<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   associate the resulting NOTIFYs with the proper REFER.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   Thus, for the second and subsequent REFER requests a UA receives in a<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   given dialog, it MUST include an id parameter[2] in the Event header<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   field of each NOTIFY containing the sequence number (the number from<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   the CSeq header field value) of the REFER this NOTIFY is associated<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   with.  This id parameter MAY be included in NOTIFYs to the first<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   REFER a UA receives in a given dialog.  A SUBSCRIBE sent to refresh<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-CA">   or terminate this subscription MUST contain this id parameter.<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">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 –<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">                                             B2BProxy<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">                <- REFER 2 (Cseq=2) |                  <-REFER 1  (Cseq=1003)<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">->NOTIFY 1 (event:<b>id=2</b>)          |  ->NOTIFY 2 (<u>event<b>:id=2</b>)</u><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">The current problem is, the above NOTIFY on the right side should
<u>include ‘id=1003’ instead of ‘id=2’</u>.<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"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The solution I’m trying is as in the following flow –<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">      1.         get CSeq 1 of REFER 1 in route[b2b_request]{}  -><o:p></o:p></span></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-><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">      3.         get Id  from NOTIFY 1 event in route[b2b_request]{}  -><o:p></o:p></span></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{}<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">My two questions are:<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><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{}?  <o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo2"><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.<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span lang="EN-US">            My source : <o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">                                    $json(csList) = ””;       # Initialize the data set, not sure if it’s correct<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">                                    $json(csList/”$cs”) = “$avp(csNum)”;<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">            The error I got:<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">                                    ERROR:core:do_assign: setting PV failed<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">                                    ERROR:core:do_assign: error at /usr/local//et/opensips/opensips.cfg:531<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you very much for the help! Any your suggests are very welcomed.
<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"><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">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Li<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">      <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"><o:p></o:p></span></p>
</div>
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.
</body>
</html>