[sr-dev] [kamailio/kamailio] Cannot use AVPs with t_check_status (#1795)

Hugh Waite notifications at github.com
Tue Jan 8 17:03:47 CET 2019

### Description
If an AVP containing a regex is passed to the t_check_status function, it does not match.
  $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");
#### Reproduction
Using the code above in a failure_route should match a 500 response, but it does not.

### Possible Solutions
The fixup_t_check_status in tm.c:663 attempts to match FPARAM_AVP/FPARAM_SELECT/FPARAM_REGEX parameter types.
If another check for the FPARAM_PVS parameter type then the issue appears fixed

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190108/28417bec/attachment.html>

More information about the sr-dev mailing list