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

2019-01-08 Thread Daniel-Constantin Mierla
Closed #1795.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1795#event-2062282400___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


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

2019-01-08 Thread Henning Westerholt
After the merge of #1796 I think this can be closed?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1795#issuecomment-452437596___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


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

2019-01-08 Thread Hugh Waite
### Description
If an AVP containing a regex is passed to the t_check_status function, it does 
not match.
Example:
```
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");
}
  }
}
```
 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:
https://github.com/kamailio/kamailio/issues/1795___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev