Jump to: navigation, search

8.1.2 Migration Guide

This guide helps you migrate from SIP Endpoint SDK for OS X 8.1.2 to SIP Endpoint SDK for OS X 8.5.2 by noting differences in the following:

Migrating Configuration Settings

The following section helps you update your SIP Endpoint SDK for OS X 8.1.2 configuration settings for use with SIP Endpoint SDK for OS X 8.5.2.

v8.1.2 v8.5.2
Sip EP Sample.plist (dictionary) SipEndpoint.config (xml)
Root:endpoint:basic:connection
user <Connectivity user ="dn" server="SipServer:5060" protocol="tcp"/>
server <Connectivity user ="dn" server="SipServer:5060" protocol="udp"/>
transport <Connectivity user ="dn" server="SipServer:5060" protocol="tls"/>
registrationTimeout <setting name="reg_timeout" value="1800"/>
regInterval <setting name="reg_interval" value="3"/>
password <setting name="password" value="password"/>
Root:endpoint:basic:connection:mailbox
user <setting name="user" value="mailboxUser"/>
password <setting name="password" value="mailboxPassword"/>
server <setting name="server" value="SipServer:5060"/>
transport <setting name="transport" value="udp"/>
timeout <setting name="timeout" value="800"/>
Root:endpoint:basic:connection:nat
iceEnabled <setting name="ice_enabled" value="0"/>
stunServer <setting name="stun_server" value="StunServer.com"/>
stunServerPort <setting name="stun_server_port" value="3478"/>
turnServer <setting name="turn_server" value="TurnServer.com"/>
turnServerPort <setting name="turn_server_port" value="3478"/>
turnUserName <setting name="turn_user_name" value="turnUser"/>
turnPassword <setting name="turn_password" value="turnPassword"/>
turnRelayType <setting name="turn_relay_type" value="0"/>
Root:endpoint:GSDefaultDevicePolicy
use_headset <setting name="use_headset" value="0"/>
audio_in_device <setting name="audio_in_device" value="MicName"/>
audio_out_device <setting name="audio_out_device" value="SpeakerName"/>
Root:endpoint:GSDefaultEndpointPolicy
public_address <setting name="public_address" value=""/>
ip_version <setting name="ip_versions" value="ipv4"/>
signalingQos <setting name="signaling_qos" value="0"/>
secureSignalingQos
audioQos <setting name="audio_qos" value="0"/>
videoQos <setting name="video_qos" value="0"/>
includeOSVersionInUserAgentHeader <setting name="include_os_version_in_user_agent_header" value="1"/>
rtpPortMax <setting name="rtp_port_max" value="9000"/>
rtpPortMin <setting name="rtp_port_min" value="8000"/>
sipPortMax <setting name="sip_port_max" value="5080"/>
sipPortMin <setting name="sip_port_min" value="5060"/>
rtpInactivityTimeout <setting name="rtp_inactivity_timeout" value="30"/>
Root:endpoint:GSDefaultSessionPolicy
agc_mode <setting name="agc_mode" value="1"/>
dtx_mode <setting name="dtx_mode" value="0"/>
vad_level <setting name="vad_level" value="1"/>
reject_session_when_headset_na <setting name="reject_session_when_headset_na" value="0"/>
sip_code_when_headset_na <setting name="sip_code_when_headset_na" value="480"/>
auto_answer <setting name="auto_answer" value="0"/>
auto_accept_video <setting name="auto_accept_video" value="0"/>
dtmf_method <setting name="dtmf_method" value="InbandRtp"/>
Root:endpoint:GSDefaultSessionPolicy:codecs
vp8
g722/8000
g722/1600 <section name="G722/16000">

<setting name="payload_type" value="9"/> </section>

isac/32000 <section name="iSAC/32000">

<setting name="payload_type" value="104"/> </section>

isac/1600
iLBC/8000/1 <section name="iLBC/8000">

<setting name="payload_type" value="102"/> </section>

speex/32000/1
speex/8000/1
speex/16000/1
i420
PCMU/8000/1 <section name="PCMU/8000">

<setting name="payload_type" value="0"/> </section>

PCMA/8000/1 <section name="PCMA/8000">

<setting name="payload_type" value="8"/> </section>

GSM/8000/1
Root:endpoint:system
Root:endpoint:system:diagnostics
logger_type <setting name="logger_type" value="external"/>
log_file <setting name="log_file" value="SipEndpoint"/>
enable_logging <setting name="enable_logging" value="1"/>
log_level <setting name="log_level" value="4"/>
log_options_provider <setting name="log_options_provider" value="gsip=2, webrtc=(error)"/>
log_options_endpoint <setting name="log_options_endpoint" value="2"/>
Root:endpoint:system:security
ca_list_file <setting name="ca_list_file" value="CertificateAuthorityListFile"/>
cert_file <setting name="cert_file" value="CertificateFile"/>
ciphers
method
password
privkey_file <setting name="priv_key_file" value="PrivateKeyFile"/>
require_client_cert
server_name
srtp_secure_signaling
timeout
tls_enabled <setting name="tls_enabled" value="0"/>
use_srtp <setting name="use_srtp" value="disabled"/>
verify_client
verify_server

Changes to the API

The table below shows parts of the API which were discontinued, changed, or added. For more information on the new SIP Endpoint for OS X API see the HTML formatted API document.

v8.1.2 v8.5.2
<GSAudioDevice> Protocol Functions discontinued:
  • routeMicSignalFrom:
  • routeSpeakerSignalTo:
  • supportCapabilityForInput:
  • supportCapabilityForOutput:

Properties discontinued:

  • micRoute
  • speakerRoute
<GSAudioStream> Protocol Discontinued
<GSConnection> Protocol Added new property:
  • @property (nonatomic, readonly) int configId;
<GSConnectionManager> Protocol Functions discontinued:
  • addConnectionForUser:server:transport:
  • connectionForUser:toServer:withTransport:
  • connectionForUser:toServer:
  • connectionToServer:
  • connectionToServer:withTransport:

Properties discontinued:

  • videoStreamNotificationDelegate
  • videoStreamPolicyDelegate
<GSConnectionPolicyDelegate> Protocol Discontinued
GSDefaultLogger Class Functions discontinued:
  • initWithName:
  • initWithName:logFile:logLevel
  • setupEnabledLogLevels

Properties discontinued:

  • name
  • logFile
  • isDebugLevel
  • isInfoLevel
  • isWarningLevel
  • isErrorLevel
  • isFatalErrorLevel
<GSDevice> Protocol Discontinued
<GSDeviceManager> Protocol Functions discontinued:
  • activeInputDevicesForMedia:
  • activeOutputDevicesForMedia:
  • useInputDevice:forMedia:
  • useOutputDevice:forMedia:
  • systemDevices
  • systemDevicesForMedia:
  • systemDevicesForMedia:forInput:forOutput:

Properties discontinued:

  • headsetInAvailable
  • headsetOutAvailable
<GSDeviceNotificationDelegate> Protocol Notifications discontinued:
  • deviceWasConnected:forMedia:
  • deviceWasDisconnected:forMedia:
<GSDevicePolicyDelegate> Protocol Functions changed to ones without GSMedia:
  • chooseActiveInputDeviceFromList:forMedia:
  • chooseActiveOutputDeviceFromList:forMedia:

Function discontinued:

  • useHeadset
<GSEndpoint> Protocol Function discontinued:
  • configureWithDictionary:

Properties discontinued:

  • endpointId
GSEndpointFactory Class Functions discontinued:
  • sipEndpointWithLogFile:logLevel:
  • sipEndpointWithLogLevel:
<GSEndpointPolicyDelegate> Protocol Individual queries replaced with following function:
  • endpointPolicyByQuery:
<GSLogger> Protocol Functions discontinued:
  • getLogLevel
  • createChildLogger:
  • createChildLogger:logLevel:
  • isDebugEnabled
  • isInfoEnabled
  • isWarningEnabled
  • isErrorEnabled
  • isFatalErrorEnabled
GSMedia Class Discontinued
GSMediaReport Class Discontinued
GSMessageWaitingIndicationMessageSummary Class Discontinued
<GSMessageWaitingIndicationNotificationDelegate> Protocol Name changed:
  • <GSMwiNotificationDelegate> Protocol
<GSMessageWaitingIndicationService> Protocol Name changed:
  • <GSMwiService> Protocol
GSMessageWaitingIndicationState Class Discontinued
GSMessageWaitingIndicationSubscription Class Name changed:
  • <GSMwiSubscription> Class
