<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false"><div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Hello,</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">I am trying to test a REST API call using the example code provided in the documentation. I am experiencing the following error and opensips would not start. I am running opensips 3.1.1 (x86_64/linux) on Debian 10. Any help would be appreciated. Curl is also installed and i am able to query a URL successfully Thank you</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">...</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"># Example of querying a REST service to get the credit of an account</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">$var(rc) = rest_get("https://getcredit.org/?account=$fU",</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"> $var(credit),</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"> $var(ct),</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"> $var(rcode));</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">if ($var(rc) < 0) {</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>xlog("rest_get() failed with $var(rc), acc=$fU\n");</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>send_reply(500, "Server Internal Error");</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>exit;</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">}</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">if ($var(rcode) != 200) {</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>xlog("L_INFO", "rest_get() rcode=$var(rcode), acc=$fU\n");</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>send_reply(403, "Forbidden");</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="white-space: pre-wrap;"> </span>exit;</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">}</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: INFO:rest_client:mod_init: Module initialized!</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: INFO:auth:mod_init: initializing...</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: ERROR:core:fix_cmd: Param [2] expected to be a variable</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: ERROR:core:fix_actions: Failed to fix command <rest_get></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: ERROR:core:fix_actions: fixing failed (code=-6) at /etc/opensips/opensips.cfg:232</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: CRITICAL:core:fix_expr: fix_actions error</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Jan 24 22:20:48 OpenSIPS /usr/sbin/opensips[739]: ERROR:core:main: failed to fix configuration with err code -6</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><br></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Thank you,</div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">Dinesh</div></div><br></div></div></body></html>