Advertising and Marketing
Art and Entertainment
Automotive
Beauty Products and Tips
Business
Cards and Wishes
Company / Organization Overview
Computer and Technology
Data Recovery
Differences
Education and Study Tips
Electronics
Fashion and Life Style
Festivals
Finance
Food and Drink
Furniture
General
Gifts
Handicrafts
Health and Fitness
Home and Family
Internet and Business Online
Job Search
Law
Loans and Insurance
News and Society
Pets Care
Real Estate
Recreation and Sports
Relationship and Dating
Reviews
Travel and Leisure
Tutorial
Web Browsers
Writing and Speaking
- How to Create an Email Group in Gmail
- How to Convert Multiple Docs to PDF
- How to convert pdf to excel
- Add ASP.NET File Upload Functionality to Your Website
- Article Review Software for Searchable PDF Files (A Research PDF Search Tool for Literature Review)
- How to convert a pdf to a word document
- How to download youtube video
- Auslogics Duplicate File Finder: Delete Duplicate Files for Free
How to build your own C# Callback Form
This article is inspired to present the easiest way of building your own Callback Form in C#. I've found this software development kit while doing some research in the subject for a friend. He has lately started his small enterprise and wanted to get connected with the customers the easiest way. Since the business is quite small and he's a modest man who likes to make things in a personal way he doesn't need an autodialer for instance to get in touch with thousands of people and repeat them the same impersonal commercial message. But he would like to be available for the customers in 24/7. He's already got a website, and my idea was to place a callback form in it. In this way, website visitors can fill in the query form, provide a summary of the products they are interested in and enter their phone number. When the Callback form is filled in, the SDK calls the intended operator (or, you know... you) and the person who needs information at the same time. If both calls are accepted, then the SDK connects the two lines. In this way, the operator and the person who needs information can talk to each other. My friend likes this, because only serious customers call him, and personal conversations are more convincing than listening to a machine.
The downloadable sample program and the configuration guide can be found on the site I've used as the source of my article: http://www.voip-sip-sdk.com/p_159-how-to-create-a-callback-form-using-the-ozeki-c-sip-voip-softphone-source-voip.html
Now, we only take a look at the code of initiating a call.
For connecting two calls, it is required to establish two successful calls with the two given telephone numbers (The call is successful if it is accepted by the called party). First, the operator is called and if the call is successful, the customer is also called. When the two calls are connected the audio data are transferred between the two participants by the sample program.
Initiation of calls is made in a set time instant. I make the examination of this time instant with the help of the timer offered by .Net Framework. This timer examines in every seconds if it is the time for making the call. When it is time for call, the BeginCall(bool IsCustomerCall) method is called. This method dials the operator or the customer according to the value of the bool parameter. Meanwhile, it informs us about this procedure on the interface.
- private void BeginCall(bool IsCustomerCall)
- {
- if (IsCustomerCall && !String.IsNullOrWhiteSpace(textBoxCallbackPhone.Text))
- {
- callcustumer =
- softPhone.CreateCallObject(phoneLine, textBoxCallbackPhone.Text);
- WireUpCallEvents(callcustumer);
- InvokeGUIThread(() =>
- {
- listBoxEvents.Items.Add(
- String.Format("{0} call starts.", callcustumer));
- });
- callcustumer.Start();
- }
- else
- {
- if (string.IsNullOrWhiteSpace(textBoxOperator.Text))
- return;
- if (phoneLineInformation != PhoneLineInformation.RegistrationSucceded &&
- phoneLineInformation != PhoneLineInformation.NoRegNeeded)
- {
- MessageBox.Show("Phone line state is not valid!");
- return;
- }
- calloperator = softPhone.CreateCallObject(phoneLine, textBoxOperator.Text);
- WireUpCallEvents(calloperator);
- InvokeGUIThread(() =>
- {
- listBoxEvents.Items.Add(String.Format("{0} call starts.", calloperator));
- });
- calloperator.Start();
- }
- }
To initiate a call, you need to create an IPhoneCall object representing a call by using ’softPhone.Call’ method and its parameters. The first parameter is the phone line via which you wish to initiate the call. The second parameter is the phone number to be called. To make a successful call, you need to subscribe to specific events. Therefore, the audio data and DTMF signals arriving from the remote end, or the changes of the call status can be processed efficiently. I made the subscription in the sample program as follows:
- private void WireUpCallEvents(IPhoneCall call)
- {
- call.CallStateChanged += new EventHandler
>(call_CallStateChanged); - call.MediaDataReceived += new EventHandler
>(call_MediaDataReceived); - call.DtmfReceived += new EventHandler
>>(call_DtmfReceived); - call.CallErrorOccured += new EventHandler
(call_CallErrorOccured); - }
CallStateChanged:
This event is for demonstrating the changes in the call status.
MediaDataRecived:
The audio data from the remote telephone device arrives via this event.
DtmfReceived:
This event is responsible for processing DTMF signals that are arrived from the remote end.
This is only a small sneak peak at the coding, you can find more on the site mentioned above. If you're interested in this subject, you definitely should visit it.

My name is Evan Miller, I'm a developer, and I would like to sahre my thoughts and experiences with you.
- Best Ecommerce software solutions
- Enjoy Fast and Easy File Conversion with Advanced XML Converter
- A Monstrous Pack of Menu Icon Sets for Software Developers
- Spruce Up Your Software with Custom Icons.
- Normalizing MP3 volume levels
- Antivirus Smooth Removing : The way to Uninstall This kind of Spyware and adware Effortlessly
- Relocation Tax Software- summing-Up the Tax Payments during Relocation
- A new app that helps you search all your personal online content in one place!