Difference between revisions of "DUM Keep Alive Manager"

From reSIProcate
Jump to navigation Jump to search
 
(updated)
Line 5: Line 5:
 
   auto_prt<KeepAliveManager> keepAlive(new KeepAliveManager);
 
   auto_prt<KeepAliveManager> keepAlive(new KeepAliveManager);
 
   dum->setKeepAliveManager(keepAlive);  
 
   dum->setKeepAliveManager(keepAlive);  
   dum->getMasterProfile()->setKeepAliveTime(30); // Set Keep alive interval to 30 seconds
+
   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).
 
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.
 
Overriding the KeepAliveManager class is useful if your application would like to track network Associations.

Revision as of 08:14, 1 April 2008

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

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.