<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Everyone,
<div><br>
</div>
<div>First of all, this is my first ever e-mail to the group so I'd like to thank all the developers who built this great product and thank everyone for the kind and helpful community. I've been using Kamailio for the past 8 months, I've had lots of fun with
 it.</div>
<div><br>
</div>
<div>My issue is I'm trying to set-up JS Kemi interpreter for my Kamailio-Asterisk box. I translated the config file to JS kemi, which wasn't too bad but I'm getting a type error for the "KSR.kx.ifdef("WITH_ASTERISK")" statement that I used.  </div>
<div><br>
</div>
<div>Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) DEBUG: app_jsdt [app_jsdt_api.c:1478]: dukopen_KSR(): module 'KSR' has been initialized</div>
<div>Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) DEBUG: app_jsdt [app_jsdt_api.c:473]: jsdt_sr_init_child(): loading js script file: /usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js</div>
<div>Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) ERROR: app_jsdt [app_jsdt_api.c:447]: jsdt_kemi_load_script(): failed running: TypeError: undefined not callable (property 'ifdef' of [object Object])</div>
<div>Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) ERROR: <core> [core/sr_module.c:865]: init_mod_child(): error while initializing module app_jsdt (/usr/local/lib64/kamailio/modules/app_jsdt.so) (idx: 0 rank: -127 desc: [main])</div>
<div>Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) ERROR: <core> [main.c:1671]: main_loop(): error in init_child(PROC_INT) -- exiting</div>
<div><br>
</div>
<div>In syslog I can see that  kex.so module is loaded successfully and 'KSR' has been initialized. I don't know what I'm doing wrong. A few sample JS Kemi code that I could find did not use the kx.ifdef function. Was this a new addition to the interpreter?
 Perhaps my Kamailio version (kamailio 5.5.0 x86_64/linux) does not support it?</div>
<div><br>
</div>
<div>Thank you all in advance.</div>
<div><br>
</div>
Kaan.<br>
</div>
</body>
</html>