Skip to content

USSD Demo Test Application

Alexey Pavlyuts edited this page Sep 13, 2021 · 1 revision

class USSDTestApp

Simple USSD echo application to test gateway interacton and be the starting point for your own app. Also a good to test that USSD gateway configured correctly. Uses persistent session variables storage.

Features

Just takes user input and adds it to session-persistent storage, showing all the history. Some special input:

  • 0 invokes session end from network side with message
  • 00 invokes session end from network side with default message
  • 000 emulates some internal failure with session end with USSD app failure message.

Setup

Just point USSD GW as described here to the script which invokes USSDTestApp class:

<?php

require '../../vendor/autoload.php'; //fix it to yuor path

use YateAPI\USSDTestApp;

$u = new USSDTestApp('http(s)://{USSD GW host:port}/usgw/ussd.php', '/var/log/ussdtest.log');

$u->run(); 

And everything shoudl work. You may use USSD Codes section to bind it to some USSD code or just put to USSD GW section and then it will serve forany USSD code except of listed at USSD Codes section.

Clone this wiki locally