Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upiPhone/iPad does not receive incoming calls when the phone/pad is on 'sleep' or 'lock' mode #121
Comments
This comment has been minimized.
This comment has been minimized.
01CGAT
commented
Oct 6, 2016
•
With the latest iOS10 SDK (Xcode 8) you need to configure Apple Push Notification Services (server-side) for background VOIP modus in combination with PushKit (client-side), older legacy VOIP background (non-PushKit) methods are not supported anymore, and will not work with the iOS 10 SDK. Or you can try to compile with iOS 9.3 SDK (only available with Xcode 7, not 8, as it can only use iOS 10 SDK) to make use of the old legacy VOIP background modus, which is probably only available in an old linphone-iphone version, 3.13.9 for example. Newer linphone-iphone versions only might have the newer VOIP PushKit functionality and not the legacy VOIP background functionality. With the legacy VOIP background modus compiled with the iOS 9.3 SDK you can have a TCP VOIP background modus without the need to configure Apple Push Notifications server-side, UDP will not work either, that is only supported in even older iOS SDK's. And this legacy TCP VOIP background modus is only active as long as the app is available in the background. If you completely quit the app, this background modus is not available either as long as you don't configure the Apple Push Notifications server-side. FYI: Apps compiled with the iOS 9.3 SDK will run on iOS 10 phones too. |
This comment has been minimized.
This comment has been minimized.
JFSene
commented
Oct 14, 2016
Im having the same problem, whenever the App is in the BG i get this:
So i set a breakpoint and this is what i got:
Any ideas? |
This comment has been minimized.
This comment has been minimized.
01CGAT
commented
Oct 14, 2016
I don't know why you get the error, but I do know UDP is not supported for a VoIP background modus in Apple devices and that's what I see you're using for transport. Maybe switching to TCP solves everything. |
This comment has been minimized.
This comment has been minimized.
JFSene
commented
Oct 14, 2016
Thankyou Juiced!! Oh BTW i translated the whole iOS project to Portugueses(Brazilian) if you want to add it to the project, feel free. PS. Didnt know how to tell you that, so ill just post it here =) |
This comment has been minimized.
This comment has been minimized.
01CGAT
commented
Oct 14, 2016
Oh, I'm not an "official" member of this repository and I'm not affiliated with Belledonne Communications, just here trying to help people with what I find out thus far while working on Linphone for a project. |
This comment has been minimized.
This comment has been minimized.
TheEngineerz
commented
Oct 26, 2016
•
@juiced please correct me if I am wrong . . . ,so you mean for now we should compile our app for iOS 9.3 and implement push kit inside app and apple VoIP push service on server end. In this way our background calling will work on iOS 9 & 10 both. Right ? Actually I want to ask what is the best way if we want our app to receive call in background for iOS 9 and 10 both.? |
This comment has been minimized.
This comment has been minimized.
01CGAT
commented
Oct 26, 2016
•
I'm not a core linphone developer, but from what I know/my experience: The best way is to go with the latest linphone version (which has PushKit code) and to go with an Apple Push Notification supported SIP server. The Apple PushKit framework is available since iOS 8.0. You don't need to compile for iPhone iOS 9.3, you can compile for iOS 8+ if you want, because PushKit is available since iOS8+. I was talking about the 9.3 version of the iOS SDK (available in Xcode 7 and not available anymore in Xcode 8) and the need for compiling linphone against it when you need to use the older legacy TCP VOIP background modus of linphone (the non-PushKit VOIP background modus). This older legacy TCP VOIP background modus is slower/less reliable/more battery draining than PushKit, and not supported/not available when linphone is compiled against the iOS 10 SDK, you will see error messages in your linphone debug log. If your SIP server is Apple Push Notification ready, then the way to go is to just use the latest version of everything. Xcode 8, iOS 10 SDK, compile the latest version of linphone for iOS 8+. If your SIP server is not Apple Push Notification ready, you will get network error connect messages when using the latest versions of everything (with PushKit support in the app) and when taking the app out of the background, even when you turn off push notifications for the user account in the linphone app. |
afriedmanGlacier
referenced this issue
Nov 16, 2016
Closed
Cannot receive call with Push Notifications turned on #137
This comment has been minimized.
This comment has been minimized.
afriedmanGlacier
commented
Nov 16, 2016
@juiced do you have any idea if the "Push Notification" switch in settings is related to the "older legacy TCP VOIP background modus" or to the PushKit VOIP background modus? In other words, if I want to use PushKit notifications, should that switch be on or off? And are there other things in the client that need to be set? |
This comment has been minimized.
This comment has been minimized.
01CGAT
commented
Nov 16, 2016
Hi @afriedmanGlacier , unfortunately I cannot answer that question, as I'm still dealing with the legacy VOIP background modus myself. But if we can assume anything, I would assume that the switch should be turned on for PushKit VOIP background modus. |
This comment has been minimized.
This comment has been minimized.
JFSene
commented
Nov 16, 2016
Hello @juiced @afriedmanGlacier My app crashes everytime that switch is on, and i /* */ the legacy VOIP code, so my guess is that its related to the legacy code. |
This comment has been minimized.
This comment has been minimized.
afriedmanGlacier
commented
Nov 17, 2016
@JFSene or @saradavid16 were you able to get Apple Push notifications working and receive incoming calls over TCP? If so, I'm wondering what SIP server you are using and if you have any additional tips for getting it to work? |
This comment has been minimized.
This comment has been minimized.
JFSene
commented
Nov 18, 2016
@afriedmanGlacier Yes and No. I used this https://github.com/JFSene/houston to send Pushes, very easy to use and can be applied to the server side and No, our PBX runs on a UDP connection, very handy to get it to work with apple, but worth it. |
This comment has been minimized.
This comment has been minimized.
TheEngineerz
commented
Mar 22, 2017
@JFSene I am using freePBX for server side and Unfortunately don't know much about how to write service to send push to my app(basically i am only ios developer |
This comment has been minimized.
This comment has been minimized.
babumoshai-ankush
commented
Apr 20, 2017
•
In old SDK (mid 2015) when I set transport to TCP, call is coming in foreground & background mode from remote server. But somehow the video is not establishing for both scenario. But when I set transport to UDP, video call establishing perfectly when the app is in foreground mode but didn't get notification in background mode. Regards, |
This comment has been minimized.
This comment has been minimized.
mefsantos
commented
May 1, 2017
@TheEngineerz Have a look at flexisip (http://www.linphone.org/technical-corner/flexisip/overview) it already comes prepared for push notifications and firebase (android). you just need to add the certificates and set the path in the server configurations. To test the Push Notifications (and VOIP notifications) you can always use Easy APNs Provider from the Mac AppStore (https://itunes.apple.com/us/app/easy-apns-provider-push-notification-service-testing-tool/id989622350?mt=12). With this app you just need to import the certificates to the app, connect to the server, add the app token and fill the text fields to complete the notification as you want. |
This comment has been minimized.
This comment has been minimized.
TheEngineerz
commented
Jun 27, 2017
@mefsantos my server developer have configured the certificates and have written the basic push service. now he doesn't know what exactly needs to send to activate the Call Kit, so the user can receive a call in the background. Please advice what i should tell him |
ReisBenjamin
closed this
Aug 10, 2017
This comment has been minimized.
This comment has been minimized.
See Callkit apple doc please |
ReisBenjamin
reopened this
Aug 10, 2017
ReisBenjamin
closed this
Aug 10, 2017
This comment has been minimized.
This comment has been minimized.
S0U1SB4N3
commented
Aug 20, 2017
You will have to create a VoIP certificate from Apple developer account then send a push notification right before the server sends the call and it will wake up the phone before the call is attempted. You need the server to get the token and store it for each sip account that uses the soft phone |
saradavid16 commentedOct 6, 2016
Hello Everyone,
I have registered SIP account with our own sip server in TCP mode. Whenever the iPhone/iPad went to Sleep/Lock mode does not receive incoming call. Could you please suggest how do I overcome this issue.