Click here to Skip to main content
Click here to Skip to main content

Examples to create your Conferencing System in .NET, C# VOIP & Video Conferencing Systems using H.323 and TAPI 3

By , 31 Jan 2007
 

Introduction

I noticed that there are many members who want to know how to create an Audio/Video Conferencing System using .NET. We know that there isn't any managed class that supports audio or video streaming in .NET, so I decided to write some applications that can help in writing your conferencing application. From time to time, you will find new examples and tutorials on VoIP, Video Conferencing and Network Programming on my site and also in our Forums that specialize in Network Programming and VoIP.

Introduction to H.323

H.323 is an umbrella recommendation from the ITU-T, that defines the protocols to provide audio-visual communication sessions on any packet network. It is currently implemented by various Internet real-time applications such as NetMeeting and Ekiga (the latter uses the OpenH323 implementation). It is a part of the H.32x series of protocols which also addresses communications over ISDN, PSTN or SS7. H.323 is commonly used in VoIP, Internet Telephony, or IP Telephony and IP-based videoconferencing. For more information about H.323, see Internet Telephony with H.323 on MSDN.

Introduction to TAPI 3 Telephony

TAPI version 3 is a COM-based API that merges classic and IP telephony. Possible applications range from simple voice calls over the Public Switched Telephone Network (PSTN) to multicast multimedia IP conferencing with quality of service (QOS).

There are four major components to TAPI 3:

  1. COM API
  2. TAPI Server
  3. Telephony Service Providers (TSPs)
  4. Media Stream Providers (MSPs)

The API is implemented as a suite of Component Object Model (COM) objects. Moving TAPI to the object-oriented COM model allows developers to write TAPI-enabled applications in many languages, such as .NET, Java, or C++. Use of COM enables component upgrades of TAPI features.

The COM-based telephony API, TAPI 3.x, is available starting with Microsoft Windows X. TAPI 3.x provides greatly enhanced development tools for the modern world of communication programming, where a "call" may be a video stream on an IP-based network, and there is no phone set involved in the session.

Sample image

Generally speaking, application writers will find that TAPI 3.x provides better support to implement flexible communications controls. For more information, see Telephony Integration and Conferencing on MSDN.

Introduction to RTP

RTP - Real Time Transport Protocol is an Internet protocol for transmitting real-time data such as audio and video. RTP itself does not guarantee real-time delivery of data, but it does provide mechanisms for sending and receiving applications to support streaming data. Typically, RTP runs on top of the UDP protocol, although the specification is general enough to support other transport protocols that know how Windows supports Real Time Communication. See this RTCP API article.

RTP Header

RTP Header

Where:

  • V indicates the version of RTP used
  • P indicates the padding, a byte not used in the bottom packet to reach the parity packet dimension
  • X is the presence of the header extension
  • CC field is the number of CSRC identifiers following the fixed header. CSRC field are used, for example, in conference case
  • M is a marker bit
  • PT is the payload type

My Projects

Example 1: Voice Conferencing Using OPEN H.323 Library

In this example, I used the Openh323 ocx to create H.323 Voice Chat - it's very easy to use.

H323

Example 2: Voice Conferencing Using TAPI3.DLL

In this example, I used TAPI3 to create audio conferencing, For more information, see Rendezvous Code Examples on MSDN.

TAPI 3 Voice Conference

Example 3 and 4: Peer-to-Peer Video Voice Chat

In this example, I used the Wave Library to capture and send voice through the network and I used the Stream classes to transfer captured video images from a camera.

Peer-Peer Conerence System

In this other example, I used the avicap32.dll API to capture the camera image. You can also use this example to capture from any other capturing device such as a TV Tuner and then you can send it through the network.

Sample image

Conclusion

In this article, I have just posted some examples that will help you to start creating your conferencing system. I will explain the technical code description in other articles.

See this website for more articles and examples. Feel free to post your comments or questions.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Fadi Abdelqader
Systems Engineer SocketCoder.Com
Jordan Jordan
Member
Fadi Abdelqader
WebSite: www.SocketCoder.com
Facebook Group: http://www.facebook.com/groups/socketcoder/
Facebook Page: http://www.facebook.com/socketcoders/
 
Last Published Book:
-Professional Network, Distributed Systems & TCP/IP Programming In .NET Framework 1.1 & 2.0 (2006 Release)
 
Last Published eBook:
- The SocketCoder e-Reference For Network, Distributed Systems And TCP/IP Programming In .NET, Arabic (SocketCoder.Com 2010)
 
Last Projects:
- Silverlight Based Projects For Web Video Conferencing (WCS,WMS,WCS Plus..) www.Socketlab.com
-(SocketCoder) RTP Multicasting VOIP Library
-(SocketCoder) Remote Controlling Systems
 
