OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: 00 36 52 532 731
Overview Quick start Download Manual How to buy FAQ Contact Us
OZEKI NG SMS Gateway - Product Guide

SMS delivery failed Contents | SearchC sharp and MS SQL Server

Home > Product Manual > Developers Guide > C Sharp SMS API > SMS API functions > SMS received

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Developers Guide
  Tutorials
  ASP SMS API
  PHP SMS API
  HTTP SMS API
  SQL SMS API
  C Sharp SMS API
  SMS API functions
  login
  logout
  Send SMS message
  log
  keepalive
  SMS delivered to network
  SMS delivery report
  SMS delivery failed
  SMS received
  C sharp and MS SQL Server
  Registering remote objects
  C Sharp SMS Gateway
  AJAX SMS API
  Delphi SMS API
  Cpp SMS API
  Java SMS API
  VB.NET SMS API
  Python SMS API
  Perl SMS API
  TCL/TK SMS API
  Coldfusion SMS API
  VB 6 SMS API
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
 


Automated phone calls?
Ozeki Phone System XE VoIP PBX software is an advanced PBX built for automated voice calls and 2 way SMS messaging. It has outstanding APIs for software developers. It can be used for:

Phone calls from SQL
Phone calls from HTTP
Voice and SMS applications

Callcenter developers
If you are working on telephone solutions, please check out the Ozeki VoIP SIP SDK.
It can be used to create VoIP client and server software.

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

C# SMS API - onMessageReceived


This event is invoked by the SMS Gateway when an incoming SMS arrives to the system. If you wish to process incoming SMS messages use this event to get notification about when they arrive.

To handle this event, the following delegate type is used:

    public delegate void ReceivedEventHandler(
         string sender,
         string receiver,
         string message,
         string messageType,
         DateTime sentTime,
         DateTime receivedTime,
         string serviceProvider
    );
And the following event is accessed:

public event ReceivedEventHandler onMessageReceived;

     Name Description
   public void onMessageReceived(
         string sender,
         string receiver,
         string message,
         string messageType,
         DateTime sentTime,
         DateTime receivedTime,
         string serviceProvider
    );
    
Create a function with this header and attach it to the onMessageReceived event to receive incoming messages in your application.

Parameters

sender - The sender phone number

receiver - The recipient phone number

message - The message text or if a binary message is received the XML representation of the binary message

messageType - The message type. A list of the SMS message types are available in Appendix J.

sentTime - The timestamp that shows when the message was sent

receivedTime - The timestamp that shows when the message was received

serviceProvider - The name of the service provider connection that received the message

Example

Step 1. - Create the event handling function:

   void myMessageReceivedHandler(
         string sender,
         string receiver,
         string message,
         string messageType,
         DateTime sentTime,
         DateTime receivedTime,
         string serviceProvider
   )
   {
     console.writeln("A message is received from "+sender+
      " the message text is: "+message);
   };
   
Step 2. - Attach this event to the SMSClient object:

   mySMSClient.onMessageReceived += ServerEventSink.wrap(myMessageReceivedHandler);
   
Hint: Notice the ServerEventSink.wrap method, that is used to attach the event. This wrapper is used to work around an error that can happen when asynchronous callbacks are invoked in .NET remoting.


Dig deeper!
People who read this also read...





Next page: C sharp and MS SQL Server
Copyright © 2000 - 2014 Ozeki Informatics Ltd.
All rights reserved

Software PBX for Windows | VoIP SDK   |   Legal information   |   Privacy policy   |   Terms of use
Please, address your inquiries to info@ozekisms.com