How to develop a VoIP softphone in C# by using OZEKI VoIP SIP SDK This presentation demonstrates the first steps concerning to how to develop a fully-functional.

Slides:



Advertisements
Similar presentations
Web Hosting. The purpose of this Startup Guide is to familiarize you with Own Web Now's Web Hosting. Own Web Now offers two web hosting platforms, one.
Advertisements

Facts about Welcome to this video from Ozeki. In this video I will present what makes Ozeki Phone System XE the Worlds best on-site software PBX for Windows.
PC Encryption installation progress/password screen Includes comments from: Encryption team Sarah Deane Tony Stieber Selected people who took part in the.
1 TAC2000/ LABORATORY 117 Windows-based SIP UA  Microsoft Windows Messenger  X-Lite  NBEN UA.
IPX-600 IP PBX with Gateway Configuration Internet Telephony PBX System Copyright © PLANET Technology Corporation. All rights reserved.
KX-NS1000 Initial Set Up For step by step : 16 May,
1 Routing and Remote Access Service (Week 15, Friday 4/21/2006) © Abdou Illia, Spring 2006.
Ozeki Informatics Ltd. | | info.ozekiphone.com | Ozeki Informatics Ltd. | | +36.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
PowerCenter 8.6 SE Installation and Operational Guidelines.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Responding to an Everbridge Notification
H.323/ SIP Internet Telephony Gateway
POP Configuration Microsoft Outlook What is POP? Short for Post Office Protocol, a protocol used to retrieve from a mail server. Most.
Ch 8-3 Working with domains and Active Directory.
NORTEL NETWORKS CONFIDENTIAL CallPilot 150 Modem Access Jan 03, 2005 Version 1.5.
ECE355 Project SIP Applications Tiuley Alguindigue
Hosted Exchange The purpose of this Startup Guide is to familiarize you with ExchangeDefender's Exchange and SharePoint Hosting. ExchangeDefender.
© 2007 NeoAccel, Inc. NeoAccel SGX Installation Guide Dear Customer: We are pleased to provide you with our training presentation for our SSL VPN-Plus.
MagicInfo Pro Server Software All control, content, and scheduling is performed within the MagicInfo Pro Server software previously installed. Before.
Backup Local Online For secure offsite storage of your , and making it available from any computer or smart phone. Backup accessed with.
STAY CONNECTED TOLLFREEEXPRESS CONTROL PANEL GUIDE.
Microsoft Office Communicator A General Introduction.
Copyright 2000 eMation SECURITY - Controlling Data Access with
1 © 2006 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Cisco Confidential Configuring Attendant Console.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
IPX-300 Series PBX with VIP-191 Install Procedure Copyright © PLANET Technology Corporation. All rights reserved. Internet Telephony.
Objectives Configure routing in Windows Server 2008 Configure Routing and Remote Access Services in Windows Server 2008 Network Address Translation 1.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Panasonic Communications Co., Ltd. Communication Network Company
1. Insert the Resource CD into your CD-ROM drive, click Start and choose Run. In the field that appears, enter F:\XXX\Setup.exe (if “F” is the letter of.
1 Installation When this module is complete, you will be able to:  Set a static IP address for your laptop  Install the snom ONE software  Navigate.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
BIT 285: ( Web) Application Programming Lecture 15: Tuesday, February 24, 2015 Microsoft Azure Instructor: Craig Duckett.
How To Configure Thunderbird For Your Webspace Account.
User / Admin / Installer Profiles
Interactive Connectivity Establishment : ICE
Go to Start >> Programs >> Outlook Express ( as shown)
Panasonic UC Pro - UC Pro Server setup with Active Directory -
Panasonic UC Pro - UC Pro Web Service Basic setup -
REC [ ] How to implement CAMERA RECORDING for USB WEBCAM or IP CAMERA in C#.NET SOURCE CODE: ! Welcome to this presentation that explains.
Broadcast your amazing pumpkin to your website Even ghosts, goblins, monsters and pumpkins need to call somebody in 3D 1/9.
INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets.
How to start software development for your webcam & IP camera in C# Welcome to this video that will explain you briefly how to get started on ONVIF webcam.
Remote Access Using a Netgear DG834 Router 1http://
How to make an Interactive Voice Response (IVR) using an OzML script This slideshow is intended to be a great explanation on how to develop an Interactive.
CACI Proprietary Information | Date 1 PD² v4.2 Increment 2 SR13 and FPDS Engine v3.5 Database Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead.
HOW TO GUIDE: INEXPENSIVE INTERNET PROTOCOL TELEPHONY SOLUTION Created by: Cameron Adkisson Eastern Kentucky University
How to create your Own Alarm System This is the next lesson of Ozeki Video Guide. Now you can learn how you can build your own alert system with Ozeki.
1.Switch on the computer and wait for loading. 2.Select the Windows 7 OS at the end of the list. 3.Click on the link ‘Administrator’ 4.Enter the administrator.
| 1 EBSCOadmin EBSCO Support EDS Wiki Renata Wlodarczyk | EBSCO.
Downloading and Installing GRASP-AF Workshop Ian Robson Information Analyst, North of England Cardiovascular Network.
How to develop a VoIP softphone in C# that enables SIP Instant Messaging (IM) This presentation describes how to create a softphone in C# that allows you.
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
How to develop a VoIP softphone in C# by using OZEKI VoIP SIP SDK This presentation describes what you should do – having done the SIP registration – to.
1] MTNL ID user with/without static IP
The new dialup procedure requires the use of the EVPN client software to establish an active connection to the Lockheed Martin network. After January 31st,
Configuring ALSMS Remote Navigation
Configuring Attendant Console
Data Virtualization Tutorial… CORS and CIS
Repair Outlook Error 0x800ccc78
To Join the Teleconference
Exchange Configuration on Outlook Express
Easy Tutorial Quick Installation Guide Create your 1st Playlist.
Getting Started: Amazon AWS Account Creation
Configuration Of A Pull Network.
Ch 1 .Installing and configuring SQL Server 2005
How to install and manage exchange server 2010 OP Saklani.
Presentation transcript:

How to develop a VoIP softphone in C# by using OZEKI VoIP SIP SDK This presentation demonstrates the first steps concerning to how to develop a fully-functional softphone in C# in the most simplest way - by using the previously written components of Ozeki VoIP SIP SDK. Part 1  Part 1: SIP registration Part 2: Making and receiving calls Part 3: Controlling the calls 1/15

What you need Windows PC.NET compatible development kit (e.g. MS Visual Studio) installed on your PC.NET Framework installed on your PC Ozeki VoIP SIP SDK installed on your PC In order to build a VoIP softphone application in C# you will need the followings: 2/15 Download free example source code for this project from !

Create a new Microsoft Visual Studio project and add VoIP components to your references 1.Open Visual Studio and create a new project by clicking on File then New project 2.As this softphone will be a simple console application, in the next window you need to select the Visual C# Console Application option 3.After you have specified a name for your new project, click on the OK button 4.To achieve and use the VoIP components of the SDK, add them to your references For this, you need to right-click on References than select the Add references option. After this, browse the SDK.dll file that can be found where the SDK has been installed to. Select the.dll and click on the OK button Having done these steps, you can find a new line at the end of the References folder: ‘VoIPSDK’. This line indicates that now you can use the tools provided by the SDK. 3/15

For separating the softphone from the user interface, two classes are used: 1.Softphone.cs: The implementation of the softphone goes here (including its events, methods, functions, variables) This class is used to introduce how to declare, define and initialize a softphone, how to handle some of the Ozeki VoIP SIP SDK's events and how to use some features. So the aim is creating a ‘telephone software’, which has the same functionalities (or much more), as an ordinary phone’s. 2.Program.cs : The class with the Main() method (this class controls the console window, interacts with the user by using a softphone object) You will use the Program.cs class to create a new softphone, so you can use the functions and listen to the events placed here. Write the code Classes 4/15

In the ‘using section’ you need to add some extra lines, as well as: Without these lines you would have to use the namespace information as a label for all tools of the SDK. Write the code Source code analysis using Ozeki.Network.Nat; using Ozeki.VoIP; using Ozeki.VoIP.SDK; 5/15

In a constructor, you also need to initialize this softphone with default parameters: You need to set the port range, indicated by the first two parameters as the minimum port's and the maximum port's number. This is the port's interval. The third parameter is the listening port. If you have any firewall rule that restricts the usable ports, you can set the usable port range here, which will be used during the calls. These are sample ports only in the example, but a softphone with these parameters can be used in the most of the cases. (If you are handling conference calls or handling a lot of lines simultaneously, you will need a wide port range.) Write the code Softphone.cs ISoftPhone softphone; // softphone object IPhoneLine phoneLine; // phoneline object softphone = SoftPhoneFactory.CreateSoftPhone(5000, 10000, 5060); Create a softphone and a phone line object from the ISoftPhone and the IPhoneLine interfaces: 6/15

In order to create the SIP account, set the followings: RegistrationRequired: Is the registration required or not? This field needs to be set to ‘true’, if you would like to receive incoming calls DisplayName: A name to be displayed at the called client. UserName: If an other client dials this name (number), the SIP account will be getting called AuthenticationId: An identifier to the PBX, like a login name RegisterPassword: The password that registers to the PBX. It works in pair with the authentication ID DomainHost: For example a domain name, an IP address DomainPort: Port number The last two values define the PBX address where the softphone will be registered. You will get the values of these parameters from the user, in the Program.cs file. Write the code Registration to the PBX var account = SIPAccount(registrationRequired, displayName, userName, authenticationId, registerPassword, domainHost, domainPort); 7/15

