Hello Everyone,

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.

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.  

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
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
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])
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])
Jan 17 15:11:26 anayurt kamailio[8261]:  0(8261) ERROR: <core> [main.c:1671]: main_loop(): error in init_child(PROC_INT) -- exiting

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?

Thank you all in advance.

Kaan.