-
Notifications
You must be signed in to change notification settings - Fork 633
Description
OpenSIPS version you are running
version: opensips 3.1.2 (x86_64/linux)
Describe the bug
In the log, it is found that the m_dump() can correctly read a saved offline message from the silo table.
DBG:db_mysql:db_mysql_str2val: converting BLOB [the message]
However, the message content can't be found in the message sent. The message sent has two issues:
-
Wrong time.
This can be confirmed in the function int m_build_body(str *body, time_t date, str msg, time_t sdate) of the source file msfuncs.c. ctime_r(&sdate, p) should be ctime_r(&date, p); -
message content (body) was truncated off.
The correct message should be something like "[Offline message - Thu Jan 1 08:00:00 1970] the message" according to the source code and the document, however, it is always "[Offline message - Thu Jan 1 08:00:00 1970". It is interesting that the right bracket "]" was also lost.
Here is the log:
DBG:proto_tls:proto_tls_send: buf=#012MESSAGE sip:1234@1.2.3.4:17406;transport=TLS;ob;push-type=apple;push-app=com.domain.anapp;push-tok=d26762bc90493928383257b16d01c0306743842283890fbf3fc283f727a151dd1 SIP/2.0#015#012Via: SIP/2.0/TLS 5.6.7.8:5061;branch=z9hG4bKe70d.f15e1307.3;i=3a2d52a7#015#012Via: SIP/2.0/TLS 5.6.7.8:5061;branch=z9hG4bKe70d.e15e1307.0#015#012To: sip:1234@name.domain.com#15#012From: sip:1234@name.domain.com;tag=9afce3b8fbcf13cb78dc600ec9e7e602-04bf#015#012CSeq: 10 MESSAGE#015#012Call-ID: 6143c1e650612950-18615@9.10.11.12#015#012Max-Forwards: 69#015#012Content-Length: 51#015#012User-Agent: OpenSIPS (3.1.2 (x86_64/linux))#15#012Date: Thu, 14 Oct 2021 06:36:48 GMT#015#012Content-Type: text/plain#015#012Contact: sip:1234@name.domain.com;msilo=yes#015#012#015#012[Offline message - Thu Jan 1 08:00:00 1970#012
To Reproduce
Send an offline message that calls m_store() successfully, and check the message received by the receiver when comes online. Also check the log.
Expected behavior
The original offline message should be sent
Relevant System Logs
Please see above
OS/environment information
- Operating System:
- OpenSIPS installation:
- other relevant information:
Debian GNU/Linux 10 (buster)
Additional context