VoxStack GSM Gateway API. Version: 1.0.0. Author: Joe.Yung



Similar documents
F-SECURE MESSAGING SECURITY GATEWAY

OpenVox GSM Gateway Function Manual

Grandstream Networks, Inc. UCM6100 Asterisk Manager Interface (AMI) Guide

VoIPon Tel: +44 (0) Fax: +44 (0)

Configuring CSS Remote Access Methods

Setting Up Scan to SMB on TaskALFA series MFP s.

PT Activity: Configure Cisco Routers for Syslog, NTP, and SSH Operations

SCOPTEL WITH ACTIVE DIRECTORY USER DOCUMENTATION

IIS, FTP Server and Windows

OCS Training Workshop LAB14. Setup

Device Log Export ENGLISH

Outcall User Manual Bicom Systems

Integrating Asterisk FreePBX with Lync Server 2010

ISE TACACS+ Configuration Guide for Cisco NX-OS Based Network Devices. Secure Access How-to User Series

AutoDownload: SQL Server and Network Trouble Shooting

Creating a DUO MFA Service in AWS

Brocade Certified Layer 4-7 Professional Version: Demo. Page <<1/8>>

User Manual. Version Yeastar Technology Co., Ltd.

Premium Server Client Software

How To - Implement Single Sign On Authentication with Active Directory

Step by Step Guide to implement SMS authentication to F5 Big-IP APM (Access Policy Manager)

Two-Factor Authentication

Securely manage data center and network equipment from anywhere in the world.

Setting Up Sharp MX-Color Imagers To Scan To

GLBP - Gateway Load Balancing Protocol

Salesforce Integration

WHMCS LUXCLOUD MODULE

Installation Troubleshooting Guide

Internet Access to a DVR365

SevOne NMS Download Installation and Implementation Guide

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Link and Sync Guide for Hosted QuickBooks Files

Getting Started with Clearlogin A Guide for Administrators V1.01

A Guide to Connecting to FreePBX

login timeout 30 access list ALL line 20 extended permit ip any any port 9053 interval 15 passdetect interval 30

Integrating with IBM Tivoli TSOM

Step-by-step installation guide for monitoring untrusted servers using Operations Manager ( Part 3 of 3)

Issue 2EN. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

CounterPoint SQL and Magento ecommerce Interface

Grandstream Networks, Inc. UCM6100 Security Manual

Grandstream Networks, Inc. UCM6100 Series IP PBX Appliance CDR and REC API Guide

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

TEL 500 WRITE UP WEEK 8 FREE PBX SIP LAB SUBMITTED TO: PROF. RONNY BULL BY: ANUSHA ALIGAPALLY

How To Configure SSL VPN in Cyberoam

escan SBS 2008 Installation Guide

Basics of Port Forwarding on a Router for Security DVR s

VOIP with Asterisk & Perl

IP-PBX Quick Start Guide

Using RADIUS Agent for Transparent User Identification

Network Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper

Managing User Accounts

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Internet Telephony PBX System

SETTING UP REMOTE ACCESS ON EYEMAX PC BASED DVR.

Howto: Changing Password for an Ingate Firewall 1450/1500/1550/1600/1650/1900 or Ingate SIParator 45/50/55/60/65/90

Integration Guide. Duo Security Authentication

Gigabyte Content Management System Console User s Guide. Version: 0.1

Configuring Nex-Gen Web Load Balancer

Secure Messaging Server Console... 2

Pandora FMS 3.0 Quick User's Guide: Network Monitoring. Pandora FMS 3.0 Quick User's Guide

Cannot send Autosupport , error message: Unknown User

HIPAA Compliance Use Case

CIMHT_006 How to Configure the Database Logger Proficy HMI/SCADA CIMPLICITY

Connect the Host to attach to Fast Ethernet switch port Fa0/2. Configure the host as shown in the topology diagram above.

Barracuda Networks Web Application Firewall

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

App Note. VoxStack GSM Gateway API

Using LiveAction with Cisco Secure ACS (TACACS+ Server)

Apache CloudStack 4.x (incubating) Network Setup: excerpt from Installation Guide. Revised February 28, :32 pm Pacific

Setup Instructions for Secure Hummingbird FTP

Chapter 5 - Ethernet Setup

- Basic Router Security -

Management Software. User s Guide AT-S84. For the AT-9000/24 Layer 2 Gigabit Ethernet Switch. Version Rev. B

Lab 2 - Basic Router Configuration

External authentication with Astaro AG Astaro Security Gateway UTM appliances Authenticating Users Using SecurAccess Server by SecurEnvoy

How to Configure Web Authentication on a ProCurve Switch

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses

How To - Implement Clientless Single Sign On Authentication with Active Directory

HP A-IMC Firewall Manager

HP IMC Firewall Manager

IP Power Stone 4000 User Manual

Enhanced Password Security - Phase I

Setup Guide for Magento and BlueSnap

F-Secure Messaging Security Gateway. Deployment Guide

Web Service Integration

HP Device Manager 4.6

nexvortex Setup Guide

VERALAB LDAP Configuration Guide

Manual. Netumo NETUMO HELP MANUAL Copyright Netumo 2014 All Rights Reserved

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

Mediatrix 3000 with Asterisk June 22, 2011

Setting up Scan to

PC Monitor Enterprise Server. Setup Guide

NetBrain Discovery Appliance Manual

How To Configure Virtual Host with Load Balancing and Health Checking

SITRANS RD500 Configuring the RD500 with PSTN or GSM modems and Windows-based servers and clients for communication Objective:

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

QUICKSTART GUIDE FOR CDI CELLULAR STARTER KIT

Transcription:

VoxStack GSM Gateway API Version: 1.0.0 Author: Joe.Yung

Change Notes Date Versions Description Author 2013.2.6 1.0.0 GSM Gateway Joe.Yung SMS API

1. Configuring AMI in VoxStack GSM Gateway. 1.1 How to configure AMI interface? Login your gateway with your user account and password, and please follow this flow to configure: ADVANCED-->Asterisk API. Please change the default to yours. Concerning the permit option, if you have one more IP addresses, then you should have junction with them by symbol &. In the demo test, allowing both servers 172.16.99.16 and 172.16.1.207 to have access to this GSM gateway. 1.2 Defining read/write authorization for various event classes.

In this illustration, you will be able to define custom authorization for various event classes. Read authorization permits you to receive asynchronous events, in general. Write authorization permits you to send commands and get back responses. 2. Monitoring and managing your Asterisk over Asterisk Manager Interface (AMI). 2.1 Using telnet to demonstrate AMI connectivity over TCP socket. a. Connect to the AMI over a TCP socket on port 5038. b. Log in using the login action and your user account. c. Execute the Ping action. Here s how to get access to the gateway and some responds for the actions from AMI. [root@mylinux ~]# telnet 172.16.99.102 5038 Trying 172.16.99.102... Connected to 172.16.99.102. Escape character is '^]'. Asterisk Call Manager/1.1 Action: Login Username: admin Secret: admin Response: Success Message: Authentication accepted Event: FullyBooted Privilege: system,all Status: Fully Booted Action: Ping Response: Success Ping: Pong Timestamp: 1360139590.096698 2.2 Introduction of SMS sending command gsm send syncsms <span> <destination> <message> <timeout> [id]

Options Synopsis Description Syntax Arguments span destination timeout id Execute SMS sending over a specific GSM channel Send short message to outside Action: Command Command: gsm send syncsms <span> <destination> <message> <timeout> [id] Which GSM channel will you select to send SMS What number will be receiving the short message How long it will try to send SMS before time is up Identifier of SMS. id is an optional parameter 2.2 Starting to send SMS over command action by value gsm send syscsms....with regard to the SMS ID, you will be able to set it by yourself, or take ActionID to be your SMS ID. Action: Command ActionID: 2013 //I take ActionID to be my sms ID. Command: gsm send syncsms 2 13480798079 "Hello,this is GSM Gateway" 30 Response: Follows Privilege: Command ActionID: 2013 SPAN:2 SEND SMS TO PHONE:13480798079 SUCCESSFULLY --END COMMAND-- Variable: SMS_SEND_TYPE Value: pdu Variable: SMS_SEND_SENDER Value: 13480798079

Variable: SMS_SEND_TXT Value: Hello,this is GSM Gateway Variable: SMS_SEND_PDU Value: 0031000B813184708970F900000019C8329BFD66D1D1E939283D071DA74DD031 4C2FDFC379 Variable: SMS_SEND_ID Value: Variable: DIALSTATUS Value: SMS_SEND_END Event: Newexten Context: gsm-2 Extension: sms_send_ok Priority: 1 Application: System AppData: touch /tmp/sms/s Variable: SYSTEMSTATUS

