Hello,
you can also convert the header value to integer using the transformation {
s.int}, that's safer if you need to do other types of comparison such as >
or <, because comparing string values might give the result you don't
expect,
Cheers,
Daniel
On Friday, September 13, 2019, Joel Serrano
I think I found the solution to my problem: I'm comparing to 0 (number)
when I should be comparing to "0" (string)?
Using:
...
if ($hdr(Expires)=="0" || $sel(contact.expires)=="0") {
...
Is working as expected.
Sorry for the noise!
Joel.
On Thu, Sep 12, 2019 at 5:50 PM Joel Serrano w
Hello,
I'm running into what I believe a weird situation when comparing to
0.
I have the following lines:
xlog("L_NOTICE", "DEBUG: sel(contact.expires)=$sel(contact.expires)
- hdr(Expires)=$hdr(Expires)\n");
if ($hdr(Expires)==0 || $sel(contact.expires)==0) {
xlog("L