OZEKI WEBOFFICE: Template for page '4827' not found! Create a template for this page!

Send and receive SMS messages

The following quick start guides describe how to do basic tasks related to SMS messaging using OzML, HTTP API or OPS SDK. Many code examples are available for programmers in order to help in developing new applications with built-in SMS/MMS functionalities.

PREREQUISITES

EXAMPLES

  1. Receive incoming SMS

    The following guide explains how to build an application that can be used to receive an incoming SMS message. Take a look at the code example and get to know how to save the received messages into a file or database.

    $outString .= "Sender: " . $_REQUEST['Sender'] . "\r\n";
    $outString .= "Message: " . $_REQUEST['Message'] . "\r\n\r\n";
    file_put_contents('IncomingSms.txt', $outString, FILE_APPEND);
    

    View code examples:            


  2. Reply to an incoming SMS

    It is an amazing gesture to answer immediately to an incoming SMS message. This quick guide presents how to build an application that enables to send back a reply SMS to the original sender automatically.

    <Response>
    	<SendSms Recipient="OriginalSenderNumber">Hello, I got your message! Thank you!</SendSms>
    </Response>
    

    View code examples:            


  3. Send SMS messages

    After receiving some SMS messages, it is time to send an SMS using your own application. This example demonstrate what you should do to develop a great app that will be able to send a message and handle its delivery report.

    <Response>
    	<SendSms Recipient="RecipientNumber">Hello, this is a test SMS</SendSms>
    </Response>
    

    View code examples:            


  4. Send SMS to the caller

    When you get an incoming call, let's send back an SMS message to the caller through the API extension. First, you need to add an API extension notification in Ozeki Phone System XE and give a Call URL what is linked to your application.

    <Response>
    	<SendSms Recipient="OriginalCallerNumber">Hello, I got call! Thank you!</SendSms>
    </Response>
    

    View code examples: