Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2013, 06:49 AM
Niko68
Guest
 
Posts: n/a
Default Softphone development in 10 steps

Nowadays communication becomes quicker so we need new, modern devices to contact with each other. New technologies are closer than you think. Using the Internet has become a part of everyday life. High-speed Internet connections let us send and receive human voice as quickly, clearly and simply as our traditional telephone. This amazing technology is called VoIP (Voice over Internet Protocol). This is a really useful technology that allows users to call each other via their computers with the help of a microphone and a set of speakers. If you wish to initiate VoIP phone calls via Internet you will need a softphone deployed on your computer as well.

If you wish to create a softphone application then first of all you will need to be familiar with the basic C# programming knowledge because it is necessary to develop your softphone in Visual Studio.

The only thing you have to do to follow the next steps:
1. Creating a Windows Forms application in Visual Studio
2. Use the methods of SDK
3. The appearance of the Softphone
4. Initializing the main parts
5. How to register your softphone to the PBX
6. Define the SDK events
7. Reaction when a button is pressed
8. Sending DTMF signals during a call
9. How to properly with signing up and down
10. Check the created application

For a simple softphone application that is all you need. You can make more customized GUI if you are ready to get acquainted with the exact development process which requires more programming skills and naturally source codes.
If you need some useful codes which are necessary to realize your project then you can look for them on the next page:
http://voip-sip-sdk.com/p_272-voip-s...ment-voip.html

Good luck!
Received Infraction
 
Old January 31st, 2013, 07:41 AM
Registered User
 
Join Date: Sep 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Niko,

Thanks for your post! I am working on a project to develop a softphone and I need to play back media in my softphone. I am using a sample program provided by Ozeki VoIP SIP SDK as well (voip-sip-sdk.com/p_406-voip-media-handling-voip). I agree this site is really helpful! :)

So here is my project:
Playing an uncompressed .wav audio file, I needed to find and open one. Ozeki VoIP SIP SDK provided me a useful tool WaveStreamPlayback that is for audio playing in case of .wav files.

The WaveStreamPlayback is a MediaHandler that can be initialized by setting the audio file to be played. I could do this by adding the filename (if it is in the same directory as the program) or the file path. I could also specify the repetition, the packetization time and if it is necessary I could set that a cache stream needs to be used.

In the sample program the audio file to play is specified by a textbox element. In this textbox I could give the file path or filename to be played. I could also use the Open button to pop up a browsing window where I could browse for the proper audio file.

When the audio file is specified, I could start playing with pressing the Start button on the GUI. If every parameter is set properly the playback will start buttonStartPlayback.Text = "Pause";

Code:
1.	    WaveStreamPlayback.StartStreaming();  
2.	    WaveStreamPlayback.IsStreaming = true;  
3.	}
The Start button is also used for pausing a started stream. The difference between pausing and stopping a stream is that in the case of pausing, I could restart the streaming from the exact point it has been paused. In case of stopping the restart will be started from the beginning of the file.

Code:
1.	buttonStartPlayback.Text = "Start";  
2.	WaveStreamPlayback.PauseStreaming();  
3.	WaveStreamPlayback.IsStreaming = false;
If I wanted to stop the audio streaming, I needed to press the stop button and the following code will run

Code:
1.	textBoxRecordingFile.Text = string.Empty;  
2.	if (WaveStreamPlayback != null)  
3.	{  
4.	        WaveStreamPlayback.StopStreaming();  
5.	        buttonStartPlayback.Text = "Start";  
6.	        speaker.Stop();  
7.	        connector.Disconnect(WaveStreamPlayback, speaker);  
8.	        WaveStreamPlayback.Dispose();  
9.	        WaveStreamPlayback = null;  
10.	}
The audio stream playing could also be used for playing an audio file into a call. In this case I needed to connect the WaveStreamPlayback object to the PhoneCallAudioSender object with the connector. In that case the StartStreaming() method will play the audio file directly into the established call.

Any thoughts?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual C++.Net softphone development ronnyolsen82 Visual C++ 1 July 21st, 2016 06:59 AM
softphone development in .net and other programming languages paul:) C# 0 April 16th, 2012 08:03 AM
monotouch development on 10.5.8 zsyed1 BOOK: Professional iPhone Programming with MonoTouch and .NET/C# 0 March 27th, 2011 08:27 PM
Chapter 10, listing 10-10-app kiwibrit BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 2 August 18th, 2009 04:21 AM
What are Development steps in VB?? bmahajan VB How-To 2 July 5th, 2003 09:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.