<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:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:NSimSun;
panose-1:2 1 6 9 3 1 1 1 1 1;}
@font-face
{font-family:NSimSun;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:DengXian;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:DengXian;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:left;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
text-align:left;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#3333FF;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#3333FF;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
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 bgcolor="white" lang="ZH-CN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">I am trying to send two Rx_AAR after Kamailio receive 200 OK with SDP:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">The first one for termination part is worked well, but in MT_aar_reply route block, it’s not works.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">The one I marked with red color, is there anyone know how configure Kamailio to send two Rx_AAR after receive 200 OK SDP?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">Thanks a lot!!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">Victor<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">+++++++++++++++++++++++++++++++++++++++++++++++++++++++<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></b></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">if (t_check_status("200")){<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_DBG", "IMS: Received 200 nside orig_initial_reply\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> $var(aarret) = Rx_AAR("MT_aar_reply", "term","",2);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_DBG", "AAR return code is $var(aarret)\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">on MT_aar_reply block:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">route[MT_aar_reply]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> #this is async so to know status we have to check the reply avp<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> switch ($avp(s:aar_return_code)) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> case 1:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_DBG", "Diameter: Term AAR success on media authorization\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> default:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_ERR", "IMS: AAR failed Term\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_ERR", "IMS: ttag: "+ "$avp(TTAG_CUSTOM_AVP)");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_ERR", "IMS: ftag: "+ "$avp(FTAG_CUSTOM_AVP)");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_ERR", "IMS: callid: "+ "$avp(CALLID_CUSTOM_AVP)");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> #comment this if you want to allow even if Rx fails<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> if(dlg_get("$avp(CALLID_CUSTOM_AVP)","$avp(FTAG_CUSTOM_AVP)","$avp(TTAG_CUSTOM_AVP)")){<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> dlg_terminate("all", "Sorry no QoS available");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> exit;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF">
</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:red"> $var(aarret) = Rx_AAR("MO_aar_reply", "term","",2);</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"> xlog("L_DBG", "AAR return code is $var(aarret)\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Calibri",sans-serif;color:#3333FF"><o:p> </o:p></span></p>
</div>
</div>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
</div>
</body>
</html>