[OpenSIPS-Users] Question on route types and replies

Daren FERREIRA darencrew at hotmail.com
Sun Dec 15 10:11:29 EST 2019


Hello,

I’ve been using my configuration script for a while without problems on 2.3.x releases, but, with 3.0.x some errors are coming.
Syntax changes are not a problem, as fortunately changes are well documented on the wikis :)

My problem is relative to replies (sl_send_reply and sl_reply_error) and the places where we’re allowed to use them.
For sl_send_reply, send_reply alternative has solved my problem, but that’s not as easy for sl_reply_error.

In every documentation, examples or forums i read, we use to do

        if (!t_relay()) {
                sl_reply_error();
        }

In order to send an error in case of any problem with t_relay.

But sl_reply_error is forbidden in failure routes, so, should we consider there will never have any problems with t_relay in failure routes?

In my case i use dispatcher, and, in case of failure, i try to find another destination, and relay messages to it, until the call succeed…
If the first try fails, it triggers a failure route where i’m no more able to send an error if the t_relay fails…

So is it safe not to check anymore the t_relay return on failure routes?
If not, is there any alternatives? I think about using send_reply instead of sl_reply_error, but with what arguments?  $err.rcode and $err.rreason ?

Thank you for your help and comments.

Regards


More information about the Users mailing list