[SR-Users] Storing in-progress dialogs in database

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 5 09:41:34 CET 2018


Hello,


On 05.11.18 09:26, jenus at cyberchaos.nl wrote:
> Hi all,
>
> I'm testing with the new dlg_db_load_callid function to replicate
> dialogs to another (standby) kamailio instance on failover. This works
> fine for calls that are connected. But i'm missing the dialogs in
> "ringing" state. Looks like dialogs are written to database by the
> dialog module when we receive the 200OK/ACK for the invite
> transaction. The result is that the call gets connected on the other
> kamailio instance but without a dialog.
>
>
> Is it possible to store the early_dialogs that are in rining state in
> the database?
>
> If that is not the case can i still create a dialog when i only
> receive the 200OK/ACK to the INVITE transaction (INVITE was processed
> by another instance) since TM is not aware of the INVITE transaction?

dialog module depends on tm module with some states during the
dialog/call initiation. Storing to db should not be difficult, but
depending on tm may result in useless record for the other kamailio
instance, some of tm callbacks won't be completed, so dialog record
won't be updated.

I planned for quire some time to remove dependency on tm for dialog
states and just use tm for sending keepalives and BYE requests, but
didn't get the time for it.

>
> I also tried to reject the 200OK to the  INVITE in the on reply route,
> but running into the same issue that TM does not know the INVITE
> transaction.

Should be possible in the core reply_route:

reply_route {
if(is_method("INVITE") and status==200) {
   if(!t_check_trans()) {
      drop();
}
}

Cheers,
Daniel

>
> Thanks,
>
> Jan
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com




More information about the sr-users mailing list