On Fri, Mar 01, 2019 at 08:23:11AM -0600, JR Richardson wrote:
My mind is not right on this one, need a pointer. Here
is the simple scenario:
Carrier><kamailio proxy><end device
The end device is a static IP, the proxy dips database and knows where
to send numbers destined for the end device, but if there is no
response from the end device (it's off-line), how do I time-out the
transaction and send a 503 'Service Unavailable' back to the first leg
for the carrier to stop re-invites?
I assume I need a new [FAIL_TWO] route that handles this event.
You need a failure route and to set the timeout on an INVITE
see:
https://www.kamailio.org/docs/modules/5.2.x/modules/tm.html#tmp.p.fr_inv_ti…
Set the INVITE to endpoint to 30s with t_set_fr
check in the failure route for a 408:
if (t_check_status("408"))
{
send_reply("503","Service Unavailable");
exit;
}
But you might want to send a 4xx (eg 480) or 6xx (603) instead of 503.