<div dir="ltr"><div>Thanks a lot for {<a href="http://s.int">s.int</a>} ! I forgot that my dialog value is string. Transforming to int helped.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 19 авг. 2020 г. в 02:33, Callum Guy <<a href="mailto:callum.guy@x-on.co.uk">callum.guy@x-on.co.uk</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Have you matched the dialog before running this check? Just wondering<br>
if one of those values is stale, do the durations match up with<br>
reality for the example calls?<br>
<br>
Also maybe rule out type issues with $(dlg_val(dialog_min_time){<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a>})<br>
<br>
On Tue, 18 Aug 2020 at 17:35, Igor Pavlov <<a href="mailto:igor.pavlov1987@gmail.com" target="_blank">igor.pavlov1987@gmail.com</a>> wrote:<br>
><br>
> Hi all, I have found the strange behavior of evaluating boolean value in 'if' statement. Here is the part of my routing script, it handles the BYE msg (I removed real logic and left only xlog).<br>
><br>
> if ($DLG_lifetime < $dlg_val(dialog_min_time)) {<br>
>     xlog("L_DBG","[$ci] Dialog lifetime less then dialog_min_time ; duration: $DLG_lifetime ; $dlg_val(dialog_min_time)");<br>
> } else {<br>
>     xlog("L_DBG","[$ci] Dialog lifetime greater then dialog_min_time ; duration: $DLG_lifetime ; $dlg_val(dialog_min_time)");<br>
> }<br>
><br>
> The '$dlg_val(dialog_min_time)' setup during INVITE handling, after create_dialog().<br>
><br>
> Under load I see that '$DLG_lifetime < $dlg_val(dialog_min_time)' is not evaluating correctly. Here is some logs:<br>
><br>
> opensips[1589]: [<a href="mailto:56276459-0-1637911800@1.1.1.48" target="_blank">56276459-0-1637911800@1.1.1.48</a>] BYE from <a href="http://2.2.2.143:5060" rel="noreferrer" target="_blank">2.2.2.143:5060</a>, dialog_min_time: 30, duration: 161, status: 5<br>
> opensips[1589]: [<a href="mailto:56276459-0-1637911800@1.1.1.48" target="_blank">56276459-0-1637911800@1.1.1.48</a>] Dialog lifetime less then dialog_min_time ; duration: 161 ; 30<br>
><br>
> Here is DLG_lifetime = 161 and $dlg_val(dialog_min_time) = 30 (161 < 30 ???)<br>
><br>
> Another example:<br>
><br>
> opensips[1590]: [<a href="mailto:58514636-0-1638386270@1.1.1.48" target="_blank">58514636-0-1638386270@1.1.1.48</a>] BYE from <a href="http://1.1.1.50:5060" rel="noreferrer" target="_blank">1.1.1.50:5060</a>, dialog_min_time: 15, duration: 1212, status: 5<br>
> opensips[1590]: [<a href="mailto:58514636-0-1638386270@1.1.1.48" target="_blank">58514636-0-1638386270@1.1.1.48</a>] Dialog lifetime less then dialog_min_time ; duration: 1212 ; 15<br>
><br>
> Here is DLG_lifetime = 1212 and $dlg_val(dialog_min_time) = 15 (1212 < 15 ???)<br>
><br>
> My OpenSIPS version is:<br>
><br>
> version: opensips 3.0.2 (x86_64/linux)<br>
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<br>
> poll method support: poll, epoll, sigio_rt, select.<br>
> git revision: 3a8f6f137<br>
> main.c compiled on 22:11:53 Jul 20 2020 with gcc 8<br>
><br>
> --<br>
><br>
> Best regards,<br>
> Igor Pavlov<br>
> _______________________________________________<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>
<br>
-- <br>
<br>
<br>
<br>
<br>
<br>
*0333 332 0000  |  <a href="http://x-on.co.uk" rel="noreferrer" target="_blank">x-on.co.uk</a> <<a href="https://www.x-on.co.uk" rel="noreferrer" target="_blank">https://www.x-on.co.uk</a>>  |   ** <br>
<<a href="https://www.linkedin.com/company/x-on" rel="noreferrer" target="_blank">https://www.linkedin.com/company/x-on</a>>   <<a href="https://www.facebook.com/XonTel" rel="noreferrer" target="_blank">https://www.facebook.com/XonTel</a>> <br>
  <<a href="https://twitter.com/xonuk" rel="noreferrer" target="_blank">https://twitter.com/xonuk</a>> **  |  Coronavirus <br>
<<a href="https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm" rel="noreferrer" target="_blank">https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm</a>>*<br>
<br>
<br>
THE <br>
ITSPA AWARDS 2020 <<a href="http://www.itspa.org.uk/itspa-awards" rel="noreferrer" target="_blank">http://www.itspa.org.uk/itspa-awards</a>> AND Best ITSP - <br>
Mid Market, Best Software and Best Vertical Solution are trade marks of the <br>
Internet Telephony Services Providers' Association, used under licence.<br>
<br>
<br>
X-on<br>
is a trading name of Storacall Technology Ltd a limited company <br>
registered in<br>
England and Wales.<br>
<br>
Registered Office : Avaland House, 110 <br>
London Road, Apsley, Hemel Hempstead,<br>
Herts, HP3 9SD. Company Registration <br>
No. 2578478.<br>
<br>
The information in this e-mail is confidential and for use by <br>
the addressee(s)<br>
only. If you are not the intended recipient, please notify <br>
X-on immediately on +44(0)333 332 0000 and delete the<br>
message from your <br>
computer. If you are not a named addressee you must not use,<br>
disclose, <br>
disseminate, distribute, copy, print or reply to this email. Views<br>
or <br>
opinions expressed by an individual<br>
within this email may not necessarily<br>
<br>
reflect the views of X-on or its associated companies. Although X-on <br>
routinely<br>
screens for viruses, addressees should scan this email and any <br>
attachments<br>
for<br>
viruses. X-on makes no representation or warranty as to the <br>
absence of viruses<br>
in this email or any attachments.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<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 clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><u>                   </u><br>Best regards,<br></div>Igor Pavlov<br></div></div>