The function mark_presentity_for_delete() is responsible for flagging
a record in the presentity table for later removal.
Previously, this was done by overwriting the etag field with a fixed, hardcoded string:
static str str_offline_etag_val = str_init("*#-OFFLINE-#*");
However, the etag is intended to uniquely identify each PUBLISH message.
Overwriting it with a constant value violates the following MySQL uniqueness constraint:
UNIQUE KEY presentity_idx (username, domain, event, etag)
For example, when handling multiple PUBLISH messages (e.g., for legA and legB of the same call),
the fields:
- username
- domain
- event
are identical, and uniqueness is ensured solely by the etag.
Replacing it with a fixed string may cause key collisions and trigger MySQL errors.
To address this without altering the database schema or indexes,
str_offline_etag_val is now appended to etag to retain its uniqueness.
Change-Id: Icfff5da5dbaae1c47b4a0f33904a64f3b98ea957
(cherry picked from commit 77dff8f9b2)
(cherry picked from commit 4b679e350c)
* stop searching for more keys if key for scan is found
Change-Id: Iaefaef3628ac137a6a9c9437274d582f19073255
(cherry picked from commit 23a581e1a3)
(cherry picked from commit c5863e972a)
(cherry picked from commit dbd593cfa1)
Always use to-tag for NG message with rtpp-flags,
if presented. This change is caused by the processing
logic being moved to rtpengine with rtpp-flags.
Change-Id: Ib656fdccbd366053bab37ef04c48659a6fd3acc1
(cherry picked from commit e527845822)
(cherry picked from commit c937accfd0)
We are seeing a lot of error messages like:
> ERROR: pua [pua_db.c:895]: get_record_puadb(): Too many rows found (2)
After some investigation I come up with a couple of fixes:
* pua: improve the query to support caller|callee with same pres_id (same dialog)
* pua_dialoginfo: support uuid to generate pres_id to improve randomness
Change-Id: I43d5c58fe20c776b03af217f644443d800c9453e
(cherry picked from commit 95a5a1678b)
(cherry picked from commit 0628f1b018)
If the module uses an SDP taken from a pvar, and the current message
uses a multipart content, don't replace the entire message body with the
rewritten SDP, but only the part of the body that is SDP.
Change-Id: I9e43a7c2179c4887f16213c1a2fa2d2bf76b7764
Introduce new function: `allow_register_include_port()`
to be able to check the whole Contact header including port.
Example, register.deny content is:
ALL : "^sip:.*127.0.0.1:5062"
If the Contact is: "Contact: <sip:testuser1004@127.0.0.1:5062>"
then this will check the Contact hf including port of it.
Otherwise if usual `allow_register()` function is used,
then only the "testuser1004@127.0.0.1" will be taken into
account, which will lead the regex to be failing.
The func `allow_register_include_port()` works similarly
as `allow_register()` except it checks Contact's port.
Change-Id: I47820627e8ef91a09d7564d0848d5c356b3017d9