Use your C# application for SMS messaging
Your C# application can connect to a Standard User or any other user created in Ozeki SMS Gateway. You can easily prepare your C# codes to send or receive SMS messages through SMS Gateway. Below you can download source codes for two C#.NET SMS demo projects which demonstrates how easy it is to connect C# with Ozeki SMS Gateway.
Unzip CsNETDll_v3.zip and open the ...\CsNETDll_v3\SMSDemo directory to run SMSDemo.sln in your C# IDE.
The C# SMS API is capable to connect locally or remotely over LAN or internet to Ozeki SMS Gateway. It is a classic example how to use the .NET TCP/IP networking, so you can make two applications work together. Thanks to the advantages of the IP connectivity, it creates a client-server model, where the C# API is the client while Ozeki SMS Gateway's built in SMPP server is the server.
Please activate the SMPP server from 'Edit/Server preferences' and by clicking on the 'Client connectivity' tabpage. Now you can 'Enable the built in SMPP server' (Figure 1). The default port number is 9500. In the examples below, you will be able to connect to the port number you have provided.
Figure 1 - Enable the built in SMPP server and click 'OK'
The API comes with 2 examples, which you can download above in a single zip.
The first example project is 'SMSDemo'. Through a working GUI you can connect to a Standard User of Ozeki SMS Gateway for SMS messaging (Figure 2).
Figure 2 - GUI of 'SMSDemo' example project
The second example project is called 'SMSDemoConsole', with it you can send or receive SMS messages through a simple console, which shows the deliver status as well.
You can control 'SMSDemoConsole' by modifying the programcode. The parameters below help you to connect to any user in Ozeki SMS Gateway and send an SMS message using the 'sendMessage' method (Figure 3). You can send multiple SMS messages as well by multiplying the 'sendMessage' method.
Press any key to close the console.
'sendMessage' method's Validity Period parameter:
2018.07.26.+10%3A07%3A58 is basicly 2018.07.26. 10:07:58 in an URL encoded form.
Tip: Download, install and use Microsoft Visual Studio to test these two examples.
Solutions to solve with the C# API
C# SMS API can send different type of SMS message types. For example WAP Push, Flash SMS, Ringtones, VCard, VCalendar, etc. The C# API can also subscribe to notification events, so it can help you track SMS messages. This way you can know when the message was delivered to the network if it was delivered at all and you can also know when it was received by the recipient's phone.
You can also receive SMS messages to the C# API. This helps you create great applications. For example SMS voting, stock market data querying or SMS quiz games. It is strongly recommended to read the full documentation of the C# API on the following page: C# SMS API Reference
Here is an alternative solution through SQL: