I'm looking for a way to distinquish between locally generated 408s triggered by the timers. My problem is that I'm using gateway failover in a failure route and on 408s it would retry phones multiple times if they didn't answer (no voicemail etc) - so fr_inv_timer was triggered after receiving a provisional reply. I need to failover in case a gateway doesn't respond with provisional (it's set at 5 seconds currently).
Will this work, is there a cleaner solution? I haven't had the oppurtunity to test it so I may have some syntax errors.
onreply_route {
if (t_check_status("1[0-9][0-9]")) {
xlog("L_NOTICE", "KAM_HOST: ($ci) $pr $mi route[$rm][0] $fu TO $ru -> Provisional Response --> $T_reply_code\n");
setflag(FLAG_PR_RECEIVED);
}
}
failure_route[ROUTE_DP_FAILURE] {
if (t_local_replied("last") && t_check_status("408") && isflagset(FLAG_PR_RECEIVED)) {
xlog("L_INFO", "KAM_HOST: ($ci) $pr $mi route[$rm][0] $fu TO $ru -> Local 408 after provisional response, giving up\n");
exit;
}
}
Thanks!
Bob
-------------------------------------------------------------------------- This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
El Jueves, 4 de Marzo de 2010, Robert McGilvray escribió:
I need to failover in case a gateway doesn’t respond with provisional (it’s set at 5 seconds currently).
Then you just need to use in failure_route:
if (t_local_replied("all")
This means that all the responses have been locally generated. You can play with fr_timer so TM would generate a 408 locally if no provisional response is received within fr_timer seconds.
Wouldn't that also trigger a local 408 if I received a provisional response but then exceeded the fr_inv_timer?
That's really the issue. An automated dialer ended up calling cell phones without voicemail multiple times because of the gateway failover.
-----Original Message----- From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Iñaki Baz Castillo Sent: Thursday, March 04, 2010 10:54 AM To: users@lists.kamailio.org Subject: Re: [Kamailio-Users] local 408 from fr_timer and fr_inv_timer
El Jueves, 4 de Marzo de 2010, Robert McGilvray escribió:
I need to failover in case a gateway doesn't respond with provisional (it's set at 5 seconds currently).
Then you just need to use in failure_route:
if (t_local_replied("all")
This means that all the responses have been locally generated. You can play with fr_timer so TM would generate a 408 locally if no provisional response is received within fr_timer seconds.
El Jueves, 4 de Marzo de 2010, Robert McGilvray escribió:
Wouldn't that also trigger a local 408 if I received a provisional response but then exceeded the fr_inv_timer?
Yes.
That's really the issue. An automated dialer ended up calling cell phones without voicemail multiple times because of the gateway failover.
Then you need something as your initial suggestion (by setting a flag).