SIP Endpoint SDK .NET QuickStart Application
The easiest way to start using the SIP Endpoint SDK is with the bundled QuickStart application. This application ships in the SDK folder and is supplied as both an executable and as source code in the form of a Visual Studio project. You will need to enter environmental information in an XML configuration file before you can execute the application. After doing that, you can build and run the QuickStart application right away.
Configuring the QuickStart Application
Find either the <SIP Endpoint SDK Folder>\QuickStart\QuickStart2013\Src folder or the <SIP Endpoint SDK Folder>\QuickStartExe folder and open the SipEndpoint.config file. The first few lines of the file look like this:
<?xml version="1.0" encoding="utf-8" ?> <SipEndpoint xmlns="http://schemas.genesyslab.com/2009/sipendpoint"> <Container name ="Basic"> <Connectivity user ="dn0" server="SipServer0.domain.invalid:5060" protocol="udp"/> <Connectivity user ="dn1" server="SipServer1.domain.invalid:5060" protocol="udp"/> </Container> <Container name ="Genesys"> ...
The first Container element is called "Basic," as you can see, and contains elements that you must supply values for. Otherwise, the QuickStart application will not work. Here are the things you need to do:
- Supply a valid DN for the user attribute.
- Replace SERVER in the server attribute with the name of the host where SIP Server is deployed.
- Replace PORT in the server attribute with the SIP port of the SIP Server host. (The default value is 5060.)
The Configuration page includes information on how to configure various settings, including RTP port ranges, QoS bits, diagnostics and endpoint DNs. These additional configuration options are not required to run the SIP Endpoint QuickStart application, but allow you to customize useful features for the created endpoints.
Running the QuickStart Application
To run the QuickStart application, you can either run the executable version by carrying out these steps:
- Open the <SIP Endpoint SDK Folder>\QuickStartExe folder.
- Double-click QuickStartVS2013.exe.
Or you can build and run the Visual Studio project:
- Open the <SIP Endpoint SDK Folder>\QuickStart\QuickStart folder.
- Double-click QuickStart2013.sln.
- Build the project.
- Run the project.
The SIP Endpoint Interface
The QuickStart application demonstrates how to use the IEndpoint interface, which you should use in your own applications. As shown in the following code snippet from the QuickStart application, you use the CreateSipEndpoint method of the EndpointFactory class to create the endpoint:
[C#] IEndpoint endpoint; endpoint = EndpointFactory.CreateSipEndpoint();
Note: Because the CreateSipEndpoint method creates a singleton, creation of more than one endpoint instance is not supported by Genesys. Other than that, most of the QuickStart application involves reading configuration values and updating the status of the endpoint. The real work is done by the T-Lib code that will reside elsewhere in your application.