linphone-iphone in background-mod can't get an incoming call?

2k views Asked by At

I use linphone SDK in an iOS app.

When app goes to background-mode, app some times can get an incoming call or push notifications message, some times not.

Or if the app was in background-mode a few minutes ago, it can't get an incoming call.

Please help me out.

I used ipad to call the is in background-mode's iPhone.

ipad's log:

linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats

When I let the phone to the foreground can be dialed.

linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Garbage collecting unowned object of type LinphoneCallStats
linphone[2767:1066909] [Message] Background task belle-sip recv channel started. Unknown remaining time since application is not fully in background.
linphone[2767:1066909] [Message] channel [0x10eb70000]: starting recv background task with id=[94].
linphone[2767:1066909] [Message] channel [0x10eb70000]: received [437] new bytes from [TLS://sip.linphone.org:5223]:
linphone[2767:1066909] [Message]    SIP/2.0 180 Ringing
linphone[2767:1066909] [Message]    Via: SIP/2.0/TLS 192.168.1.232:58394;received=220.134.182.243;branch=z9hG4bK.5fJXlLPwC;rport=58394
linphone[2767:1066909] [Message]    Record-Route: <sips:37.59.51.72:5223;lr>
1

There are 1 answers

1
Cui Gang On BEST ANSWER

iOS APP in background-mode may be suspend. You can use PushKit, send a notifications to the APP before you make a VoIP call to the APP. About PushKit you can visit https://developer.apple.com/documentation/pushkit Good Luck!