<GSPolicyDelegate> Protocol Discontinued
<GSSession> Protocol Function discontinued:
  • supportMedia:
<GSSessionControlService> Protocol Name changed:
  • < GSSessionService > Protocol
<GSSessionPolicyDelegate> Protocol Individual queries replaced with function:
  • sessionPolicyByQuery:
<GSVideoCaptureDevice> Protocol Discontinued
GSVideoStreamConfiguration Class Name changed:
  • GSVideoStream Class
<GSVideoStreamNotificationDelegate> Protocol Discontinued
<GSVideoStreamPolicyDelegate> Protocol Discontinued

Changes to Start Procedure

This section describes change you should make to your application before running. Additional details about using the SIP Endpoing SDK can be found in the QuickStart app shipped along with the SDK or in the HTML formatted API document.

Set SIP Connectivity

Before running the endpoint application, you must update the following settings in your configuration file:

<Container name ="Basic">
  <Connectivity user ="dn0" server="SipServer:5060" protocol="udp"/>
</Container>

You must update each setting from the template default to an actual SIP connectivity settings. You must have at least one Connectivity setting with attributes user (DN) , server (FQDN or IP with SIP port), and protocol (udp, tcp or tls).

Application Implementation with External Logger

Your application should implement the following steps to create and run SIP Endpoint SDK with an external logger:

// Initialize application main instance
self = [super init];
 
// Set up full path to xml configuration file
NSString * configFileName = < configuration file name with full path >
 
if (self) {
 
// Read endpoint xml configuration file
NSData *configData = [[NSData alloc] initWithContentsOfFile:configFileName options:NSDataReadingMappedIfSafe error:&error];
 
// Get log file name setting with or without path from configuration 
NSString *lFile = [[[[[GSXmlParser alloc] init] loggingSettingsFromData:configData] objectForKey:@"log_file"];
 
// Create fully qualified log file name with full path  
NSString *logFileFqn = < create full path by using NSFileManager and NSBundle interfaces >
 
 // Open log file for external logger
newStderr = freopen([logFileFqn cStringUsingEncoding:NSASCIIStringEncoding], "w", stderr);
 
// Get log level from configuration 
NSString *lLevel = [[[[[GSXmlParser alloc] init] loggingSettingsFromData:configData] objectForKey:@"log_level"];
 
// Create external logger
id<GSLogger> logger = [[ExternalLogger alloc] initWithName:@"ext" logLevel:lLevel];
 
// Initialize SIP Endpoint with configuration data and external logger
self.ep = [GSEndpointFactory initSipEndpoint:configData logger:logger];
 
 // Configure and activate endpoint
 [self.ep configure];
 [self.ep activate];
}

Obtaining SDK Notifications

Include the following protocols in your application to get notifications from the SDK:

@interface SipEndpointController : NSWindowController <GSEndpointNotificationDelegate,
                                   		GSConnectionNotificationDelegate,
                                   		GSSessionNotificationDelegate,
                                   		GSMwiNotificationDelegate,
                                   		GSStatisticsNotificationDelegate,
                                   		GSDeviceNotificationDelegate>

After including the protocols above, the following notifications will be available:

GSEndpointNotificationDelegate

  • (void) endpointStateDidChangeNotification;

GSConnectionNotificationDelegate

  • (void) connectionStateDidChangeNotification:(id<GSConnection>)connection;

GSSessionNotificationDelegate

  • (void) sessionStateDidChangeNotification:(id<GSSession>) session;

GSMwiNotificationDelegate

  • (void) subscriptionStateDidChangeNotification:(GSMwiSubscription*) subscription;

GSStatisticsNotificationDelegate

  • (void) audioStatisticsReceivedNotification:(GSStatistics*) statistics forSession:(id<GSSession>) session;

GSDeviceNotificationDelegate

  • (void) deviceDidChangeNotification:(GSDeviceAction) action deviceType:(GSDeviceType) type;
  • (void) activeAudioInputDeviceDidChangeNotification:(id<GSAudioDevice>) device;
  • (void) activeAudioOutputDeviceDidChangeNotification:(id<GSAudioDevice>) device;
  • (void) activeCaptureDeviceDidChangeNotification:(id<GSCaptureDevice>) device

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on August 31, 2017, at 05:51.