[SR-Users] msilo dump with non 2xx answer
Peter.Barabas at minerva-soft.com
Fri Oct 16 12:20:06 CEST 2015
thanks for the answer, i did that exactly.
The reason of 493 comes our special IM handling. We send encrypted message and if client sends 493 back, it means, that the message cannot be decrypted and now the message should be resend in a "new encrypted session".
Now I have another problem belonging to the delivery notification problem.
The situation is the following.
- A user send a message to B user, A includes a custom SIP header into the request with a unique identifier
- B is offline, so kamailio stores the message into silo table
- when B will B online, msilo dumps the message
- when the ACK arrives, in m_tm_callback, kamailio send a new MESSAGE with the unique identifier to user A
It works fine, it user A is online, but if user A is offline, i want to send this MESSAGE into the silo table using m_store().
The question: how can I access the request sip MESSAGE in my custom m_ack_callback which is the callback function of uac_r structure, which I use to send the delivery notification MESSAGE. What is the proper configuration of uac_r structure to achieve this goal, since neither params->req nor t->uas.request has value?
At first, i wanted to send NOTIFY back from kamailio to sender user as delivery notification, but I do not want to be missed if user is offline, and the msilo solution can be fine for it also.
From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: Monday, October 12, 2015 2:17 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
Subject: Re: [SR-Users] msilo dump with non 2xx answer
On 08/10/15 11:58, Péter Barabás wrote:
I set instant message store&forward in kamailio using MSILO module. It works fine in many cases.
We have special message handing (encryption in "session"), i do not go into detail since it is not necessarily to solve the problem.
So there are situations, when the offline receiver should get a MESSAGE and will acknowledge with 4xx status code, like 493: the original message is stored in silo table and when the receiver will be online, it will be dumped and he will send 493.
Question: how can I delete the message from silo table with MSILO (since it is not 2xx) and how can i forward this ack message to the original sender instead kamailio?
Do I understand right that the MESSAGE sent by msilo is replied with 493 by recipient? In SIP, 200-299 are considered the codes for which a recipient accepts the request. Any particular reason for the client to send 493?
Anyhow, the patch to msilo should not big -- change inside function m_tm_callback() from modules/msilo/msilo.c for which code to set the MS_MSG_DONE flag.
The SIP response cannot forwarded to initial sending entity, because it lacks appropriate Via headers, but more important it will not have a request generated by that entity. You can have a NOTIFY request generated by kamailio sent to the entity to inform that its message was delivered.
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users