Opened 5 years ago

Last modified 20 months ago

#1941 closed enhancement

Review iOS 10 integration to PJSIP — at Version 3

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.6
Component: common Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by ming)

iOS 10 is coming with new features such as CallKit, framework changes such as in AVFoundation, and also API deprecations. This ticket will review and apply any integrations needed in PJSIP library.

PushKit guide

What your application needs to do:

  1. Set up PushKit according to Apple's doc.
  2. Upon startup, request for push tokens.
  3. Send REGISTER to SIP server with additional specific header or header params to tell the SIP server about the PN (Push Notification) info (server URI, tokens, etc). You can use pjsua_acc_config.reg_hdr_list or pjsua_acc_config.reg_contact_params (the later is available in ticket #1965).
    Note: draft Push Notifications in the Session Initiation Protocol (SIP) suggests to put it in Contact header params, for example:
    Contact: <sip:alice@alicemobile.example.com;
         pn-type=acme;pn-methods="INVITE";
         pn-uri="https://pn.acme.example.com/ZTY4ZDJlMzODE1NmUgKi0K">
    
  4. After a successful registration, SIP client can go background and will be woken up by the OS upon receiving push notification.

Configure your SIP server:

  1. Parse the PN info in registration.
  2. Upon receiving an incoming SIP INVITE, SIP server should contact PN server as specified via PN URI and tokens.
  3. After some interval (assuming the SIP client has been woken up), it then can send/forward the SIP INVITE message to the SIP client.

CallKit support

  1. AVAudioSession handling
    Application needs to handle its own audio session management according to Apple's doc.

API/Symbol Deprecations

  1. "kCFStreamNetworkServiceTypeVoIP is deprecated (first deprecated in iOS 9.0 - use PushKit for VoIP control purposes."
    See the PushKit guide above.
    If you want to disable the use of kCFStreamNetworkServiceTypeVoIP, set PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0.
  1. AVFoundation API deprecation:
    "warning: 'devices' is deprecated: first deprecated in iOS 10.0 - Use AVCaptureDeviceDiscoverySession instead."
    Done in r5454.

Reference:

Change History (3)

comment:1 Changed 5 years ago by ming

In 5453:

Re #1941: Add support to specify min iOS versions in configure-iphone and update the default for ipjsua sample app

comment:2 Changed 5 years ago by ming

In 5454:

Re #1941: Support for AVCaptureDeviceDiscoverySession to replace the deprecated [AVCaptureDevice devices] in iOS 10.

comment:3 Changed 5 years ago by ming

  • Description modified (diff)
Note: See TracTickets for help on using tickets.