Jump to: navigation, search

Configuring SIP Endpoint SDK for .NET

Basic Configuration Settings

You may want to set certain basic SIP Endpoint configuration options in your application. The following sections contain information that may be helpful in doing that.

Most configuration settings described on this page can be found and changed in the SipEndpoint.config file that is included with your SIP Endpoint SDK installation. For more information about this file, see Default Config Settings.

Timeout Issue

Note that the reg_timeout setting is valid only if it contains a numeric value. If the supplied value is a non-numeric value or is empty or null, it will be interpreted as 0 and the endpoint will operate in standalone mode.

IPv6

As of release 8.1.2, SIP Endpoint SDK for .NET supports TCP/IP version 6 (IPv6) on Windows Vista and higher.

The local address must be set to IPv6:

  • By means of an explicit address specification (as a hostname resolving to IPv6 only, or by the use of a literal IP address)
  • By setting the ip-versions option to favor IPv6
  • Or by only having an IPv6 interface available on the host

The SIP proxy address must be either a hostname that primarily resolves to IPv6 or a literal IPv6 address. Note that the preferences in the ip-versions option do not currently affect external address resolution.

Note: IPv6 must be configured on both ends of a session — mixed IPv4 and IPv6 environments are not supported.

This feature is resolved at Endpoint creation time by applying the following configuration to the SIP Provider.

Settings:

<setting name="public_address" value="Address"/>
<setting name="ip_versions" value="ipv4,ipv6"/>

QoS Bits

Starting with Windows Vista, Quality of Service (QoS) settings are supported on the level of the Windows operating system. This support allows you to configure policies to mark all of the packets sent by a particular application with the desired level of service.

Microsoft has documented this support at http://technet.microsoft.com/library/dd919203.aspx and at http://technet.microsoft.com/en-us/magazine/2007.02.cableguy.aspx.

Diagnostics

In order to diagnose production issues, it is important to have access to diagnostic information that relates to your SIP endpoint and its environment. Because of this, the SIP Endpoint SDK provides logging with 5 possible logging levels.

Valid values for the SIP Endpoint SDK logging levels are:

Fatal = 0
Error = 1
Warning = 2
Info = 3
Debug = 4
<domain name="system">
   
</domain>

Headset Connectivity Notification

The SIP Endpoint SDK only supports headset monitoring when the device is explicitly defined in the SipEndpoint.config file, as shown below:

<domain name="policy">
...
    
</domain>

In this case, headset connectivity is fully supported and the application can receive events indicating that the device has been plugged or unplugged.

It is also possible to use your application to select audio devices automatically, by using the SIP Endpoint SDK API to look for IN and OUT devices. Using the GetAllSystemAudioInDevices() and GetAllSystemAudioutDevices() methods allows you to check for attached devices, which can then be used to update the following settings before initializing the SIP Endpoint SDK.

<domain name="policy">
...
    
</domain>

However, the plugged or unplugged states are not monitored for the selected device in this case. If no devices are defined in the SipEndpoint.config file, then the SIP Endpoint SDK uses a default procedure to determine what device is attached, and will not monitor for plugged or unplugged states.

SIP Messaging and Media Encryption

SIP Endpoint SDK has settings that allow you to encrypt SIP messaging and the media channel. The SIP messaging can be encrypted using TLS, while the media channel can be encrypted using SRTP. The following diagram shows the SIP Endpoint SDK architecture with these features enabled.

SIP Endpoint SDK TLS-SRTP Architecture-Genesys Libraries.png

Figure 1: SIP Endpoint SDK Architecture with TLS and SRTP Enabled

To enable TLS support, set the protocol to tls, as shown here. The outgoing SIP messaging will be encrypted:

<Container name ="Basic">
  <Connectivity user ="DN" server="SipServerHost:Port" protocol="tls"/>
</Container>

<domain name="system">
. . .
    
</domain>

Use the use_srtp setting to control media channel encoding. Valid values are shown in the above code sample.

Digest Authentication Support

SIP Endpoint SDK supports the RFC2617-style digest authentication that is currently used by SIP Server. This authentication is triggered by using the following DN configuration options: password and authenticate-requests. If these options are configured for a specific DN, then SIP Server enforces the authentication mechanism for that DN. During registration, the SIP Endpoint receives a 401 Unauthorized SIP challenge message request from SIP Server. The SIP Endpoint should then provide the encrypted password, along with the Digest username, in the next REGISTER message.

At this point, SIP Server compares the received password to the password associated with the DN object defined in Config Server. If the passwords match, then the SIP Endpoint can be registered and may proceed to access the call functionality provided by SIP Server. SIP Endpoint SDK provides the following method to set the password for a particular connection ID. This method has been added to the IExtendedService interface in the Genesyslab.Sip.Endpoint.Provider.Genesys namespace:

void SetPassword(int connectionId, String^ password);

Producing RTCP Extended Reports

You can use SIP Endpoint SDK to produce RTCP Extended Reports (RFC 3611) and publish them according to RFC 6035 at the end of each call, using a collector address of your choice.

