Hello,

change of cseq results in a different transaction, there should be two
at the same time for a short interval. Try to see if debug=3 offers any
hints.

For clarification: do you need to do authentication two times? Second
time with pv function?

Cheers,
Daniel

On 12.12.22 21:53, Alex Balashov wrote:
> To be clear, the two t_newtran() calls in the main request_route were 
> naturally a typo. :-) Only the first one was intended. 
>
>> On Dec 12, 2022, at 3:45 PM, Alex Balashov <[email protected]> wrote:
>>
>> Hi,
>>
>> Is there any good solution for the scenario of an auth_challenge() with two 
>> separate transaction suspensions?
>>
>> To clarify (simplified):
>>
>>     request_route {
>>         ...
>>
>>         t_newtran();
>>
>>         if(!is_present_hf("Authorization") && 
>> !is_present_hf("Proxy-Authorization")) {
>>            auth_challenge("$fd", "1");
>>            exit;
>>         }
>>
>>         # TM suspend/continue
>>         t_newtran();
>>
>>         async credentials query("RESUME_AUTH");
>>     }
>>
>>     route[RESUME_AUTH] {
>>         # Credentials received into PVs.
>>
>>         if(!pv_auth_check("...")) {
>>             auth_challenge("$fd", "1");
>>             exit;
>>         }
>>
>>         # Create transaction shell if not exists already from auth query.
>>         if(!t_lookup_request())
>>            t_newtran();
>>
>>         # TM suspend/continue
>>         async route query("RESUME_ROUTING");
>>     }
>>
>>     route[RESUME_ROUTING] {
>>         # Unmarshal etc.
>>
>>         t_relay(); # etc.
>>     }
>>
>> What happens here is that the first auth_challenge() results in a 
>> retransmission of its 407 challenge without absorbing the negative ACK. This 
>> is despite the ostensibly stateful behaviour of auth_challenge() without 
>> "force_stateless_reply" enabled.
>>
>> In this case, it eclipses the second, unrelated 407 challenge from the 
>> subsequent routing query (407 challenge with +1 CSeq):
>>
>>
>> <Screenshot 2022-12-12 at 3.44.15 PM.jpeg>
>> -- Alex
>>
>> -- 
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
[email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to