I'm not sure it will be helpful, but usually I use:

onreply_route[] - to handle flags, fix NAT-ed Contact and NAT-ed SDP in "200 OK" or "183 Session Progress" responses and do SDP codec rewriting with my custom module

failure_route[] - to handle responses from downstream and I do it with t_check_status(). BTW, remember that t_check_status() will always return higher response code from all received responses.

This was for SER. It should be similar in OpenSER.


--
Regards,
Arek Bekiersz

Douglas Garstang wrote:
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);
    }

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to