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
--
best regards, Alexey
https://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users