I am having issues using uac_auth function and dialog module track_cseq_update option. The issue is related to CSeq mangling done by dialog module to keep synced CSeq in both parties involved.
It works fine when 1xx response is received for generated INVITE before retr_timer1 expires but, if not, the generated retransmission has the same CSeq as the original INVITE (the one without Authorization headers), instead of increasing CSeq by one again:
- INVITE sent by UAC (CSeq 100). - 407 from UAS. - INVITE generated by uac_auth (CSeq 101). - (... no answer ...) - Retransmission INVITE with Authorization header but with CSeq 100.
This is the minimal configuration file needed to test this behaviour:
``` loadmodule "tm.so" loadmodule "pv.so" loadmodule "sl.so" loadmodule "avpops.so" loadmodule "dialog.so" loadmodule "uac.so" loadmodule "rr.so"
modparam("dialog", "dlg_flag", 1) modparam("dialog", "track_cseq_updates", 1) modparam("uac", "auth_realm_avp", "$avp(realm)") modparam("uac", "auth_username_avp", "$avp(provideruser)") modparam("uac", "auth_password_avp", "$avp(secret)") modparam("tm", "retr_timer1", 100)
request_route { dlg_manage(); $ru = "sip:test@**SIPSERVER**"; t_on_failure("MANAGE_FAILURE"); t_relay(); exit; }
failure_route[MANAGE_FAILURE] { if (t_is_canceled()) { exit; }
if (t_check_status("(401)|(407)")) { $avp(realm) = ''; $avp(provideruser) = 'foo'; $avp(secret) = 'bar';
uac_auth(); }
t_on_failure("MANAGE_FAILURE"); t_relay(); exit;} ```
This is the Kamailio version I am using on a amd64 machine (Debian 7):
``` version: kamailio 4.4.1 (x86_64/linux) 99e1c3 flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 99e1c3 compiled on 13:37:42 Jun 20 2016 with gcc 4.7.2 ```
Is something wrong on my kamailio.cfg? Do you need any extra information?
Best regards.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679
Can you send me a pcap? It makes it easier to troubleshoot while not at the desktop (without an proper environment to reproduce).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-228128798
Hi Daniel,
I sent you the pcap to your gmail address. Don't hesitate to ask me if you need anything else.
Thank you.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-229946503
Thanks for pointing out -- the inbox on gmail gets very little attention. I will get back to this one in the next days.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-230290333
Can you test with git master branch? I pushed a group of commits that should fix this issue -- if all ok, then I will backport to 4.4.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-230801222
Hi Daniel,
I have tried master branch and the CSeq mangling mechanism does not adapt the CSeq now: INVITE with authorization header and its retransmissions have the same CSeq as the original INVITE.
The version I tried is:
``` version: kamailio 5.0.0-dev5 (x86_64/linux) fb3699 flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: fb3699 compiled on 11:47:40 Jul 11 2016 with gcc 4.7.2 ```
Do I need to enable _track_cseq_updates_ setting in a different way now?
Thank you.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-231692358
Can you send again a pcap with sip signaling for such case?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/679#issuecomment-231695367