[SR-Users] drouting & rd
Jean CĂ©rien
cerien.jean at gmail.com
Wed Mar 21 14:40:11 CET 2018
Hello
I have setup 2 gateways in my dr_rules: 5,6 - so the 2nd one is tried if
the first fails.
The second one requires credentials.
When the first one fails: I execute the following code:
failure_route[ROUTEFAIL] {
if ( t_check_status("[345][0-9][0-9]") or (t_branch_timeout() and
!t_branch_replied() )) {
t_on_failure("ROUTEFAIL");
if (use_next_gw()) {
xlog("L_INFO","failure_route(ROUTEFAIL) @@ routing
to: rd: $rd, ru:$ru, t_relay");
t_relay();
exit;
}
then in the same ROUTEFAIL (before this code), I have
if (t_check_status("401|407")) {
xlog("L_INFO","failure_route(ROUTEFAIL) @@ call to uac_auth(), $si rd:
$rd\n");
.....
So, when the first gateway replies with a 404, it executes correctly the
first block, finds the second gw and I see in the log that rd is set to its
address.
Yet, when the 2nd gw replies with 401, rd is set to the very first gw.
However, the pcap traces confirm it is indeed the second that replies this.
If this behaviour is correct, I cant seem to find the source IP of the
gateway that replied to me, to retrieve credentials from the db.
version: kamailio 5.0.5 / 5.0.6 (tested on both)
Thank you for your help
J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180321/2a699654/attachment.html>
More information about the sr-users
mailing list