Hello,

can you run with debug=3 and see if you can spot any hint in the syslog messages about what could happen there?

If a new branch is sent out and active, Kamailio should not send out a final negative response. Maybe there is a second 401/407 for the second branch?

Cheers,
Daniel

On 19.09.23 20:09, Marrold wrote:
Hi all,

I'm attempting to use the uac module in KEMI (Python) to authenticate outbound requests. When the downstream replies with a 401 the proxy correctly re-sends the request with a Authorization header, but the 401 is also relayed to the caller.

As far as I can tell I've converted the example to KEMI correctly, but no matter what I try the 401 is still sent to the caller. Any ideas? 

The config I'm using is below - The avps are set when the request is sent so aren't visible here.

Thanks


    def ksr_failure_manage(self, msg):

        if self.ksr_route_natmanage(msg)==-255 : return 1

        if KSR.tm.t_is_canceled()>0 :
            return 1

        if KSR.tm.t_check_status("401|407") >0 :

            KSR.info(f"Got a 40X, should attempt authentication")

            if KSR.uac.uac_auth()>0:
                KSR.tm.t_relay()

            
KSR.info (f"Dropping further replies")
            KSR.set_drop()
            exit()

        return 1

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy - Training Services -- asipto.com
Kamailio World Conference - kamailioworld.com