[OpenSIPS-Users] Logging outgoing requests without replies
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Jan 20 14:17:45 UTC 2026
Hi Alexey,
The AI is almost there, check this:
https://www.opensips.org/Documentation/Script-Routes-3-6#failure_route
In failure route you do continue the processing of the request that got
the negative reply.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 19.01.2026 15:27, Alexey wrote:
> Hi list,
>
> what is the best way to log outgoing requests without replies?
>
> E.g. OpenSIPS sends outgoing REGISTER requests to VoIP provider.
> But for some reason some requests do not receive any replies (connectivity issue
> or something lika that).
> And I would like to log such events.
>
> Google AI says:
>
> you can detect a "no reply" scenario by checking if the transaction timed out
> using the t_check_status() function or checking for a specific internal code.
>
> failure_route[optional_name] {
> # Check if the failure was a timeout (no reply received)
> if (t_check_status("408")) {
> xlog("L_INFO", "Outgoing request $rm to $ru timed out with
> no reply\n");
> }
>
> # Optional: Log specific details about the failed destination
> xlog("L_NOTICE", "Failed transaction for $fU to $rU - Status:
> $T_reply_code\n");
> }
>
>
> But this AI example seems to be wrong, as it checks the received reply code.
> And I want to log outgoing requests which have not received any replies.
>
> The only idea I have is to describe (using regular expressions) any possible
> reply codes - 1xx, 2xx, 3xx, 4xx, 5xx, 6xx and write the condition like
>
> failure_route[optional_name] {
> if !(t_check_status("(^1)|(^2)|(^3)|(^4)|(^5)|(^6)")) {
> xlog(" ... ");
> }
> }
>
> Besides this, the documentation says about failure route:
> "failed transaction routing block. It contains a set of actions to be
> taken each transaction that received only negative replies (>=300) for
> all branches."
>
> So, it processes replies. And I'd like to log outgoing requests which
> hav not received any replies from the other side.
>
>
> But not sure if this is the right way
More information about the Users
mailing list