Domanda

I have integrated the linphone sdk in my app.When my app goes to the background mode, my app is not getting any incoming calls. I want to make work my app as like skype when it goes to the background mode.

I have added required background modes in info.plist.

  Application does not run in background  - NO
  Required background modes
    item 1        App provides Voice over IP services

I have implemented following method in ApplicationDidEnterBackground , still I'm facing same issue.

1.setKeepAliveTimeout:handler:
  [http://www.linphone.org/docs/liblinphone/group__IOS.html][1]

Please help me out. Thanks in advance.

È stato utile?

Soluzione

It does not work in UDP mode, if your SIP server can be switched to TCP mode it should work (eg: for asterisk use transport=tcp in your sip.conf). It seems that IOS does not allow UDP traffic in background mode.

I recommend you to switch to SIP TCP/TLS for having background mode working on Linphone for IOS.

The only way to workaround this UDP problem is to force the iphone to stay live by creating a long running background task. The result is that the device never suspends, which drains the battery very fast.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top