<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Pete,<br>
<br>
The 500 reply is generated within the t_relay(), if no branches
are sent out. A way to deal with this is to pass the 0x02 flag to
t_relay(), to force it to report the error to the script, rather
than automatically generated some err reply back. So t_relay()
will fail and based on the retcode you can generate something else
back to the caller.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 12.09.2024 18:06, Pete Kelly wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEWH9M9mkHji4-HANf+PpNBxgkfF3_eY-uJ_yeL_Gt29hg0HmA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Good afternoon.<br>
<br>
I have a situation where I have a number of branches for a call,
within each branch I am performing some checks and the result of
those checks will mean that the branch gets dropped (with
drop()) or allowed to continue.<br>
<br>
However if <i>all</i> branches are dropped, a standard "500
Server error occurred (1/TM)” message is sent upstream.<br>
<br>
Is there a way to customise this 500 error?<br>
<br>
Pete<br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>