<div dir="ltr">All,<div>Issue resolved. It must have been my notepad application added some invisible characters to my command. I did a regular copy and paste from the tutorial and changed the parameters as needed and all is well now.</div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 14, 2022 at 11:25 AM Edo <<a href="mailto:edo.ekunwe@gmail.com">edo.ekunwe@gmail.com</a>> wrote:<br></div><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"><br><div>The lines are</div><div><br></div><div><pre style="white-space:pre-wrap;background-color:rgb(252,255,252);border:1px solid rgb(153,204,204);color:rgb(0,0,0);padding-left:15pt;overflow:auto;border-radius:2.5px;font-size:15px"><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">#Start of change</p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
</p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Line 878        if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(47,180,29)">{ \'did\': \'2XXXXXXXXXXXXXXXXX\' }</span><span style="font-variant-ligatures:no-common-ligatures"> ", "mgr1")) {</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
</p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Line 879                       xlog("response from mongodb is </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(47,180,29)">[[$mongodb(mgr1=>value)]]</span><span style="font-variant-ligatures:no-common-ligatures">\n")</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">;</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
</p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">               }</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#End of change</span></p></pre><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 13, 2022 at 12:42 AM Henning Westerholt <<a href="mailto:hw@gilawa.com" target="_blank">hw@gilawa.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="DE">
<div>
<p class="MsoNormal"><span>Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">which lines are the line 878 and 879, reported in the error message in your cfg?
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Try to simplify this line, e.g., by removing or substitute some parameters or function calls to find out the cause.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">-- <u></u>
<u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt –
</span><span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services –
</span><span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Edo<br>
<b>Sent:</b> Thursday, January 13, 2022 6:27 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> [SR-Users] Issues running mongodb command from kamailio<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi All,<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Please help!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I am getting an error when trying to start kamailio after making some changes to the configuration file.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Error is :<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<div style="border:1pt solid rgb(153,204,204);padding:0cm 0cm 0cm 15pt;background:rgb(252,255,252);margin-left:35.4pt;margin-right:0cm">
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 47-57: '('')' expected (function call)</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 102: bad expression</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 102: bad command</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">atus=255/EXCEPTION</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 103: bad command</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 878, column 105: bad command</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"> used inside params of another function: xlog</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">rse error in config file /etc/kamailio/kamailio.cfg, line 879, column 28: use of function execution inside params not allowed</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">Server.</span></b><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">Changes made is :<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<div style="border:1pt solid rgb(153,204,204);padding:0cm 0cm 0cm 15pt;background:rgb(252,255,252);margin-left:35.4pt;margin-right:0cm">
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)"># Routing to foreign domains<u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">route</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(47,180,29)">[SIPOUT]</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> {</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(47,180,29)"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">        if (uri=</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(180,36,25)">=myself) return</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)">;</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">#Start of change<u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">        if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", "
</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(47,180,29)">{ \'did\': \'2XXXXXXXXXXXXXXXXX\' }</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> ", "mgr1")) {<u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">                       xlog("response from mongodb is
</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(47,180,29)">[[$mongodb(mgr1=>value)]]</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">\n")</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)">;</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">               }<u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">#End of change<u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">        append_hf("P-hint: outbound\r\n")</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)">;</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">        route(RELAY)</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)">;</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">        exit</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(64,11,217)">;</span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal;min-height:13px">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p style="margin:0cm;background:rgb(252,255,252);border:none;padding:0cm;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black">}<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">Please can someone tell me what I am doing wrong. Error says syntax but I have tried many permutations of the suggested syntax with no luck. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Please help<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Thanks<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">-----<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">Ekunwe<br>
EDO Network Services, Inc.<br>
Tel: 601.497.3932<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>-----</div>Ekunwe<br>EDO Network Services, Inc.<br>Tel: 601.497.3932<br>Fax: 601.979.5931</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div>-----</div>Ekunwe<br>EDO Network Services, Inc.<br>Tel: 601.497.3932<br>Fax: 601.979.5931</div>