[SR-Users] Issues running mongodb command from kamailio

Henning Westerholt hw at gilawa.com
Thu Jan 13 07:42:17 CET 2022


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<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Edo
Sent: Thursday, January 13, 2022 6:27 AM
To: Kamailio (SER) - Users Mailing List <sr-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220113/56190fd0/attachment.htm>


More information about the sr-users mailing list