At the time of the last message, I was at the 5.6 with the 2 commits cherry-picked on it. I'm sorry, I should have mentioned it. I'm now using the master branch. I ran into a problem where the auth module does a select secret, secre, ..., but I couldn't immediately find the reason, so I worked around it.

Anyway, it didn't fix the issue for me, so I went looking further. This is the query that's just before the earlier mentioned one:

select `rectime`,`a_callid`,`a_uuid`,`b_uuid`,`a_contact`,`b_contact`,`as_contact`,`bs_contact`,`a_tag`,`b_tag`,`a_rr`,`b_rr`,`s_rr`,`iflags`,`a_uri`,`b_uri`,`r_uri`,`a_srcaddr`,`b_srcaddr`,`s_method`,`s_cseq` from `topos_d` where `b_uuid`='btpsh-655e0722-8653-1'

The tables at that time are:

select * from topos_d;
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-------------------------------------------------------------------------------+-------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------+------+------------------------------+--------+-------+-------+-------+-----------+-----------+----------+----------+
| id   | rectime             | x_context | s_method  | s_cseq | a_callid                             | a_uuid                | b_uuid                | a_contact                                                                     | b_contact               | as_contact                                      | bs_contact                                      | a_tag                                | b_tag                                     | a_rr                                                                                | b_rr | s_rr                         | iflags | a_uri | b_uri | r_uri | a_srcaddr | b_srcaddr | a_socket | b_socket |
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-------------------------------------------------------------------------------+-------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------+------+------------------------------+--------+-------+-------+-------+-----------+-----------+----------+----------+
| 1907 | 2023-11-22 14:50:49 |           | SUBSCRIBE | 4499   | f40e29291da360e7                     | atpsh-655e0722-8655-1 | btpsh-655e0722-8655-1 | sip:phone_537935_0-87778069@123.456.78.910:50226;alias=123.456.78.910~50226~1 |                         | <sip:atpsh-655e0722-8655-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8655-1@123.456.78.910:8060> | dc481dcd29713c0c                     |                                           |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1910 | 2023-11-22 14:50:49 |           | SUBSCRIBE | 4500   | f40e29291da360e7                     | atpsh-655e0722-8653-1 | btpsh-655e0722-8653-1 | sip:phone_537935_0-87778069@123.456.78.910:50226;alias=123.456.78.910~50226~1 | sip:123.456.78.910:8067 | <sip:atpsh-655e0722-8653-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8653-1@123.456.78.910:8060> | dc481dcd29713c0c                     | 01ed138498061afc1be350944aa9ed96-b9a06c7b |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      2 |       |       |       |           |           |          |          |
| 1913 | 2023-11-22 14:50:50 |           | INVITE    | 23920  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-864d-1 | btpsh-655e0722-864d-1 | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                         | <sip:atpsh-655e0722-864d-1@123.456.78.910:8060> | <sip:btpsh-655e0722-864d-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                           |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1916 | 2023-11-22 14:50:52 |           | INVITE    | 23920  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8656-1 | btpsh-655e0722-8656-1 | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                         | <sip:atpsh-655e0722-8656-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8656-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                           |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1919 | 2023-11-22 14:50:52 |           | INVITE    | 23921  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8654-1 | btpsh-655e0722-8654-1 | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                         | <sip:atpsh-655e0722-8654-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8654-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                           |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1922 | 2023-11-22 14:50:54 |           | INVITE    | 23921  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8656-2 | btpsh-655e0722-8656-2 | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                         | <sip:atpsh-655e0722-8656-2@123.456.78.910:8060> | <sip:btpsh-655e0722-8656-2@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                           |                                                                                     |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1925 | 2023-11-22 14:50:57 |           | INVITE    | 30484  | 65f0f0d0-d6c1-48fb-8efb-4c403d5d53fc | atpsh-655e0722-864e-1 | btpsh-655e0722-864e-1 | sip:201@123.456.78.910:8066                                                   |                         | <sip:atpsh-655e0722-864e-1@123.456.78.910:8060> | <sip:btpsh-655e0722-864e-1@123.456.78.910:8060> | dd691130-7385-48f4-83fe-b6f7d508762a |                                           | <sip:123.456.78.910:8065;lr;ftag=dd691130-7385-48f4-83fe-b6f7d508762a;did=466.7271> |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
| 1928 | 2023-11-22 14:50:58 |           | INVITE    | 21501  | 898c1855-9925-49ff-84ad-ae9c2f742f5c | atpsh-655e0722-8653-2 | btpsh-655e0722-8653-2 | sip:201@123.456.78.910:8066                                                   |                         | <sip:atpsh-655e0722-8653-2@123.456.78.910:8060> | <sip:btpsh-655e0722-8653-2@123.456.78.910:8060> | ed3cee0b-f5c7-4668-b8ce-f68d60a0042f |                                           | <sip:123.456.78.910:8065;lr;ftag=ed3cee0b-f5c7-4668-b8ce-f68d60a0042f;did=aee.6d6>  |      | <sip:123.456.78.910:8060;lr> |      0 |       |       |       |           |           |          |          |
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-------------------------------------------------------------------------------+-------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+-------------------------------------------+-------------------------------------------------------------------------------------+------+------------------------------+--------+-------+-------+-------+-----------+-----------+----------+----------+
select * from topos_t;
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+-------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------------+-------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+--------------------------------------+--------------------------------------+-----------+-----------+----------+----------+
| id   | rectime             | x_context | s_method  | s_cseq | a_callid                             | a_uuid                | b_uuid                | direction | x_via                                                                                                                                                                                                         | x_vbranch                                      | x_rr                                                                                | y_rr                                                                               | s_rr                         | x_uri | a_contact                                                                     | b_contact                                                               | as_contact                                      | bs_contact                                      | x_tag                                | a_tag                                | b_tag                                | a_srcaddr | b_srcaddr | a_socket | b_socket |
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+-------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------------+-------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+--------------------------------------+--------------------------------------+-----------+-----------+----------+----------+
| 5651 | 2023-11-22 14:50:49 |           | SUBSCRIBE | 4499   | f40e29291da360e7                     | atpsh-655e0722-8655-1 | btpsh-655e0722-8655-1 |         0 | SIP/2.0/UDP 123.456.78.910:50226;received=123.456.78.910;branch=z9hG4bK961e68c0c5519e4f;rport=50226                                                                                                           | z9hG4bK09ff.77405be1a1aff2a4b55dc0862955849b.0 |                                                                                     |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0-87778069@123.456.78.910:50226;alias=123.456.78.910~50226~1 |                                                                         | <sip:atpsh-655e0722-8655-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8655-1@123.456.78.910:8060> | dc481dcd29713c0c                     | dc481dcd29713c0c                     |                                      |           |           |          |          |
| 5654 | 2023-11-22 14:50:49 |           | SUBSCRIBE | 4500   | f40e29291da360e7                     | atpsh-655e0722-8653-1 | btpsh-655e0722-8653-1 |         0 | SIP/2.0/UDP 123.456.78.910:50226;received=123.456.78.910;branch=z9hG4bK225b9a1e575e6121;rport=50226                                                                                                           | z9hG4bKac7d.d0f51ec08def55fa345c32731847bccf.0 |                                                                                     |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0-87778069@123.456.78.910:50226;alias=123.456.78.910~50226~1 |                                                                         | <sip:atpsh-655e0722-8653-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8653-1@123.456.78.910:8060> | dc481dcd29713c0c                     | dc481dcd29713c0c                     |                                      |           |           |          |          |
| 5657 | 2023-11-22 14:50:50 |           | INVITE    | 23920  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-864d-1 | btpsh-655e0722-864d-1 |         0 | SIP/2.0/UDP 123.456.78.910:60379;received=123.456.78.910;rport=60379;branch=z9hG4bKPj0d6bcdbe-7b6c-484c-a300-a4aa17a03df1                                                                                     | z9hG4bK4218.c548b9bd819f3d50a13f343055973505.0 |                                                                                     |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                                                                         | <sip:atpsh-655e0722-864d-1@123.456.78.910:8060> | <sip:btpsh-655e0722-864d-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                      |           |           |          |          |
| 5660 | 2023-11-22 14:50:52 |           | INVITE    | 23920  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8656-1 | btpsh-655e0722-8656-1 |         0 | SIP/2.0/UDP 123.456.78.910:60379;received=123.456.78.910;rport=60379;branch=z9hG4bKPj0d6bcdbe-7b6c-484c-a300-a4aa17a03df1                                                                                     | z9hG4bK4218.c548b9bd819f3d50a13f343055973505.1 |                                                                                     |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                                                                         | <sip:atpsh-655e0722-8656-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8656-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                      |           |           |          |          |
| 5663 | 2023-11-22 14:50:52 |           | INVITE    | 23921  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8654-1 | btpsh-655e0722-8654-1 |         0 | SIP/2.0/UDP 123.456.78.910:60379;received=123.456.78.910;rport=60379;branch=z9hG4bKPj39d687d9-8992-4457-9139-ce213d551f86                                                                                     | z9hG4bK5218.0a0ffaf3f11e06deee9ccab5971d764d.0 |                                                                                     |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       |                                                                         | <sip:atpsh-655e0722-8654-1@123.456.78.910:8060> | <sip:btpsh-655e0722-8654-1@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a | 9ceebb32-139c-4968-8b1f-0ea5329cc25a |                                      |           |           |          |          |
| 5666 | 2023-11-22 14:50:54 |           | INVITE    | 23921  | e7d9fb2b-f404-4071-a1d1-7f572dcbd6ee | atpsh-655e0722-8656-2 | btpsh-655e0722-8656-2 |         0 | SIP/2.0/UDP 123.456.78.910:60379;received=123.456.78.910;rport=60379;branch=z9hG4bKPj39d687d9-8992-4457-9139-ce213d551f86                                                                                     | z9hG4bK5218.0a0ffaf3f11e06deee9ccab5971d764d.1 |                                                                                     | <sip:123.456.78.910:8065;lr;ftag=9ceebb32-139c-4968-8b1f-0ea5329cc25a;did=a1.8141> | <sip:123.456.78.910:8060;lr> |       | sip:phone_537935_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1       | sip:123.456.78.910:8066                                                 | <sip:atpsh-655e0722-8656-2@123.456.78.910:8060> | <sip:btpsh-655e0722-8656-2@123.456.78.910:8060> | 9ceebb32-139c-4968-8b1f-0ea5329cc25a | 9ceebb32-139c-4968-8b1f-0ea5329cc25a | 7f5c6da6-48b8-4f57-8053-2739383377a2 |           |           |          |          |
| 5669 | 2023-11-22 14:50:57 |           | INVITE    | 30484  | 65f0f0d0-d6c1-48fb-8efb-4c403d5d53fc | atpsh-655e0722-864e-1 | btpsh-655e0722-864e-1 |         0 | SIP/2.0/UDP 123.456.78.910:8065;branch=z9hG4bK93ff.b147e2cfe641dee654399798782d37a6.0,SIP/2.0/UDP 123.456.78.910:8066;received=123.456.78.910;rport=8066;branch=z9hG4bKPjc880be8a-9c03-439e-9eb6-f42c56b9c62e | z9hG4bK93ff.48aba8c79801a9d666ea6f9a526c5925.0 | <sip:123.456.78.910:8065;lr;ftag=dd691130-7385-48f4-83fe-b6f7d508762a;did=466.7271> |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:201@123.456.78.910:8066                                                   | sip:phone_537938_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1 | <sip:atpsh-655e0722-864e-1@123.456.78.910:8060> | <sip:btpsh-655e0722-864e-1@123.456.78.910:8060> | dd691130-7385-48f4-83fe-b6f7d508762a | dd691130-7385-48f4-83fe-b6f7d508762a | c65045a5-7bf8-4ac3-8844-2eeb3af6e4b5 |           |           |          |          |
| 5672 | 2023-11-22 14:50:58 |           | INVITE    | 21501  | 898c1855-9925-49ff-84ad-ae9c2f742f5c | atpsh-655e0722-8653-2 | btpsh-655e0722-8653-2 |         0 | SIP/2.0/UDP 123.456.78.910:8065;branch=z9hG4bKbb5e.1ce976f13bdb3a62c8cb7bdfb5a8bac7.0,SIP/2.0/UDP 123.456.78.910:8066;received=123.456.78.910;rport=8066;branch=z9hG4bKPjf105594d-0d18-4623-80a9-4f5707bd32ec | z9hG4bKbb5e.68189bc8f760e10150c957c63540b8f0.0 | <sip:123.456.78.910:8065;lr;ftag=ed3cee0b-f5c7-4668-b8ce-f68d60a0042f;did=aee.6d6>  |                                                                                    | <sip:123.456.78.910:8060;lr> |       | sip:201@123.456.78.910:8066                                                   | sip:phone_537941_0@123.456.78.910:60379;ob;alias=123.456.78.910~60379~1 | <sip:atpsh-655e0722-8653-2@123.456.78.910:8060> | <sip:btpsh-655e0722-8653-2@123.456.78.910:8060> | ed3cee0b-f5c7-4668-b8ce-f68d60a0042f | ed3cee0b-f5c7-4668-b8ce-f68d60a0042f | 18d2ccd9-5d16-42b1-89b8-e2433b4be6b8 |           |           |          |          |
+------+---------------------+-----------+-----------+--------+--------------------------------------+-----------------------+-----------------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+-------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------------+-------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------------------------------------------+-------------------------------------------------+--------------------------------------+--------------------------------------+--------------------------------------+-----------+-----------+----------+----------+

