5

I am testing a Voip sip client written by an iphone app developer that uses PJSip. I personally have toyed around with some SIP development myself but am no expert.

With our VOIP softswitch (Acme packet / Broadsoft), it takes care of all the Nat Handling by dynamically determining the best Re-register time to keep the Nat pinhole alive on the nat device. Typically when the iphone is behind a NAT this time is between 60-90 seconds.

The Iphone App is using TCP and happily works with Backgrounding. Obviously backgrounding is ideal to save on the battery life. The call wakes up the phone and you can listen to the call.

The problem is that when the App goes into Background mode, it has no way of keeping the Nat Pinhole open. This means the firewall will always reject new incoming calls from reaching the Iphone App once the pinhole is closed. This has the affect of incoming calls working to the app for a few minutes, then not working for a period, and then when the app comes out of background and registers again, the inbound calls work again.

According to the apple documentation: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW3

They have inbuilt special exceptions for voip applications for backgrounding we can: 1. Configure the Apps sockets such that they can still handle incoming messaging. This doesn't help as the messaging will never reach the app if the nat pinhole is closed. 2. Use a Keep alive, however the minimum time is 600 seconds. This also means the pinhole will close.

Is there some clever way an App can send a Voip Sip registration message, say every 60 seconds or so whilst remaining in the background. Or can the app wake up every 60 seconds do some work and then close.

Im really perplexed as to whether or not there are other sip apps on the market that have got around this problem.

Ross Milan
  • 55
  • 4

2 Answers2

0

To solution to this is to have the Acme send TCP keepalives to the devices registered to it and set the expires to at least 600s. You might want it higher because the phone will take some time to re-REGISTER so something like 720s would work better.

This should keep the NAT pinhole open if you set the keepailve interval low enough, around 30 seconds or so. NAT should allow a higher interval but that might require some testing.

I know that ACME SBCs can handle this.

sibach
  • 26
  • 2
-1

TCP keep alives are allowed if the interval is not too short, i think this should maintain the NAT session opened. Can you tell us if it helps or not ?

Albrecht Andrzejewski
  • 2,100
  • 1
  • 13
  • 16