Value: SUCCESS Event: Hangup Privilege: call,all CallerIDNum: <unknown> CallerIDName: <unknown> ConnectedLineNum: <unknown> ConnectedLineName: <unknown> Cause: 0 Cause-txt: Unknown 2.3 Introduction of Manager Action Ping. Options Synopsis Description Syntax Arguments ActionID Keepalive command. A 'Ping' action will ellicit a 'Pong' response. Used to keep the manager connection open. Action: Ping [ActionID:] <value> ActionID for this transaction. Will be returned. 2.4 Completed transaction of AMI when a short message comes in. Action: Ping Response: Success Ping: Pong Timestamp: 1360140299.655150 Action: WaitEvent Response: Success Message: Waiting for Event completed. Event: WaitEventComplete Response: Error

Message: Missing action in request Variable: SMSSRC Value: +8613480798079 Variable: SMSTXT Value: Hello, this is a short message from my mobile phone! Variable: SMSPDU Value: 0891683108705505F0040D91683184708970F900003120606174922334C8329BFD6 681E8E8F41C949E83C2A039FA2DA783DAE5F93C7C2E83CCF2771BD4CE83DA 6F719A5D06C1D16F773904 Variable: SMSTIME Value: 2013/02/06 16:47:29 Variable: SMSTZ Value: GMT+8 Variable: DIALSTATUS

Value: SMS_END Event: Newexten Context: gsm-2 Extension: sms Priority: 1 Application: System AppData: /my_tools/process_sms "2" "+8613480798079" "2013/02/06 16:47:29" "Hello, this is a short message from my mobile phone!" Variable: SYSTEMSTATUS Value: SUCCESS Event: Hangup Privilege: call,all CallerIDNum: +8613480798079 CallerIDName: +8613480798079 ConnectedLineNum: <unknown> ConnectedLineName: <unknown> Cause: 0 Cause-txt: Unknown In the whole transaction, you can find a code segment as the following. This section is the most important when you would like to monitor the incoming short message. Asterisk (Gateway core) will report a new event to the client. Event: Newexten Context: gsm-2 Extension: sms Priority: 1 Application: System AppData: /my_tools/process_sms "2" "+8613480798079" "2013/02/06 16:47:29"

"Hello, this is a short message from my mobile phone!" Arguments Value & Description Event Newexten. When a new short message comes in, Asterisk (Gateway core) will report a new event to you (client). Priviledge Dialplan. Allowed event. Which channel to be used? Context: gsm-2. Conext name. Extension: sms. Transaction type. When the short message comes in, the gateway will invoke sms extension. Priority 1. Executed priority while short message coming in. AppData /my_tools/process_sms "2" "+8613480798079" "2013/02/06 16:47:29" "Hello, this is a short message from my mobile phone!" Data which will be saved in CDR. Uniqueid 1360140505.18. Event Identifier If TCP socket connection is still alive. And you receive both parameters Newexten and sms, which indicate that there is a new short message comes in. You will be able to use Ping action to check if your connection is alive or not, and monitor the incoming short message by these two events. 2.5 AMI over TCP for Windows. Yes, you can get access to your GSM Gateway over AMI protocol in Windows system. Please follow thisflow: Click Start-->Run-->Open, at the input text box, type cmd to enter a Windows console. Hit the [Enter], and it will automatically skip to the next illustration.

In this demo, I sent a short message to be outside by action command. 2.6. Using PHP script to send short message over AMI protocol. Before doing this, please download phpagi target from website: http://sourceforge.net/projects/phpagi/, and place it to /var/lib/asterisk/agi-bin. Give execute permission to the file. Based on my experience, if your PHP version is higher than 5.3, you MUST rename the function goto in phpagi.php. Here s demo script voxstack_sms.php: #! /usr/bin/php -q <?php include("phpagi-asmanager.php"); $agi=new AGI_AsteriskManager; $vst_host='your VOXSTACK GSM GATEWAY IP ADDRESS'; $vst_user='admin'; #Corresponding to your GSM gateway API settings $vst_pwd='admin'; #Corresponding to your GSM gateway API settings $vst_port=5038; #Corresponding to your GSM gateway API settings $agi_status=$agi->connect($vst_host.":".$vst_port,$vst_user,$vst_pwd); if(!$agi_status) { } $msg="failed to connected Asterisk,exit.."; exit(0); $type='gsm'; $method='send';

$sync='syncsms'; $span='2'; $destination='your DESTINATION NUMBER'; $message='helloworld'; $timeout='30'; $id='1234'; $agi->command("$type $method $sync $span $destination $message $timeout $id");?> exit(0); 3. Introduction of USSD sending command. gsm send ussd <span> <message> [timeout] Options Synopsis Description Arguments span message timeout Execute USSD sending over a specific GSM channel Send USSD on a given GSM channel Which GSM channel will you select to send USSD What USSD code will you send How long it will try to send USSD code before time is up