[Users] Using t_reply()

Douglas Garstang dgarstang at oneeighty.com
Tue Feb 28 02:44:18 CET 2006


You know, I have nightmares about OpenSER. Really.

Ok... I kinda thought I had something working. I had this... It works great when a Decline comes back from 192.168.10.10. The failure_route block sees a negative reply, and sends Service Unavailable back to the phone... great... no problem.

However, when there is NO REPLY from 192.168.10.10, t_check_status() STILL returns true. GOD OH GOD WHY? The docs say "in on_failure block - the code of the selected negative final reply".... well I didn't get a reply! So why does t_check_status() return true?

Sorry for the emotion, but I've been dealing with OpenSER for 6 months now and I've never felt so much stress with any piece of software as I have with this one. Ever time I open the config file, I want to scream!

route[10] {
    t_on_failure("11");
    rewritehostport("192.168.10.10:5060");
    if ( !t_relay() ) {
        xlog ("L_INFO","$avp(s:callid)[10]: t_relay() returned error");
    } else {
        xlog ("L_INFO","$avp(s:callid)[10]: t_relay() returned ok");
    }
}

failure_route[11] {
    route(12);
    if (t_check_status("")) {
        t_reply("503","Service Unavailable");
        return;
    } else {
        route(12);
    }
}

-----Original Message-----
From: Douglas Garstang 
Sent: Monday, February 27, 2006 6:24 PM
To: users at openser.org
Subject: [Users] Using t_reply()


Why can't I do this??? Arrgh! I want to be able to call onreply_route[35] when we get a reply. So, not surprisingly, in onreply_route[35] I want to see what sort of reply I got, and then send ANOTHER reply back to the originater of the message telling them something was wrong. Why can't I use t_reply in a reply_route? What's the most likely away around this, because I sure must be missing something fundamental.

route[10] {
    t_on_failure("11");
    t_on_reply("35");
    rewritehostport("pbx1-mgt0.ipt.oneeighty.com:5060");
    if ( !t_relay() ) {
        xlog ("L_INFO","t_relay() returned error");
    } else {
        xlog ("L_INFO","t_relay() returned ok");
    }
}     

onreply_route[35] {
    xlog ("L_INFO","Got some sort of reply");
    if (t_check_status("603")) {
        xlog ("L_INFO","got a decline");
        t_reply("603","Declined");
    }
    return;
}


_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list