Ozeki NG SMS Gateway logo OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: +36 1 371 0150
SMS Gateway to send SMS via GSM modem or IP SMS connection Overview SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Quick start SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Download SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Manual SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection How to buy SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection FAQ SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Contact Us SMS Gateway to send SMS via GSM modem or IP SMS connection
OZEKI NG SMS Gateway - Product Guide

PDF Request in SMS Contents | SearchSMS Forwarder

Home > Product Manual > Installation Guide > Users and applications > SMS to WCF service

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  Prerequisites
  Download Information
  Installation Steps
  Service Provider Connections
  Users and applications
  Standard user
  SMPP user
  SMS from/to database
  Autoreply SMS from database
  Autoreply SMS using a script
  Simple autoreply SMS
  SMS from/to file
  SMS through E-mail
  SMS via HTTP Request
  SMS via colour protocol
  Application starter SMS
  SMS Voting
  SMS from MS Outlook
  SMS from/to FTP server
  PDF Request in SMS
  SMS to WCF service
  SMS Forwarder
  RSS to SMS
  Linux
  User Guide
  Developers Guide
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
  Cookie policy
 


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.

WCF Client User

This guide provides information on how to install a WCF user in Ozeki NG SMS Gateway. With the help of this WCF user you will be able to forward incoming messages to a WCF service (WCF: Windows Communication Foundation) that will process the messages.

Requirements:

You need an installed Ozeki NG SMS Gateway: Download Ozeki NG SMS Gateway

System architecture

If you create a WCF user in Ozeki NG SMS Gateway the system will work as follows:
This created WCF user will be able to forward all incoming messages to a WCF service. As Figure 1 demonstrates, messages from mobile phones are received and processed by the WCF user of Ozeki NG SMS Gateway. This WCF user then forwards messages to the WCF service using WSHttpBinding binding. Finally the WCF service returns a response with the same type (OZmessage object) and also via WSHttpBinding binding.


Figure 1 - System architecture

Configuration steps

  1. Start Ozeki NG SMS Gateway
  2. Create a new SMS WCF user in Ozeki NG SMS Gateway. To do so click on Add new user or application and select SMS WCF user in the list (Figure 2).


    Figure 2 - Install WCF user

  3. Set the URL of the WCF service by clicking on WCF service settings and on General tab define the Service URL. In our example it is http://localhost:1165/WCFServiceForNG.svc (Figure 3).


    Figure 3 - Install WCF user

If you specified the proper parameter the connection has been created with the WCF service you wish to use. From that time all the incoming messages of the user will be forwarded to the WCF service.

Ozeki NG SMS Gateway communicates via WSHttpBinding binding with the WCF service and it uses Windows Authentication.

Ozeki NG SMS Gateway's requirements for WCF service of third parties:

The service needs to be described with IWCFServiceForNG interface. This interface has to include the operation contract defined by Ozeki Informatics Ltd:
[OperationContract]
OZmessage OnMessageReceived(OZmessage msg );

The operation contract receives an OZmessage object as a parameter. It contains the message ID, the phone number of sender and recipient, the text of the message, and the message type. Finally it saves the received message. In our example the message has been saved to Driver C into test.txt file.

public OZmessage OnMessageReceived(OZmessage msg )
            {
                FileStream file = new FileStream("C:\\test.txt",
                FileMode.OpenOrCreate | FileMode.Append, FileAccess.Write);

                StreamWriter sw = new StreamWriter(file);

                sw.WriteLine(msg.Recipient + ": " + msg.MessageData);
                sw.Close();
                file.Close();
                return msg;
            }  

The operation contract can be used for arbitrary functions in this way users can modify the body of the function. Please note that further operation contracts are not supported by Ozeki.

To operate properly you need to create OZmessage that takes part in the communication process:

Source code

[DataContract]
public class OZmessage
{
    string messageID;
    string sender;
    string recipient;
    string messageData;
    string messageType;

    [DataMember]
    public string MessageID
    {
        get { return messageID; }
        set { messageID = value; }
    }

    [DataMember]
    public string Sender
    {
        get { return sender; }
        set { sender = value; }
    }

    [DataMember]
    public string Recipient
    {
        get { return recipient; }
        set { recipient = value; }
    }

    [DataMember]
    public string MessageData
    {
        get { return messageData; }
        set { messageData = value; }
    }

    [DataMember]
    public string MessageType
    {
        get { return messageType; }
        set { messageType = value; }
    }

 }

Please note that any discrepancy from this code will result in errors.

You can also download an operating example for WCF service: WCFServiceForNG.rar



Next page: SMS Forwarder

Copyright © 2000 - 2017 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