[OpenSIPS-Users] Failure Route Question

Ben Newlin Ben.Newlin at genesys.com
Thu May 17 10:20:03 EDT 2018


You can also use $T_reply_code [1] to get the actual value, if you want to print or store it.

[1] http://www.opensips.org/html/docs/modules/2.4.x/tm.html#pv_T_reply_code

Thanks,
Ben Newlin
 

On 5/17/18, 9:58 AM, "Users on behalf of Răzvan Crainea" <users-bounces at lists.opensips.org on behalf of razvan at opensips.org> wrote:

    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
    
    _______________________________________________
    Users mailing list
    Users at lists.opensips.org
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    
    



More information about the Users mailing list