All,
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.

Thanks

On Fri, Jan 14, 2022 at 11:25 AM Edo <edo.eku...@gmail.com> wrote:

>
> The lines are
>
> #Start of change
>
> Line 878        if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " { 
> \'did\': \'2XXXXXXXXXXXXXXXXX\' } ", "mgr1")) {
>
> Line 879                       xlog("response from mongodb is 
> [[$mongodb(mgr1=>value)]]\n");
>
>                }
>
> #End of change
>
>
>
> On Thu, Jan 13, 2022 at 12:42 AM Henning Westerholt <h...@gilawa.com> wrote:
>
>> Hello,
>>
>>
>>
>> which lines are the line 878 and 879, reported in the error message in
>> your cfg?
>>
>>
>>
>> Try to simplify this line, e.g., by removing or substitute some
>> parameters or function calls to find out the cause.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users <sr-users-boun...@lists.kamailio.org> *On Behalf Of *Edo
>> *Sent:* Thursday, January 13, 2022 6:27 AM
>> *To:* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
>> *Subject:* [SR-Users] Issues running mongodb command from kamailio
>>
>>
>>
>> Hi All,
>>
>>
>>
>> Please help!
>>
>> I am getting an error when trying to start kamailio after making some
>> changes to the configuration file.
>>
>>
>>
>> Error is :
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
>> 47-57: '('')' expected (function call)*
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
>> 102: bad expression*
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
>> 102: bad command*
>>
>>
>>
>> *atus=255/EXCEPTION*
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
>> 103: bad command*
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
>> 105: bad command*
>>
>> * used inside params of another function: xlog*
>>
>>
>>
>> *rse error in config file /etc/kamailio/kamailio.cfg, line 879, column
>> 28: use of function execution inside params not allowed*
>>
>>
>>
>> *Server.*
>>
>> Changes made is :
>>
>>
>>
>> # Routing to foreign domains
>>
>>
>>
>> route[SIPOUT] {
>>
>>
>>
>>         if (uri==myself) return;
>>
>>
>>
>> #Start of change
>>
>>
>>
>>         if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " {
>> \'did\': \'2XXXXXXXXXXXXXXXXX\' } ", "mgr1")) {
>>
>>
>>
>>                        xlog("response from mongodb is
>> [[$mongodb(mgr1=>value)]]\n");
>>
>>
>>
>>                }
>>
>> #End of change
>>
>>
>>
>>         append_hf("P-hint: outbound\r\n");
>>
>>
>>
>>         route(RELAY);
>>
>>
>>
>>         exit;
>>
>>
>>
>> }
>>
>> 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.
>>
>>
>>
>> Please help
>>
>>
>>
>> Thanks
>>
>> --
>>
>> -----
>>
>> Ekunwe
>> EDO Network Services, Inc.
>> Tel: 601.497.3932
>>
>
>
> --
> -----
> Ekunwe
> EDO Network Services, Inc.
> Tel: 601.497.3932
> Fax: 601.979.5931
>


-- 
-----
Ekunwe
EDO Network Services, Inc.
Tel: 601.497.3932
Fax: 601.979.5931
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to