route{
if (!method=="REGISTER")
{
record_route();
};
if (loose_route()) {
append_hf("P-hint:
rr-enforced\r\n");
route(1);
};
if (!uri==myself) {
append_hf("P-hint:
outbound\r\n");
route(1);
};
if (uri==myself) {
if
(method=="REGISTER")
{
save("location");
exit;
};
if (method=="INVITE")
{
if (!lookup("location"))
{
if (!load_gws())
{
sl_send_reply("500", "Server Internal Error - Cannot load
gateways");
return;
};
};
if (!next_gw())
{
sl_send_reply("503", "Service not available - No
gateways");
return;
};
};
};
};
t_on_failure("1");
route(1);
}
route[1] {
if (!t_relay()) {
sl_send_reply("666","t_relay fallido");
return;
};
exit;
}
failure_route[1] {
if (!next_gw()) {
t_reply("503", "Service not available - No gateways
1");
return;
};
if (!t_relay()) {
t_reply("666","t_relay
fallido");
return;
};
}