[SR-Users] return 0 is not equivalent to exit
Patrick Karton
patrickarton at hotmail.com
Mon Jul 4 22:33:26 CEST 2022
Thanks Daniel i upgraded kamailio version
________________________________
De : Daniel-Constantin Mierla <miconda at gmail.com>
Envoyé : lundi 4 juillet 2022 09:59
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>; Patrick Karton <patrickarton at hotmail.com>
Objet : Re: [SR-Users] return 0 is not equivalent to exit
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.
Cheers,
Daniel
On 04.07.22 10:52, Patrick Karton wrote:
on 5.5 kamailio wiki for core it is stated that return (0) is the same as exit. but that's not true
request_route {
if (route(POS)){
xlog("POS PASS\r\n");
}
if (!route(NEG)){
xlog("NEG PASS\r\n");
}
if (!route(ZERO)) {
xlog("ZERO PASS\r\n");
}
xlog("AFTER ZERO\r\n");
send_reply("400","Error");
return;
}
route[POS]{
return 1;
}
route[NEG]{
return -1;
}
route[ZERO] {
return 0;
}
for example from the config above not only ZERO PASS will be printed but also all the actions after route(ZERO) are still executed.
instead if i replace return 0 with exit in route[ZERO]. this work as expected.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - Online: June 20-23, 2022
* https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220704/d7bbbe37/attachment.htm>
More information about the sr-users
mailing list