<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Greetings,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for the feedback. Since this was something I requested, I thought I'd have a go. I was able to log messages from nested require() via JSDT loaded file. I'm barely literate in C, so hopefully, I'm doing something helpful and not wasting everyone's time. If I happen to be on a good track, I'll try to keep going with a bit of guidance. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="https://github.com/kamailio/kamailio/issues/3037">https://github.com/kamailio/kamailio/issues/3037</a><o:p></o:p></p><p class=MsoNormal><a href="https://github.com/kamailio/kamailio/pull/3038">https://github.com/kamailio/kamailio/pull/3038</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal>Ian<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Daniel-Constantin Mierla <miconda@gmail.com> <br><b>Sent:</b> Monday, February 21, 2022 4:44 AM<br><b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Ian Carlson <ian@xantek.net><br><b>Subject:</b> Re: [SR-Users] KEMI jsdt CommonJS-based module<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Hello,<o:p></o:p></p><p>I didn't notice that require() was not in the duktape 2.x, I will try to add support for module-duktape when I get a chance. If someone wants to do it, pull requests are welcome -- it does not seem to be complex:<o:p></o:p></p><p>  * <a href="https://github.com/svaarala/duktape/tree/master/extras/module-duktape">https://github.com/svaarala/duktape/tree/master/extras/module-duktape</a><o:p></o:p></p><p>The module-node sounds interesting, but not being familiar with node.js, looks it need more work to enable it:<o:p></o:p></p><p>  * <a href="https://github.com/svaarala/duktape/tree/master/extras/module-node">https://github.com/svaarala/duktape/tree/master/extras/module-node</a><o:p></o:p></p><p>Cheers,<br>Daniel<o:p></o:p></p><div><p class=MsoNormal>On 20.02.22 00:50, Ian Carlson wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Greetings,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I’m new to Kamailio and working to add Kamailio to an existing Asterisk solution.  I’m attracted to the idea of routing via KEMI jsdt since our Asterisk ARI is using nodejs.  Playing with KEMI jsdt I was trying to use require() to break up the monolithic routing script.  It seems that Kamailio uses Ducktape 2 without module-node or module-ducktape, requiring all routing in a single file?  I’d appreciate any suggested practices for managing Kamailio configurations.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal>Ian<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><br><br><o:p></o:p></p><pre>__________________________________________________________<o:p></o:p></pre><pre>Kamailio - Users Mailing List - Non Commercial Discussions<o:p></o:p></pre><pre>  * <a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><o:p></o:p></pre><pre>Important: keep the mailing list in the recipients, do not reply only to the sender!<o:p></o:p></pre><pre>Edit mailing list options or unsubscribe:<o:p></o:p></pre><pre>  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre><pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre><pre>Kamailio Advanced Training - Online<o:p></o:p></pre><pre>  Feb 21-24, 2022 (America Timezone)<o:p></o:p></pre><pre>  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a><o:p></o:p></pre></div></body></html>