Search the manual:

Overview Quick start Download Manual How to buy FAQ Contact Us
OZEKI NG SMS Gateway - Product Guide

PDF user Contents | SearchForwarder user

Home > Product Manual > Installation Guide > Users and applications > WCF Client User

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
  Database user
  AutoreplyDatabase user
  Autoreply user
  AutoReplyEasy user
  File user
  E-mail user
  HTTP Client user
  Colour SMS user
  Appstarter user
  SMS Voting
  Outlook Mobile Service
  FTP user
  PDF user
  WCF Client User
  Forwarder user
  Linux
  User Guide
  Developers Guide
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
 



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.


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

Webphone solutions:
- Adobe Flash video phone
- Silverlight video phone
- Web to web calls
- Web to VoIP calls

Custom SIP clients:
- Silverlight SIP VoIP client
- Flash SIP VoIP client
- C# .net SIP VoIP client
- ASP .net SIP VoIP client
- Web based SIP VoIP client

Custom VoIP solutions:
- VoIP SIP softphones
- VoIP call center clients
- VoIP IVR systems
- VoIP predictive dialer systems
- VoIP auto dialer systems
- VoIP call assistant
- VoIP call recording systems
- VoIP intercom solutions

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: Forwarder user

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