<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="ltr">
<div></div>
<div>
<div>Liviu, </div>
<div dir="ltr"><br>
</div>
<div dir="ltr">For that case, why don’t you make an extra parameter ? E.g. use-broken-implementation 0|1 </div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature"><a href="https://aka.ms/o0ukef">Outlook voor iOS</a> downloaden</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> Users <users-bounces@lists.opensips.org> namens Liviu Chircu <liviu@opensips.org><br>
<b>Verzonden:</b> Tuesday, January 19, 2021 4:38:58 PM<br>
<b>Aan:</b> OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Onderwerp:</b> Re: [OpenSIPS-Users] Global variable $rm gives number when using $json</font>
<div> </div>
</div>
<div>
<div class="x_moz-cite-prefix">On 18.01.2021 20:53, Alex Kinch wrote:<br>
</div>
<blockquote type="cite">
<div>I get this (identifying data redacted):<br>
</div>
<div><br>
</div>
<div><font face="monospace">Jan 18 18:18:15 [33] request: INVITE from sip:XX@XX to sip:XX@XX<br>
Jan 18 18:18:15 [33] Sending { "call_id": "942887463-1604195939-951239259", "ts": "2021-01-18 18:18:15Z", "src_ip": "XX", "dst_ip": "XX", "method": 1, "sip_from": "sip:XX@XX", "sip_to": "sip:XX@XX", "dialled": "XX" }</font><br>
</div>
<div><font face="monospace"><br>
</font></div>
<div>
<div>Any suggestions?</div>
<div><br>
</div>
</div>
</blockquote>
<p><tt>Hi Alex,</tt></p>
<p><tt>Thank you for the examples - indeed, that behavior is broken.<br>
</tt></p>
<p><tt>I just pushed a fix for this on "master" branch [1]. However, I'm a bit reluctant to backport it for the moment, because I haven't fully assessed its implications. For example, could it be possible that people have already written code that
<b>relie</b><b>s</b> on $json incorrectly returning the integer value of a variable which holds both a string and an integer, with string taking precedence (e.g. $rm)?</tt></p>
<p><tt>[1]: <a class="x_moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/6191f278a4">
https://github.com/OpenSIPS/opensips/commit/6191f278a4</a><br>
</tt></p>
<pre class="x_moz-signature" cols="72">--
Liviu Chircu
<a class="x_moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="x_moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
</div>
</body>
</html>