<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);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
Thanks Daniel i upgraded kamailio version</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De :</b> Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Envoyé :</b> lundi 4 juillet 2022 09:59<br>
<b>À :</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Patrick Karton <patrickarton@hotmail.com><br>
<b>Objet :</b> Re: [SR-Users] return 0 is not equivalent to exit</font>
<div> </div>
</div>
<div>
<p style="margin-top: 0px; margin-bottom: 0px;">There was a missing internal flag set at some point, but it should be fixed in 5.5 branch as well, be sure you run the latest version there.</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Cheers,<br>
Daniel</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<div class="x_moz-cite-prefix">On 04.07.22 10:52, Patrick Karton wrote:<br>
</div>
<blockquote type="cite">
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
on 5.5 kamailio wiki for core it is stated that return (0) is the same as exit. but that's not true </div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
request_route {
<div><br>
</div>
<div>    if (route(POS)){</div>
<div>        xlog("POS PASS\r\n");</div>
<div>    }</div>
<div><br>
</div>
<div>    if (!route(NEG)){</div>
<div>        <span style="background-color:rgb(255,255,255); display:inline!important">
xlog</span>("NEG PASS\r\n");</div>
<div>    }</div>
<div><br>
</div>
<div>    if (!route(ZERO)) {</div>
<div>        <span style="background-color:rgb(255,255,255); display:inline!important">
xlog</span>("ZERO PASS\r\n");</div>
<div>    }</div>
<div><br>
</div>
<div>    <span style="background-color:rgb(255,255,255); display:inline!important">
xlog</span>("AFTER ZERO\r\n");</div>
<div>    send_reply("400","Error");</div>
<div>    return;</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>route[POS]{</div>
<div>    return 1;</div>
<div>}</div>
<div><br>
</div>
<div>route[NEG]{</div>
<div>    return -1;</div>
<div>}</div>
<div><br>
</div>
<div>route[ZERO] {</div>
<div>    return 0;</div>
}<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
for example from the config above not only <b>ZERO PASS</b> will be printed but also
<b>all the actions after route(ZERO) are still executed.</b></div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
instead if i replace return 0 with exit in route[ZERO]. this work as expected.</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<br>
<fieldset class="x_moz-mime-attachment-header"></fieldset>
<pre class="x_moz-quote-pre">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a href="mailto:sr-users@lists.kamailio.org" data-auth="NotApplicable" class="x_moz-txt-link-abbreviated">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" data-auth="NotApplicable" class="x_moz-txt-link-freetext">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" data-auth="NotApplicable" class="x_moz-txt-link-abbreviated">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" data-auth="NotApplicable" class="x_moz-txt-link-abbreviated">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" data-auth="NotApplicable" class="x_moz-txt-link-abbreviated">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online: June 20-23, 2022
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" data-auth="NotApplicable" class="x_moz-txt-link-freetext">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</body>
</html>