So, I'd expect it would get the b_contact from the row in the dialog table with id 1910. But according to the log it doesn't have that data:

2023-11-22T14:50:49.922538+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:185]: db_str2val(): converting DATETIME [2023-11-22 14:50:49]
2023-11-22T14:50:49.922568+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [f40e29291da360e7]
2023-11-22T14:50:49.922595+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [atpsh-655e0722-8653-1]
2023-11-22T14:50:49.922625+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [btpsh-655e0722-8653-1]
2023-11-22T14:50:49.922716+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [sip:phone_537935_0-87778069@123.456.78.910:50226;alias=123.456.78.910~50226~1]
2023-11-22T14:50:49.922748+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [] # I expected the b_contact here
2023-11-22T14:50:49.922774+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [<sip:atpsh-655e0722-8653-1@123.456.78.910:8060>]
2023-11-22T14:50:49.922894+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [<sip:btpsh-655e0722-8653-1@123.456.78.910:8060>]
2023-11-22T14:50:49.922926+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [dc481dcd29713c0c]
2023-11-22T14:50:49.923040+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [01ed138498061afc1be350944aa9ed96-b9a06c7b]
2023-11-22T14:50:49.923090+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:196]: db_str2val(): converting BLOB []
2023-11-22T14:50:49.923140+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:196]: db_str2val(): converting BLOB []
2023-11-22T14:50:49.923169+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:196]: db_str2val(): converting BLOB [<sip:123.456.78.910:8060;lr>]
2023-11-22T14:50:49.923215+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [2]
2023-11-22T14:50:49.923288+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING []
2023-11-22T14:50:49.923417+01:00 debug balancer[34388]: message repeated 4 times: [ DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING []]
2023-11-22T14:50:49.923443+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [SUBSCRIBE]
2023-11-22T14:50:49.923490+01:00 debug balancer[34388]: DEBUG: <core> [db_val.c:143]: db_str2val(): converting STRING [4500]

Then it enters the if statement, because b_contact's length is 0. The tps_storage_link_msg logs the right data, I believe:

2023-11-22T14:50:49.924925+01:00 debug balancer[34388]: DEBUG: topos [tps_storage.c:568]: tps_storage_link_msg(): downstream: no - acontact: [] - bcontact: [sip:123.456.78.910:8067]

And then it hit the tps_storage_load_branch.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3627/c1822899320@github.com>