[SR-Users] tm module question

Prelle, Stefan Stefan.Prelle at qsc.de
Fri Jan 14 16:52:45 CET 2011


Hi folks,

I have a problem with a scenario where an incoming INVITE is forwarded to a redirect server
which responds with 302 and a new target in the Contact header (B). The call is being forwarded 
to the new contact correctly. All responses from B that are either provisional or a 200 OK
are being routed back to the caller. If B responds with any code >=400 the 302 from the 
redirect server is being returned to the caller instead of the received code. 

A          B          C
|--INVITE->|          |
|          |--INVITE->|
|          |<---302---|   D
|          |----INVITE--->|
|          |<-----404-----|
|<---302---|

Is this intended? And if so, is there any way to change this behaviour so the latest received 
response is returned?

I tested using the version from repository from 13.01.2011

My reduced config looks like this:

route{
        if (@to.tag != "") {
                if (loose_route()) {
                        record_route();
                        t_relay();
                } else {
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... ignore and discard.\n");
                                        exit;
                                }
                        }
                        record_route();
                }
		    exit;
        } else {
                record_route();
        }

        t_on_failure("REDIRECT_REPLY");
        if (!t_relay_to_udp("192.168.0.10","5060")) {
                sl_reply_error();
        };
        exit;
}

failure_route[REDIRECT_REPLY] {
        if (t_check_status("3[0-9][0-9]")) {
                get_redirects("*:1");
                t_relay();
                exit;
        }
}

Regards,
  Stefan


More information about the sr-users mailing list