You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[5.2] 200 Ok on Re-invite faces "transaction not found - (branch -1)" when topos module is used
Description
My setup is UAC --> Kamailio SBC --> External PBX
When external PBX sends 407 Proxy Autehtication required , the kamailio SBC sends another invite with auth header ( uac module ) and updated cseq ( from dialog modules track_cseq_updates ). To this the external PBX replies with 200 OK . However Kamailio SBC drops this 200 ok with "t_reply_matching(): failure to match a transaction" and "reply_received(): transaction not found - (branch -1)".
I am using Lua engine but problem is reproducible even with plain config file based routing configuration
Troubleshooting
Reproduction
Reproducible everytime with uac module working with uac and topos module from v5.1 and above.
Not sure if the callflow will appear disfigured below. Primarily what it depicts is that 200 ok from External PBX is dropped by Kamailio and hence kamailio tries to resen the auth based invote multiple times till request timeout occurs
|Time | UAC | Kamailio SBC | External PBX |
|6.649019 | INVITE SDP (g711U te | |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> Call-ID:OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM CSeq:1
| | ------------------> | |
|6.649538 | 100 trying -- your c | |SIP Status 100 trying -- your call is important to us
| | <------------------ | |
|6.650087 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:1
| | | ------------------> |
|6.651861 | | 407 Proxy Authentica |SIP Status 407 Proxy Authentication Required
| | | <------------------ |
|6.652194 | | ACK | |SIP ACK From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:1
| | | ------------------> |
|6.653097 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|6.673088 | | 100 Trying| |SIP Status 100 Trying
| | | <------------------ |
|6.676293 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|7.109339 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|7.110230 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|7.176010 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|8.109281 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|8.110154 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|8.176005 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
Possible Solutions
By monitoring redis, I can see that compacting headers by topos and tps storage C file on redis is only happening for the branch id of the first invite , such as
But when the 200 ok for re-invite comes back after authentication, the topos module tries to extract the records for new branch cseq such as
"HGETALL" "b:x:5ad386873790061ba2a8f1d254ec3300.1.cs1"
which is obviously not set and hence not fetched resulting in transaction not matched error and 200 ok being dropped.
If topos storage can HMSET for newer branch id as they are created, I presumme it should fix things up and matching transactions will be ok
Self fixed the problem by rearranging the order of module imports between dialog , uac, topos and topos_redis. Perhaps the same could be mentioned in developer doc somewhere . closing this for now
[5.2] 200 Ok on Re-invite faces "transaction not found - (branch -1)" when topos module is used
Description
My setup is UAC --> Kamailio SBC --> External PBX
When external PBX sends 407 Proxy Autehtication required , the kamailio SBC sends another invite with auth header ( uac module ) and updated cseq ( from dialog modules track_cseq_updates ). To this the external PBX replies with 200 OK . However Kamailio SBC drops this 200 ok with "t_reply_matching(): failure to match a transaction" and "reply_received(): transaction not found - (branch -1)".
I am using Lua engine but problem is reproducible even with plain config file based routing configuration
Troubleshooting
Reproduction
Reproducible everytime with uac module working with uac and topos module from v5.1 and above.
Debugging Data
Sample parameters declaration I am using is like
Log Messages
Pasting some snippets from Kamailio in debug mode 3 ( mangled the ips and values of some private identities)
uac_auth_notworking_with_topos.txt
SIP Traffic
Not sure if the callflow will appear disfigured below. Primarily what it depicts is that 200 ok from External PBX is dropped by Kamailio and hence kamailio tries to resen the auth based invote multiple times till request timeout occurs
Possible Solutions
By monitoring redis, I can see that compacting headers by topos and tps storage C file on redis is only happening for the branch id of the first invite , such as
But when the 200 ok for re-invite comes back after authentication, the topos module tries to extract the records for new branch cseq such as
"HGETALL" "b:x:5ad386873790061ba2a8f1d254ec3300.1.cs1"
which is obviously not set and hence not fetched resulting in transaction not matched error and 200 ok being dropped.
If topos storage can HMSET for newer branch id as they are created, I presumme it should fix things up and matching transactions will be ok
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: