<div dir="ltr"><div dir="ltr">On Mon, Dec 16, 2019 at 9:22 PM Joshua C. Colp <<a href="mailto:jcolp@sangoma.com">jcolp@sangoma.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Mon, Dec 16, 2019 at 9:11 PM Joshua C. Colp <<a href="mailto:jcolp@sangoma.com" target="_blank">jcolp@sangoma.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Mon, Dec 16, 2019 at 8:21 PM Daniel Friedman <<a href="mailto:dani@3xton.com" target="_blank">dani@3xton.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">Hello,<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">I am using an ARI dialer for my applications and since my last upgrade
<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">to Ver. 13.29.2 from 13.23.1 I am getting this strange bug from the ARI debugger:<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">Debugging on all applications enabled<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"><--- ARI request received from: x.x.x.x:63036 ---><u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">HOST: x.x.x.x:8088<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">content-type: application/json<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">authorization: Basic xxxx<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">content-length: 265<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">body:<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">{<span lang="HE" dir="RTL"><u></u><u></u></span></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span dir="LTR"></span><font size="3" face="Arial"><span style="font-size:12pt"><span dir="LTR"></span> "context": "from-itc-dialer",<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "extension": "secondleg",<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "priority": 1,<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "timeout": 60,<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "endpoint": "Local/firstleg@from-itc-dialer/n",<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "variables": {<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "AGENT": "506655579",<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "DESTINATION": "18662225555",<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> "CLI": "442031502032"<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"> }<span lang="HE" dir="RTL"><u></u><u></u></span></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span dir="LTR"></span><font size="3" face="Arial"><span style="font-size:12pt"><span dir="LTR"></span>}<span lang="HE" dir="RTL"><u></u><u></u></span></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span lang="HE" dir="RTL" style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span dir="LTR"></span><b><font size="3" face="Arial"><span style="font-size:12pt;font-weight:bold"><span dir="LTR"></span>[2019-12-17 02:10:06] ERROR[24851]: json.c:870 ast_json_vpack:
Error building JSON from '{s: s?, s: s?, s: o, s: s?, s: s?}': Expected format 's', got '?'.<u></u><u></u></span></font></b></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">[2019-12-17 02:10:06] NOTICE[24853][C-0000208b]: Ext. firstleg:5 @ from-itc-dialer: The group channel is: itc-ebay and the
group count is: 1 out of max 14<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">[2019-12-17 02:10:06] ERROR[24851]: Got 16 backtrace records<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 0: asterisk ast_json_vpack()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 1: asterisk ast_json_pack()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 2: asterisk ast_json_dialplan_cep_app()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 3: asterisk ast_channel_snapshot_to_json()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 4: res_ari_channels.so <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 5: res_ari_channels.so <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 6: res_ari_channels.so <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 7: [0x7f71a7385098] res_ari.so :0 ast_ari_invoke()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 8: [0x7f71a73865e1] res_ari.so :0 ast_ari_json_format()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"># 9: asterisk <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#10: asterisk <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#11: asterisk <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#12: asterisk <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#13: asterisk <unknown>()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#14: [0x7f71e489caa1] libpthread.so.0 :0 pthread_create()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">#15: [0x7f71e3c2493d] libc.so.6 :0 __clone()<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span lang="HE" dir="RTL" style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><span dir="LTR"></span><font size="3" face="Arial"><span style="font-size:12pt"><span dir="LTR"></span><--- Sending ARI response to x.x.x.x:63036 ---><u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><b><font size="3" face="Arial"><span style="font-size:12pt;font-weight:bold">200 OK<u></u><u></u></span></font></b></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">The calls are getting through and the Asterisk is not crashing.<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">I looked at the source code and it seems that I am sending all the right parameters with a valid JSON format.<u></u><u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><font size="3" face="Arial"><span style="font-size:12pt">Anyone has an idea what has been change in the Asterisk code and how can I adopt my code to the this version?<br><u></u><u></u></span></font></p>
</div></div></blockquote></div><div><br></div>What version of jansson do you have installed? If you use the bundled jansson (by passing --with-jansson-bundled to configure) does the problem resolve itself?</div></blockquote><div><br></div><div>I have also created an issue[1].</div><div><br></div><div>[1] <a href="https://issues.asterisk.org/jira/browse/ASTERISK-28663" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-28663</a> </div></div></div></blockquote><div><br></div><div>A fix for this allowing old versions of jansson to be used is now merging in and will be in 13.30.0. It is still recommended to use bundled however.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Technical Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></font><br></div></div></div></div></div></div></div></div></div></div></div>