<h3>Description</h3>
<p>If an AVP containing a regex is passed to the t_check_status function, it does not match.<br>
Example:</p>
<pre><code>failure_route[DEFAULT]
{
  $avp(FAILURE_CODES) = "5[0-9][0-9]";
  xlog("L_WARN", "Status code: $T_reply_code\n");
  if ($avp(FAILURE_CODES) != $null)
  {
    xlog("L_WARN", "resp codes regex: $avp(FAILURE_CODES)\n");
    if (t_check_status("$avp(FAILURE_CODES)"))
    {
      xlog("L_WARN", "t_check_status matched\n");
    }
  }
}
</code></pre>
<h4>Reproduction</h4>
<p>Using the code above in a failure_route should match a 500 response, but it does not.</p>
<h3>Possible Solutions</h3>
<p>The fixup_t_check_status in tm.c:663 attempts to match FPARAM_AVP/FPARAM_SELECT/FPARAM_REGEX parameter types.<br>
If another check for the FPARAM_PVS parameter type then the issue appears fixed</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1795">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSt7Uls9TkiC934AfT64m_xQCkEaks5vBMFjgaJpZM4Z1xY-">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZddEDGzaP4YE6f_k4T22YeUnvwIxks5vBMFjgaJpZM4Z1xY-.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Cannot use AVPs with t_check_status (#1795)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1795"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1795",
"url": "https://github.com/kamailio/kamailio/issues/1795",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>