DUM Keep Alive Manager

From reSIProcate
Jump to navigation Jump to search

The keep alive manager is responsible for sending CR/LF packets to all Network Associations for active invite sessions and client registrations.

To enable keep alive messages you need to call:

 auto_prt<KeepAliveManager> keepAlive(new KeepAliveManager);
 dum->setKeepAliveManager(keepAlive); 
 dum->getMasterProfile()->setKeepAliveTimeForDatagram(30);
 dum->getMasterProfile()->setKeepAliveTimeForStream(30);

Note: There is no notification to the application if sending the keep alive results in a TCP disconnection or a failed UDP send - although the next SIP message sent, will likely cause a 4xx response to be returned from the stack (if the connection is still lost).

Overriding the KeepAliveManager class is useful if your application would like to track network Associations.