[SR-Users] 401 responses ending up in onreply_route instead of failure_route

Daniel Tryba daniel at pocos.nl
Thu Jan 30 18:33:30 CET 2014


Situation:
endpoint -> kamailio (4.1.0) -> upstream sip server (kamailio 4.0.x)

For an outbound call endpoint authenticates with kamailio. Kamailio relays the 
invite to upstream and upstream responds with a 401. 

This 401 should trigger authentication. So I thought I could use uac_auth() to 
fix this. uac_rely may only be used from FAILURE_ROUTE. So the initial INVITE 
from the endpoint has this set:

        if (is_method("INVITE")) {
                if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
        }

But to my suprise the 401 doesn't end up in the failure_route but in the 
onreply_route. Why? What am I missing?

-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024



More information about the sr-users mailing list