If you want to communicate through firewall, you need to set the right NAT Traversal method: In this example, it has been set to ‘None’. This is enough for communication on local network. An other option for the NAT Traversal method is setting it to ‘STUN’. This way, you can define the Stun server with a NatRemoteServer object by giving the server IP, the username and password to use as parameters: You can set automated detection on that IP address you would like to use. If you set the configuration to ‘None’, but you also set a NatRemoteServer object with the public IP, you will use the local address on the local network and the public on others: Write the code NAT (Network Address Translation) Traversal var natConfiguration = NatConfiguration(NatTraversalMethod.None); natConfiguration.StunServer = new NatRemoteServer(serverIP, username, password); natConfiguration.AutoDetect = true; 8/15

In order to communicate (and to register to the PBX) you need to create a phone line by using the previously created SIP account and the NAT Traversal setup: When the application is running, the state of the phone line can change. To follow these changes, you need to listen to this change event: When the phone line has been created, you have to call the RegisterPhoneLine() method to register the phone line to the softphone. If the registration is set to required, this method will also send the SIP REGISTER command. You only need to use the following line: Write the code PhoneLine phoneLine = softphone.CreatePhoneLine(account, natConfiguration) phoneLine.PhoneLineStateChanged += phoneLine_PhoneLineStateChanged; softphone.RegisterPhoneLine(phoneLine); 9/15

10/15 The phone line event can be in several states, for example: RegistrationFailed: occurs, when registration is needed, but it failed. The phone is unable to communicate through the PBX NoRegNeeded: there is no communication with the server, until the first (made) call. If you have set any invalid information during the SIP account creation, you can not even make calls. Since your softphone is not registered to the server, you can not receive any calls, even with valid SIP account RegistrationSucceeded: occurs, when registration is needed, and succeeded. The phone is able to receive and make calls RegistrationTimedOut: some PBXs define for how long a client can be registered to it. If that time is up, the state of the phone line changes to this Write the code Events

This class will introduce the usage of a softphone object, it handles the console events, interacts with the user and uses the opportunities provided by the Softphone class. In this example, the softphone can only register to a PBX by the values given by the user. First of all, you need to create a softphone object. You can handle everything with separated methods. These methods are communicating with each other, and making the source code more understandable and reusable. Write the code Program.cs static Softphone mySoftphone; 11/15

In order to initialize your softphone, you need to call an initializer method with the following lines: Call this method in the Main() method. Now, there is a new softphone available to use, and it is already following the states of the phone. You will see how to handle the states below, after you have done with the greeting and the registration process. Write the code Initialization mySoftphone = new Softphone(); mySoftphone.PhoneLineStateChanged += mySoftphone_PhoneLineStateChanged; Showing a greeting message In a few lines you can introduce the application to the user. It is preferred to say a few sentences about the features available. After your softphone has been initialized, call this method to introduce the application in the Main() method. 12/15

As you could see at the Softphone class, you need a configured SIP account in order to use the softphone for communication. The user needs to enter valid values to create a SIP account and to register to a PBX. This procedure can be done using such simple commands as: Write the code Creating the SIP account by the user's input and registering to a PBX Console.WriteLine(); Console.ReadLine(); 13/15

You are subscribed to get notified if the state of the phone line has been changed. At the mySoftphone_PhoneLineStateChanged method you can set what happens in case of each state. If the registration is failed, the SIP account details should be provided again. States for this case: or The "RegistrationFailed" state occurs, when the registration is simply unsuccessful, for example, if the user set up invalid SIP account during the registration. The "RegistrationTimedOut" state occurs, if the registration request takes too long. If the registration has succeeded or there is no need for registration, you can notify the user about that. Note, if there is no need for registration, but you could not reach the PBX (or you could, but with invalid SIP account), you will not notice that until you make your first call. The states to use: Write the code Handling of the phone line states PhoneLineState.RegistrationTimedOut PhoneLineState.RegistrationFailed PhoneLineState.RegistrationSucceeded PhoneLineState.NoRegNeeded 14/15

Check the 2. part of the ‘How to develop a VoIP softphone in C# by using OZEKI VoIP SIP SDK’ tutorial series and get to know how to make and receive calls using your softphone! After studying this tutorial, you need be familiar with adding VoIP components to your references and creating a Softphone class that provides a softphone object to the user usign the input setups. Now you have a console window which interacts with the user and handles your softphone with the provided opportunities. Part 1 Thank you for your attention! For more information please visit or send an to 15/15