<div dir="ltr">Hi Ben,<div><br></div><div>Thank you for the information, I've checked the tm module docs and t_check_trans() doesn't highlight this behaviour - it just sounds like a method to confirm the presence of the transaction. To try and confirm this I've been looking at the tm module code and it matches the documentation description - some of the nested methods are locating the transaction within a hash table however there is no clear indicator to me that this would be somehow loading the AVPs and/or flags into the current request process. I am not a C expert and could definitely be missing something however but it would be great if one the dev team could confirm if this is indeed the correct approach. For now I'll implement some logging to try and confirm the behaviour.</div><div><br></div><div>Your feature request for dialog method flags sounds useful, I suspect once my current CANCEL issue is resolved that there may be a few remaining call scenarios where rtpengine isn't being cleared due to the dialog having been closed, if that happens to me I'll see if I can find time to implement your idea.</div><div><br></div><div>Thanks,</div><div><br></div><div>Callum</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 16 Mar 2020 at 13:02, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_8999366884950206581WordSection1">
<p class="MsoNormal">Callum,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Both AVPs and transaction flags are tied to the transaction, so you must call t_check_trans so the transaction will be matched. I don’t see that happening in your code. I don’t believe match_dialog will do that for you.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also, I think the issues you are having with dialog variables as you mentioned in another response may be related to an feature request we have open [1]. Basically, once the BYE is received the dialog is set to ENDED state and the dialog
 variable retrieval ignores dialogs in this state. Our use case is a bit different than yours, so it may not be the same.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[1] - <a href="https://github.com/OpenSIPS/opensips/issues/1637" target="_blank">
https://github.com/OpenSIPS/opensips/issues/1637</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of Callum Guy <<a href="mailto:callum.guy@x-on.co.uk" target="_blank">callum.guy@x-on.co.uk</a>><br>
<b>Reply-To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Date: </b>Monday, March 16, 2020 at 7:23 AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>[OpenSIPS-Users] AVP availability in CANCEL<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi All,<br>
<br>
I have a simple question regarding availability of AVP variables in CANCEL. I'm not sure when OpenSIPs will load the AVP's for a transaction so am looking for information here. The situation is that I want to flag sessions using a media proxy and close the
 sessions when a CANCEL arrives before the call is answered. <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">This is how I enable and track rtpengine:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">route[RTPENGINE_OFFER_IE] {<br>
  set_dlg_flag(10);<br>
  $avp(media_proxy) := "on";<br>
  rtpengine_offer("trust-address replace-session-connection in-iface=internal out-iface=external ICE=remove");<br>
}<br>
</span><br>
The current logic sets both a dialog variable and an AVP when rtpengine is offered. When BYE/CANCEL messages arrive the script does this:<br>
<br>
<span style="font-family:"Courier New"">if (is_method("BYE|CANCEL")) {<br>
  match_dialog();<br>
  if (is_dlg_flag_set(10) || $avp(media_proxy) == "on") {<br>
    rtpengine_delete();<br>
  }<br>
}</span> <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I was hoping that the dialog would be matched by call ID and tags however this does not appear to work so I must be missing some info. The AVP was added later to try and make it work for the CANCEL requests but also did not work. <u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I'm planning on replacing the AVP with a transaction flag tonight, is that likely to resolve the issue? Apologies if these are basic questions, availability of different types of flags and AVP's really aren't clear to me so any advice would
 be appreciated!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Callum<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="border:1pt solid windowtext;padding:0in"><img border="0" width="32" height="32" style="width: 0.3333in; height: 0.3333in;" id="gmail-m_8999366884950206581_x0000_i1028" alt="Image removed by sender."></span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><b><sup><span style="font-size:13.5pt;font-family:Verdana,sans-serif">0333 332 0000  | 
<a href="http://www.x-on.co.uk" target="_blank">
www.x-on.co.uk</a>  |  </span></sup></b><b><sub><span style="font-size:13.5pt;font-family:Verdana,sans-serif"> </span></sub></b><b><sup><span style="font-size:13.5pt;font-family:Verdana,sans-serif"><a href="https://www.linkedin.com/company/x-on" target="_blank"><span style="color:windowtext;text-decoration:none"><span style="color:blue;border:1pt solid windowtext;padding:0in"><img border="0" width="24" height="24" style="width: 0.25in; height: 0.25in;" id="gmail-m_8999366884950206581_x0000_i1027" alt="Image removed by sender."></span></span></a>
  <a href="https://www.facebook.com/XonTel" target="_blank"><span style="color:windowtext;text-decoration:none"><span style="color:blue;border:1pt solid windowtext;padding:0in"><img border="0" width="24" height="24" style="width: 0.25in; height: 0.25in;" id="gmail-m_8999366884950206581_x0000_i1026" alt="Image removed by sender."></span></span></a>
  <a href="https://twitter.com/xonuk" target="_blank"><span style="color:windowtext;text-decoration:none"><span style="color:blue;border:1pt solid windowtext;padding:0in"><img border="0" width="24" height="24" style="width: 0.25in; height: 0.25in;" id="gmail-m_8999366884950206581_x0000_i1025" alt="Image removed by sender."></span></span></a></span></sup></b><b><span style="font-size:13.5pt"> </span></b><u></u><u></u></p>
<p><span style="font-size:6pt;font-family:Verdana,sans-serif;color:black">X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales.<br>
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.<br>
The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the<br>
message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual<br>
within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments<br>
for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments.</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>

<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><font size="3" face="Verdana"><span style="font-size:8px;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></font></p><div><img src="https://www.x-on.co.uk/email/footer/General-Practice-Awards-winners.jpg"></div><div><br></div><div><div><div><font size="4"><b><sup><font face="Verdana">0333 332 0000  |  <a href="http://www.x-on.co.uk" target="_blank">www.x-on.co.uk</a>  |  <sub> </sub></font></sup></b></font><font size="4"><b><sub><sup><font face="Verdana"><a href="https://www.linkedin.com/company/x-on" target="_blank"><img src="http://www.x-on.co.uk//images/icon/linkedin.png" width="24" height="24"></a>  <a href="https://www.facebook.com/XonTel" target="_blank"><img src="http://www.x-on.co.uk//images/icon/facebook.png" width="24" height="24"></a>  <a href="https://twitter.com/xonuk" target="_blank"><img src="http://www.x-on.co.uk//images/icon/twitter.png" width="24" height="24"></a></font></sup></sub> </b></font><br><p><span style="font-size:6.0pt;font-family:Verdana;color:black">X-on
is a trading name of Storacall Technology Ltd a limited company registered in
England and Wales.<br>
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.<br>
The information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately on <span>+44(0)333 332 0000</span> and delete the<br>message from your computer. If you are not a named addressee you must not use,
disclose, disseminate, distribute, copy, print or reply to this email. </span><span style="font-size:6.0pt;font-family:Verdana;color:black">Views
or opinions expressed by an individual<br>within this email may not necessarily
reflect the views of X-on or its associated companies. Although X-on routinely
screens for viruses, addressees should scan this email and any attachments<br>for
viruses. X-on makes no representation or warranty as to the absence of viruses
in this email or any attachments.</span></p>





<p><span style="font-size:6.0pt;font-family:Verdana;color:black"></span><font size="2"><span style="font-size:6.0pt;font-family:Verdana;color:black"></span></font></p></div></div></div>