[SR-Users] Trouble loading multiple javascripts with KEMI

Benjamín Visón bvisonl at gmail.com
Wed Jun 3 18:44:34 CEST 2020


I am using the module *app_jsdt *with *KEMI *and I am having trouble
loading multiple javascript files. The interpreter only notices the last
file that's loaded.

What I am trying to do is separate my logic so that everything is not
inside the kamailio.conf.js (or the main file the contains the necessary
functions if you will).

modparam("app_jsdt", "load", "/etc/kamailio/file1.js")
modparam("app_jsdt", "load", "/etc/kamailio/file2.js")
cfgengine "jsdt"

In the example above, only functions in file2 are recognized.

I am aware that I can use jsdt_run or jsdt_load but from KEMI I don't see a
clear way to link this with things like events and timers or replies that
don't necessarily go through the *request_route*.

(As a plus, I am wondering on performance on Javascript vs Python/Lua and
if it's viable on high load, if anyone can throw 2 cents on that it would
be helpful!)


Saludos,

[image: image.png]

[image: image.png]

<https://www.facebook.com/bvisonl> <https://twitter.com/benjaminvison>
[image: image.png]

<https://instagram.com/bvisonl/>

Benjamín Visón / IT Engineer / Software Developer
bvisonl at gmail.com / (829)-664-5163
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/400814f4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1089 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/400814f4/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1582 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/400814f4/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3188 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/400814f4/attachment-0002.png>


More information about the sr-users mailing list