<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks for testing and reporting the results. I will backport to
5.2 branch.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 23.03.19 05:16, Andrew White wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0AE9D92A-A1A6-4EE1-B922-4471254DB238@uconnected.com.au">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="">Thanks so much for your quick response and fix
Daniel!</div>
<div class=""><br class="">
</div>
<div class="">This works perfectly! I’ve come across another minor
bug around KEMI/Ruby, but I’ll post it to GitHub issues.</div>
<div class=""><br class="">
</div>
<div class="">See you at Kamailio World in a few weeks, looks like
I owe you a beer!</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color:
rgb(0, 0, 0); letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; word-wrap: break-word;
-webkit-nbsp-mode: space; line-break: after-white-space;"
class="">
<div dir="auto" style="word-wrap: break-word;
-webkit-nbsp-mode: space; line-break: after-white-space;"
class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0,
0); font-family: Helvetica; font-size: 12px; font-style:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none;"><br class="">
________________________________<br class="">
<br class="">
Andrew White - Director<br class="">
uConnected<br class="">
<a href="mailto:andrew@uconnected.com.au" class=""
moz-do-not-send="true">Email: andrew@uconnected.com.au</a><br
class="">
Web: <a class="moz-txt-link-abbreviated" href="http://www.uConnected.com.au">www.uConnected.com.au</a><br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 23 Mar 2019, at 12:05 am, Daniel-Constantin
Mierla <<a href="mailto:miconda@gmail.com" class=""
moz-do-not-send="true">miconda@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class="">Hello,</p>
<p class="">can you try with latest master or pick the
next commit in your local clone?<br class="">
</p>
<p class=""> *
<a class="moz-txt-link-freetext"
href="https://github.com/kamailio/kamailio/commit/97189d7508a3946c2b3de49c178614356d816508"
moz-do-not-send="true">https://github.com/kamailio/kamailio/commit/97189d7508a3946c2b3de49c178614356d816508</a></p>
<p class="">I just pushed it trying to catch the
exception triggered by 'exit' and don't log error
messages in that case.</p>
<p class="">Cheers,<br class="">
Daniel<br class="">
</p>
<div class="moz-cite-prefix">On 22.03.19 04:48, Andrew
White wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:2E9731B9-406B-4E5A-90CB-84A72DFE6076@uconnected.com.au"
class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
Hi all,
<div class=""><br class="">
</div>
<div class="">I know ruby is pretty new to KEMI, so I
understand this might not be supported.</div>
<div class=""><br class="">
</div>
<div class="">I’ve been able to build a functional
basic configuration using KEMI based app_ruby.
However the function KSR::x.exit is not exposed to
the interpreter. Reading up on the function (<a
href="https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/kemimods/#ksrxexit"
class="" moz-do-not-send="true">https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/kemimods/#ksrxexit</a>)
I can see either a native `exit` or a return from
the request_route is recommended.</div>
<div class=""><br class="">
</div>
<div class="">The latter of these works fine, however
the former throws the following error when called
either within the request_route function or any
others:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">Mar 22 03:40:46 guest
/usr/sbin/kamailio[17474]: ERROR: {1 19731 BYE
8u6We4ReU01GuU-zoa7VuqC.qWwwg29S} app_ruby
[app_ruby_api.c:105]:
app_ruby_print_last_exception(): exception: exit</div>
<div class="">Mar 22 03:40:46 guest
/usr/sbin/kamailio[17474]: ERROR: {1 19731 BYE
8u6We4ReU01GuU-zoa7VuqC.qWwwg29S} app_ruby
[app_ruby_api.c:1078]: app_ruby_run_ex(): ruby
exception (6) on callback for: ksr_request_route
(res type: 17)</div>
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0);
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration:
none; word-wrap: break-word; -webkit-nbsp-mode:
space; line-break: after-white-space;" class="">
<div dir="auto" style="word-wrap: break-word;
-webkit-nbsp-mode: space; line-break:
after-white-space;" class="">
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class=""><br
class="">
</div>
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class="">It appears
the app_ruby wrapper is seeing an exit as an
exception and throwing an error. I’m unsure
if this is affecting my actual flow (still
building the config), but the error in the
logs is certainly annoying. Returning from
the request_route function works fine,
however this is obviously harder to do from
within a sub function.</div>
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class=""><br
class="">
</div>
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class="">Any
direction on how to correctly exit in
similar ways to native or other KEMI
implementations would be appreciated.</div>
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class=""><br
class="">
</div>
<div style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;
text-decoration: none;" class="">By the way,
thanks Daniel for writing this module! This
makes Kamailio significantly more accessible
for myself and others like me!<br class="">
<br class="">
________________________________<br class="">
<br class="">
Andrew White - Director<br class="">
uConnected<br class="">
<a href="mailto:andrew@uconnected.com.au"
class="" moz-do-not-send="true">Email: andrew@uconnected.com.au</a><br
class="">
Web: <a class="moz-txt-link-abbreviated"
href="http://www.uconnected.com.au/"
moz-do-not-send="true">www.uConnected.com.au</a><br
class="">
</div>
</div>
</div>
</div>
<br class="">
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com/" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com/" moz-do-not-send="true">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com/" moz-do-not-send="true">www.asipto.com</a></pre>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</body>
</html>