Last SocketCoder RSS: http://www.socketcoder.com/ArticlesRSS.aspx

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 3membertambadesachin21 May '13 - 1:16 
0
QuestionWhat is the easiest way to test the H323 VOIP sample povidedmemberMember 977473320 Feb '13 - 17:19 
I have downloaded the Video_Voice_Conferencing project, which includes the H323 VOIP sample. I am able to install the openh323.ocx then build the H323 VOIP sample. I would like to know how to test it. I have one desktop and one laptop at home, both of them are equipped with MIC and speaker, which are connected by a single router.
 
Question1: Can I simulate two clients talking to each other in the same computer, or the two clients have to sit on different computers? In other word, can I use just one computer to test the application and simulate the call process?
Question2: How to start the test? I just want to see how my voice is passed from one computer (computer1) to another computer(computer2), or how a phone call is made.
 
When I run H323_Voice.exe at computer1, the default IP address in the textbox is 127.0.0.1. Shall I change it to the IP address of computer2 then click "Call using H323"? At computer2, shall I run the same application and set the IP address to the IP address of computer1?
 
Thank you!
QuestionIVR Voice NavigationmemberNiko6825 Sep '12 - 2:23 
I am testing an IVR example program related to Graphical User Interface for the voice recognition. I use the Ozeki VoIP SIP SDK library and one of their webpage (http://www.voip-sip-sdk.com/p_412-voip-ivr-voice-navigation-voip.html) to my work.
 
The SIP registration information of this sample application is stored in the application configuration (app.config) file. I could see how I can add the SIP data in the configuration file. I had to add my own SIP registration data in this to have the program work properly.
 
1.  <?xml version="1.0" encoding="utf-8" ?>
2.  <configuration>
3.    <appSettings>
4.      <add key="IsRegRequired" value="true"/>
5.      <add key="displayname" value="oz879"/>
6.      <add key="username" value="oz879"/>
7.      <add key="registername" value="oz879"/>
8.      <add key="regpass" value="oz879"/>
9.      <add key="domainhost" value="192.168.112.100"/>
10.     <add key="port" value="5060"/>
11.     <add key="nat" value="0"/>
12.   </appSettings>
13. </configuration>
 
Bye,
Niko

QuestionSending text,image,voice from c# apps to JavamemberAINJALIL8830 Aug '12 - 3:05 
Is there someone can tell me how to make video conference and send data(picture and text) from c# application to internet and from internet to android phone.I need to make this application but i dont know where should i start.I don't have lots of knowledge about programming but have passion to learn. And is there any document i can refer,i hope someone can show me.
Thank you in advance.
GeneralExcellentmemberalbhadly25 Aug '12 - 2:24 
hi I want to say that is very perfect
Thumbs Up | :thumbsup:
QuestionOlder DLL's and the VS 2010 on 64bit...memberyetanotheruser928 Jun '12 - 0:00 
I saw a vote of 5 from April here, so I suppose, somewhere it works.
 
In my Visual Studio 2010 on Windows 7 64bit (I didn't chose it and never claimed it worked - though I don't find a way to get around it) any attempt of getting it to work (all the tricks from stackoverflow, here, any blog on the net and eventually, MSDN...) fails.
I also cannot register the dll's and the ocx with regvsr32 manually. WTF | :WTF:
 
Does someone have found the solution I just couldn't find, or is the problem rather that it is not possible for reasons of Windows 7's or VS's extremely outstanding downward compatibility^^?
Windows XP is an option if unavoidable.
AnswerRe: Older DLL's and the VS 2010 on 64bit...memberBanjoo15 Jul '12 - 0:48 
I have no idea, but maybe you just need some COM Dlls, that are not delivered with your windows installation. Try "Depends" tool with the Dlls you want to register to check this. Run regsvr32 in the DOS Command Dialog with admin rights. Good luck.
GeneralMy vote of 5membermanjukgowda11 Apr '12 - 2:20 
working superbly
Bugabout video conferencingmemberrakeshnagarshyam23 Mar '12 - 8:35 
how i run this video conferencing s/w in my final project
help me at my gmail accont
rajardand@gmail.com
Questionh323 323 Voice examplememberflor_jim11 Mar '12 - 13:57 
Fadi,
 
I was using MSVC2005 before and it was working ok wit the H323 C# code but after I migrated to 2010 It does not work anymore . The error is Cannot load the ATLH323 dll library 1007001e error code. Do you any solution to this problem?
I appreciate your answer,
Thank you very much.
Flor

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 31 Jan 2007
Article Copyright 2007 by Fadi Abdelqader
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid