<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>can you try with latest master or pick the next commit in your
local clone?<br>
</p>
<p> *
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/commit/97189d7508a3946c2b3de49c178614356d816508">https://github.com/kamailio/kamailio/commit/97189d7508a3946c2b3de49c178614356d816508</a></p>
<p>I just pushed it trying to catch the exception triggered by
'exit' and don't log error messages in that case.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 22.03.19 04:48, Andrew White wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2E9731B9-406B-4E5A-90CB-84A72DFE6076@uconnected.com.au">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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); 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="">
</div>
<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;">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); 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="">
</div>
<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;">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); 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="">
</div>
<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;">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">www.uConnected.com.au</a><br class="">
</div>
</div>
</div>
</div>
<br class="">
</div>
<br>
<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">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">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">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>