[OpenSIPS-Users] Failure Route Question
Răzvan Crainea
razvan at opensips.org
Thu May 17 09:56:26 EDT 2018
Hi, Alex!
You can use the t_check_status() function to check the status of a
transaction. Use something like this if you are only interested in 404
or 503:
if (t_check_status("(404)|(504)")) {
...
}
[1]
http://www.opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status
Best regards,
Răzvan
On 05/17/2018 04:45 PM, Alexander Perkins wrote:
> Hi All. I have a question regarding the failure route. Currently, my
> failure route is logging the failed attempts to a database. However,
> I've noticed that I am getting all the failures. Is it possible to get
> the failure reason from the route? For example, it was a 404 or a 503,
> etc. Here's my logic. I'd like to include the failure code on there,
> if possible.
>
> failure_route[1] {
> if(is_method("INVITE")) {
> avp_db_query("INSERT INTO
> RoutingFailures(FromNumber,ToNumber,FromIP,ToIP)
> VALUES('$fU','$tU','$si','$td')","","2");;
> }
> }
>
> Any help is appreciated.
>
> Thank you,
> Alex
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
More information about the Users
mailing list