Thanks Daniek,

 

it works now when i use the t->uac structure. I replaced the cbp messageId with custom structure and if the ack delivery fails, i put  the message converted from request buffer  into the silo table.

 

 

Dr. Barabás Péter

Minerva-Soft Kft.

Fejlesztésvezető

 

Mob:           +36 70 314 56 57

Tel:             +36 1 8 555 602

Fax:            +36 1 3 539 393

E-mail:        peter.barabas@minerva-soft.com
Cím:           
1117 Budapest, Infopark sétány 1, “I” Épület

 

minervatel-logo-web

 

From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: Wednesday, October 21, 2015 2:16 PM
To: Péter Barabás <Peter.Barabas@minerva-soft.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] msilo dump with non 2xx answer

 

Hello,

On 16/10/15 12:20, Péter Barabás wrote:

Hi Daniel,

 

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.


t->uas.request would be the request received by Kamailio, but here is not the case, because the request is generated by kamailio. You have to look at t->uac -- this is an array with branches sent out, in this case it should be the first branch (index 0).

Alternative is to pass the unique identifier to the new tm callback (used for sending the delivery message to A) and based on it store something in msilo that will be sent when A is coming online.

Cheers,
Daniel


-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com