Snippets tagged csharp

  • How to implement conference calling for a SIP softphone in C#?

    A conference call is a meeting, conducted over the phone using audio, between two or more people and usually for the purposes of discussing a particular topic. In my former snippets I dealt with text-to-speech and speech-to-text functionalities. So the implementation of conference calling can sound a little bit strange as compared with my previous tutorials. But I thought it provides a good opportunity for a new challange, so I thought I share my upshot expectedly that it will be useful for you. A softphone with built-in conference call feature can be greatly used in business communication as well as in companionship. The source code below is ready for use, so you only need to copy&paste it to your Visual Studio, then modify the necessary fields. (Do not forget to add the necessary DLL file providing the VoIP background to your references: http://www.voip-sip-sdk.com) This program will be a console application that functions as a softphone making conference calling possible. This solution assumes that you have a PBX with some SIP extensions installed previously. After creating the necessary using lines and objects, you need to define your PBX and provide the appropriate SIP account details in order to be able to register your application to the phone system. When you have created all the required methods for SIP calling, you need to initialize the conference room and handle the related events. AddToConference is used to add new party to the conference room and RemoveFromConference is used when the call is ended. Have a good time!

    2 people like this

    Posted: 8 years ago by warnerBro19

  • How to send SMS using ASP.NET through HTTP (C#)

    Hello Guys, This short ASP.NET code snippet is intended to provide you a brief review on how to add SMS functionality to your website. You will see, this is a very simple but smart solution. This ASP.NET application is able to send messages by using HTTP requests towards the SMS gateway that sends the SMSs to the destination telephone via a GSM modem or an IP SMS connection. Let’s take a quick look at the software requirements that are essentially needed for this solution. In order to send SMS messages from your ASP.NET application, you need a development platform, e.g Visual Studio, of course, .NET Framework 4.0, Internet Information Services (IIS) and an SMS gateway (I used Ozeki NG – http://www.ozekisms.com). You also need a GSM modem attached to your PC or an IP SMS connection to be able to send messages. Okay and now let’s use the code snippet! Copy the content of smssend.aspx and smssend.aspx.cs into the main directory of the IIS server - C:\Inetpub\wwwroot\ directory (). Configure the fixed data in the smssend.aspx.cs file (the IP address and port number of the SMS gateway, username, password). Launch your SMS gateway Server. Start a web browser and enter this URL: http://127.0.0.1/smssend.aspx - where 127.0.0.1 means that the smssend.aspx and smssend.aspx.cs files can be found on the same computer on which the browser has been opened). Fill in the required fields, and then click the Send button. It’s as easy as that! Happy coding! :)

    2 people like this

    Posted: 3 years ago by Aarav Gupta