title: How to use setKeepAliveTimeout:handler - IOS?
body: <p>We are working on an VoIP application, when my application goes background, I have been trying to use the setKeepAliveTimeout:handler: to keep the connection alive. As per the apple documentation, they asks to give minimum 600 seconds as timeout. Actually we are maintaining less timeout value, is it possible to handle with less time out? </p>
  
  <p>And if the time out hits, how to use the handler to reset the timer or request more time so that I can keep my connection alway alive (to receive incoming calls)?</p>
  
  <p>Here is what I am doing...</p>
  
  <pre><code>- (void)applicationDidEnterBackground:(UIApplication *)application
  {
  
      BOOL backgroundAccepted = [[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^{ [self backgroundHandler]; }];
      if (backgroundAccepted)
      {
          NSLog(@"VOIP backgrounding accepted");
      }
  }
  
  
  
  
  - (void)backgroundHandler {
  
      NSLog(@"### --&gt;VOIP backgrounding callback"); // What to do here to extend timeout?
  }
  </code></pre>