[OpenSIPS-Users] not trigger on_failure_route[0] when use mi interface
Vlad Paiu
vladpaiu at opensips.org
Tue Apr 14 17:28:26 CEST 2015
Hello,
Currently there is no failure_route support for SIP messages generated
internally by OpenSIPS.
What you can do is to loop the SIP Message back to OpenSIPS from the
local_route , and that way you will get the looped MESSAGE in your main
route , where you can arm a failure route.
Short snipped of code :
local_route {
if (is_method("MESSAGE")) {
$du = "sip:OPENSIPS_IP:OPENSIPS_PORT";
}
}
route {
...
...
if ($si == "OPENSIPS_IP" && $sp == "OPENSIPS_PORT") {
# processing of the looped message here
lookup("localtion");
t_on_failure("user_offline");
t_relay();
exit;
}
}
failure_route[user_offline] {
...
...
m_store();
}
Best Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com
On 14.04.2015 11:04, chow wrote:
> in my understanding: mi interface will first enter local_route,
> in local route , will generate SIP Message, this SIP Message will route
> to main REQUEST_ROUTE.
> in REQUEST_ROUTE, I have some code part like this:
>
> t_on_failure("sip_message");
>
>
> if this transaction have any error(I also use t_relay(0x02) in
> route[relay]), the FAILURE_ROUTE will be trigger.
>
>
>
> but , in my case, in local_route, it generate 408 code, then exit.
> so, where I can call m_store() to store message when have any error.
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/not-trigger-on-failure-route-0-when-use-mi-interface-tp7596480p7596481.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list