route[Carrer] {
#!ifdef WITH_CARRIERROUTE
if (!cr_route("default", "default", "$rU", "$rU",
"call_id")) {
xlog("L_ERR", "cr_route failed\n");
exit;
}
#!endif
$avp(s:host)= $rd+":"+$rp;
t_on_failure("1");
if (!t_relay()) {
sl_reply_error();
};
}
failure_route[1] {
revert_uri();
#!ifdef WITH_CARRIERROUTE
if (!cr_next_domain("default", "default", "$rU",
"$avp(s:host)", "$T_reply_code", "$avp(s:domain)")) {
xlog("L_ERR", "cr_next_domain failed\n");
exit;
}
if (!cr_route("default", "default", "$rU", "$rU",
"call_id")) {
xlog("L_ERR", "cr_route failed\n");
}
t_on_failure("1");
route(NASIR);
exit;
#!endif
$avp(s:host)= $rd+":"+$rp;
if (!t_relay()) {
xlog("L_ERR", "t_relay failed-custom\n");
exit;
};
}