Important
The publish message is sent to the specified collector address only if the vq_report_collector parameter is configured with the user@server:port;transport=udp format. For example, collector@127.0.0.1:5160;transport=udp.

Settings:

<domain name="policy">
<section name="endpoint">
...
<!--
Valid values for Voice Quality (VQ) report publish setting (vq_report_publish):
0--VQ report is not published
1--VQ report is published to the collector at the end of the call-- 
  see the vq_report_collector setting information below
-->
<setting name="vq_report_publish" value="0"/>
<!--
Valid values for Voice Quality (VQ) report collector setting (vq_report_collector):
NULL or Empty--The VQ report is published to the proxy described in the
Connectivity section
FQDN or IP address along with port and transport--
 collector@SipServer.genesyslab.com:5060;transport=udp
-->
<setting name="vq_report_collector" value="collector@SipServer.genesyslab.com:5060;transport=udp"/>
</section>

Endpoint:

The vq_report_publish and vq_report_collector settings can be read from the Endpoint Policy by using the following methods:

GetEndpointPolicy(EndpointPolicyQuery.VqReportCollector);
GetEndpointPolicy(EndpointPolicyQuery.VqReportPublish);

Audio Layer Selection

SIP Endpoint SDK for .NET release 8.1.2 and higher allows you to select an audio layer for WebRTC using the Windows environment variable GCTI_AUDIO_LAYER. If this variable is set to 1, SIP Endpoint SDK will use the Windows Wave audio layer. Otherwise, it will use the Windows Core audio layer. You can set this variable at Computer -> Properties -> Advanced System Settings -> Environment Variables.

refer-enabled Setting

Any Configuration DN objects in the Genesys Configuration Layer that correspond to an endpoint based on the SIP Endpoint SDK should have the refer-enabled option set to false.

SIP::INFO Message Exchange

SIP Endpoint SDK can create and transmit In-Dialog SIP:INFO messages using updated Content-Type and Content headers. It can also receive messages with customer-provided information in the Content-Type and Content headers.

The following method has been added to the ICallControl interface in order to create and transmit an In-Dialog SIP:INFO message::

void SendSipInfo(int sessionId, String^ contentType, String^ content);

The following event has been added to Session Manager:

public event EventHandler<SessionEventArgs> SipInfoReceived;

The SessionEvent properties now also have these key value pairs:

Properties["ContentType"].ToString();
Properties["Content"].ToString();

Working with Codec Priorities

Codecs are listed by name in the codecs section of the configuration file.

Each codec entry includes a value attribute that contains an integer ranging from 1 through 127. This integer value indicates the relative priority of the codec, with higher numbers receiving a higher priority. The list can contain a maximum of 127 codecs, each of which should have a unique value.

Example

   <section name="codecs">
          <setting name="opus/48000/2" value="1"/>
          <setting name="G722/16000" value="2"/>
          <setting name="iLBC/8000" value="3"/>
          <setting name="iSAC/32000" value="4"/>
          <setting name="iSAC/16000" value="5"/>
          <setting name="PCMA/8000" value="6"/>
          <setting name="PCMU/8000" value="7"/>
          <setting name="vp8" value="8"/>
          <setting name="ulpfec/90000" value="9"/>
   </section>

In the above example, PCMU/8000, which has a value of 7, receives the highest priority among the audio codecs, while VP8, which is the only video codec supported by SIP Endpoint SDK at this time, receives the highest video codec priority by default.

Tip
For information on which codecs are supported by SIP Endpoint SDK for .NET, see the list of Supported Codecs in the SIP Endpoint SDK Overview.

Configuring Capture Devices

In order to define the list of preferred capture devices and their priorities, the devices should be added to the device policy section in the SipEndpoint.config file:

      <domain name="policy">
        <section name="device">
        <!--
          The priority of a device depends on its position in this section.
          The higher the position, the higher device priority.
          To disable a device it should be commented out or removed from the file.
        -->
. . .
          <!-- Capture -->
          <setting name="capture_device" value="CaptureDeviceName-HighPriority"/>
          <setting name="capture_device" value="CaptureDeviceName-LowPriority"/>
        </section>
      </domain>

API

The IVideoControl Interface has been extended with a method that allows you to set up a capture device based on:

  • Its configuration settings in the policy:device section
  • Its priority in that section, as described above

This method can be called at any time while SIP Endpoint SDK is active in order to carry out this task, as shown here:

	GsStatus SetCaptureDeviceFromConfig();

Application / SDK Interaction

The workflow between your app and the SIP Endpoint SDK is described in the following table:

App SDK
Call: ReleaseCaptureDevice() Releases currently used capture device
Call: SetCaptureDeviceFromConfig() Finds matching capture device from the configuration file with the device from the array of all capture devices; if found, it sets this capture device as active
Call: String^ GetCurrentCaptureDeviceName() Returns currently allocated capture device name
Compare with prioritized capture device name
This page was last edited on July 1, 2016, at 23:54.
Comments or questions about this documentation? Contact us for support!