Quantcast
Channel: Charles Roufay – Telestax Docs Online
Viewing all 36 articles
Browse latest View live

SMSC – Routing Rules

$
0
0

Routing Rules

TelScale SMSC Gateway can now act as a SMPP Server accepting incoming SMPP connections or can also act as a SMPP client initiating a connection to a remote SMSC server. Therefore you can now set an intelligent routing rule to route SMS between SMPP connections or between SMPP and GSM.

By default, TelScale SMSC Gateway is setup to leverage the “address-range” to decide the routing of SMS. For example:

  1. If Server ESME is defined of type RECEIVER (and hence accepts incoming RECEIVER BIND from peer client) with address range s 6666; if SMS arrives in system destined for 6666, it matches with this ESME and SMS will be sent as DELIVER_SM to client side.
  2. If Client ESME is defined of type TRANSMITTER (and hence initiates TRANSMITTER BIND to peer server) with address range as 6666; if SMS arrives in system destined for 6666, it matches with this ESME and SMS will be sent as SUBMIT_SM to server side. The destined number of SMS is checked with address range. TelScale SMSC Gateway uses regular expression for matching the pattern. The above methodology can work if the routing rule is based on MSISDN range, however if the range is not fixed (like in case of Number Portability) the above process will break. In such cases you can define a Database routing rule.

You must change the value of the property
smsRoutingRuleClass in the file Telscale-smscgateway-<version>/jboss-5.1.0.GA/ server/default/deploy/telscale-smsc-server/META-INF/jboss-beans.xml to look like below and un-comment if its commented out:

<property
name="smsRoutingRuleClass">org.mobicents.smsc.smpp.DatabaseSmsRoutingRule</
property>

SMSC stores the routing rule in the Cassandra Database. You can populate this table with address  and corresponding cluster name as explained in the sections below

Create/Update Database Routing Rule

Using CLI

You can create or update a Database Routing Rule using the command smsc databaserule update with appropriate parameters as described below:

Name
smsc databaserule update
SYNOPSIS
smsc databaserule update <address> <systemId> <SMPP|SIP>
DESCRIPTION
This command is used to add or update a Database Rule for SMPP or SIP.
The parameter <SMPP|SIP> is used to define if the rule is for SMPP or SIP.
This is an optional parameter and if unspecified, by default the rule is set for SMPP.
Database Rules are Rules that are used for routing messages to a proper ESME.
When you define a rule using the above command, you are creating a routing rule
that states:
"If the destination address of a message corresponds with the value specified in
the 'address' field, then the message be sent to an ESME identified by the value
specified in the 'systemId' field".
To add a new rule you must issue the command with the systemId parameter and
specify if the rule is for SIP or SMPP.
To update an existing rule, you must issue the command with both the address
parameter and the systemId parameter and specifiy if the rule is for SIP or
SMPP.

Using GUI

Procedure 6.58. Create/Update Database Routing Rule using the GUI

  1. In the GUI Management Console for SMSC Gateway, click on ‘DB Routing Rule’ in the left panel.
  2. The main panel will allow you to create/update, delete and view DB Routing Rules for SMPP or SIP.
  3.  In order to create or update a DB Routing Rule, choose the type as SMPP or SIP from the drop down box, enter the values for MSISDN and ESME cluster name and click on ‘Update’.  A new rule will be created if it does not exist or updated if it exists.

Delete Database Routing Rule

Using CLI

You can delete a Database Routing Rule using the command smsc databaserule delete with appropriate parameters as described below:

Name
smsc databaserule delete
SYNOPSIS
smsc databaserule delete <address> <SMPP|SIP>

DESCRIPTION
This command is used to delete an existing Database Rule specified for
'address'.
The parameter <SMPP|SIP> is used to define if the rule is deleted for SMPP
or SIP.

This is an optional parameter and if unspecified, by default the rule is
deleted for SMPP.

 

 Using GUI

 Delete Database Routing Rule using the GUI

  1. In the GUI Management Console for SMSC Gateway, click on ‘DB Routing Rule’ in the left
    panel.
  2. The main panel will allow you to create/update, delete and view DB Routing Rules for SMPP  or SIP.
  3. In order to delete a DB Routing Rule, choose the type as SMPP or SIP from the drop down box, enter the value for MSISDN and click on ‘Delete’. The routing rule corresponding to that  MSISDN will be deleted.

 

View Database Routing Rule Information – Using CLI

You can view a Database Routing Rule using the command smsc databaserule get with appropriate parameters as described below:

 

Name
smsc databaserule get
SYNOPSIS
smsc databaserule get <address> <SMPP|SIP>
DESCRIPTION
This command is used to view the details of an existing Database Rule
specified
for 'address'.
The parameter <SMPP|SIP> is used to define if the rule is to be viewed for
SMPP
or SIP. This is an optional parameter and if unspecified, by default the
rule is
retrieved for SMPP.

 

Using GUI – View Database Routing Rule using the GUI

  1. In the GUI Management Console for SMSC Gateway, click on ‘DB Routing Rule’ in the left panel.
  2. The main panel will allow you to create/update, delete and view DB Routing Rules for SMPP or SIP.
  3. In order to view a DB Routing Rule, choose the type as SMPP or SIP from the drop down box, enter the value for MSISDN and click on ‘View’. The routing rule corresponding to that  MSISDN will be displayed.

 

Retrieve a range of Database Routing Rules – Using CLI

You can retrieve a range of Database Routing Rules using the command smsc databaserule  getrange with appropriate parameters as described below:

 

Name
smsc databaserule getrange

SYNOPSIS
smsc databaserule getrange <SMPP|SIP> <address>
DESCRIPTION
This command is used to retrieve a list of database rules as text data.

PARAMETERS
Standard Parameters:
<SMPP|SIP> - This parameter is used to specify if you wish to retrieve the
range corresponding to SMPP or SIP.

Optional Parameters:
<address> - If a value is not specified for <address>, then the command
will retrieve the first 100 database rules.

If <address> is specified, then the command will retrieve a list of 100 
database rules starting from the record next to the record with address='address'.

 

 

The post SMSC – Routing Rules appeared first on Telestax Docs Online.


Restcomm API – Usage Records

$
0
0

Usage Records

The UsageRecords REST resource provides a simple API to retrieve usage made by your Restcomm account during any time period and by any usage category. This makes it easy to build reporting and analytics tools for your application. UsageRecords used in combination with
Subaccounts created for each of your end-users make it possible to build recurring usage-based billing systems on top of Restcomm’s API with just a few simple API calls.

You can also set up usage triggers to notify your application when a particular category of usage reaches a threshold on a daily, monthly, yearly, or all-time basis. Triggers can help determine if your users have reached a cap on usage, or if your application may have runaway requests. For more on usage triggers, see the Usage Triggers documentation.

UsageRecords List Resource

Resource URI

/<b>2012-04-24</b>/Accounts/{AccountSid}/Usage/Records

Resource Properties

This resource and its subresources always return a list of UsageRecords. Each UsageRecord is represented by the following
properties:

Property Description
Category The category of usage. See Usage Categories below.
Description A human-readable description of the usage category.
AccountSid The Account that accrued the usage.
StartDate The first date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD. All dates are in GMT.
EndDate The last date for which usage is included in this UsageRecord, formatted as YYYY-MM-DD. All dates are in GMT.
Usage The amount of usage (e.g. the number of call minutes). This is frequently the same as Count, but may be different for certain usage categories like calls, where Count represents the number of calls and Usage represents the number of minutes.
UsageUnit The units in which Usage is measured. For example minutes for calls, messages for SMS.
Count The number of usage events (e.g. the number of calls).
CountUnit The units in which Count is measured. For example calls for calls, messages for SMS.
Price The total price of the usage, in the currency associated with the account.
PriceUnit The currency in which Price is measured, in ISO 4127 format (e.g. usd, eur, jpy).
Uri The URI that returns only this UsageRecord, relative to http://Restcomm_IP_ADDRESS
SubresourceUris Subresource Uris for this UsageRecord. See List Subresources.
Usage, Count, and Price

Each UsageRecord contains three amounts: Usage, Count, and Price. Usage is the primary way usage is measured for that
category: minutes for calls, messages for SMS, etc. Count is the number of usage events: calls for calls, etc. And Price is
the price of the usage in the currency associated with the account.

Each UsageRecord also has fields that show the units in which each amount is measured: Usage is measured in units of UsageUnit, for instance. These fields make it easy to build usage dashboards. For example, you can always display human-readable strings describing
usage with “$Usage $UsageUnits“, “$Count $CountUnits“, or “$Price $PriceUnits“.

Usage Categories

A UsageRecord’s Category defines the type of usage it represents. The full list of all categories is here, but
you’ll usually focus on just a few common categories:

             Category Description
calls All voice calls. Count is the number of calls and Usage is the number of minutes.
sms All SMS messages. Count and Usage are both the number of messages sent.
phonenumbers All phone numbers owned by the account.
recordings Recordings of voice calls. Count is the number of recordings and Usage is the number of recorded minutes. Note that Restcomm doesn’t charge for making recordings (only storing them long term) so Price will always be 0.
transcriptions Transcriptions of voice calls. Count is the number of transcriptions and Usage is the number of transcribed minutes.
totalprice Total price of all usage. Usage will be the same as Price, and Count will be empty. Note that because some Restcomm costs may not be included in any usage category, the sum of the Price of all UsageRecords may not be equal to the Price of TotalPrice.

HTTP GET

Returns UsageRecords for all usage categories. The list includes paging information.

List Filters

By default, the UsageRecords resource will return one UsageRecord for each Category, representing all usage accrued all-time for the
account. You can filter the usage Category or change the date-range over which usage is counted using optional GET query parameters. Note that query parameters are case-sensitive:

Parameter Description
Category Only include usage of this usage category.
StartDate Only include usage that has occurred on or after this date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can also specify offsets to today. For example, StartDate=-30days will make StartDate be 30 days before today.
EndDate Only include usage that has occurred on or before this date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can also specify offsets to today. For example, EndDate=+30days will make EndDate be 30 days from today.

For example, you might request all usage records for the month of April, 2012. In this case, the query string would be
StartDate=2012-04-01&EndDate=2012-04-30.

This would return one UsageRecord for each usage-type summarizing the usage during April. The list includes paging information.

It’s also possible to group usage by day, by month, or by year using the subresources described below.

List Subresources

The main UsageRecords list resource supports a variety of convenience
subresources. In general these take the form:

/2010-04-01/Accounts/{AccountSid}/Usage/Records/{Subresource}

Supported subresources are:

Subresource Description
Daily Return multiple UsageRecords for each usage category, each representing usage over a daily time-interval.
Monthly Return multiple UsageRecords for each usage category, each representing usage over a monthly time-interval.
Yearly Return multple UsageRecords for each usage category, each representing usage over a yearly time-interval.
AllTime Return a single UsageRecord for each usage category, each representing usage over the date-range specified. This is the same as the root /Usage/Records.
Today Return a single UsageRecord per usage category, for today’s usage only.
Yesterday Return a single UsageRecord per usage category, for yesterday’s usage only.
ThisMonth Return a single UsageRecord per usage category, for this month’s usage only.
LastMonth Return a single UsageRecord per usage category, for last month’s usage only.

These convenience subresources can be used to draw a graph of daily calls, display dashboards of monthly usage across all usage categories, or build a simple usage-based billing system based on last month’s usage totals.

All subresources support the same list filters as the root UsageCounters resource.

 HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Full List of All Usage Categories

The full list of supported usage categories are:

             Category Description
calls All voice calls, inbound & outbound. Count is the number of calls and Usage is the number of minutes.
calls-inbound All inbound voice calls, to both toll-free and local numbers.
calls-inbound-local All inbound voice calls to local numbers.
calls-inbound-tollfree All inbound voice calls to toll-free numbers.
calls-outbound All outbound voice calls.
calls-client All Restcomm Client voice calls.
calls-sip All SIP calls.
sms All SMS messages, both inbound and outbound. Count and Usage are both the number of messages sent.
sms-inbound All inbound SMS messages, to both short-codes and long-codes.
sms-inbound-shortcode All inbound SMS messages to short-codes.
sms-inbound-longcode All inbound SMS messages to long-codes.
sms-outbound All outbound SMS messages, from both short-codes and long-codes.
sms-outbound-shortcode All outbound SMS messages from short-codes.
sms-outbound-longcode All outbound SMS messages from long-codes.
phonenumbers All phone numbers owned by the account, toll-free and local.
phonenumbers-tollfree All toll-free phone numbers owned by the account.
phonenumbers-local All local phone numbers owned by the account.
shortcodes All ShortCodes owned by the account, of all types.
shortcodes-vanity All vanity ShortCodes owned by the account.
shortcodes-random All randomly-assigned ShortCodes owned by the account.
shortcodes-customerowned All ShortCodes owned by the account that are leased from another provider.
calleridlookups CallerID (CallerName) lookups.
recordings Recordings of voice calls. Count is the number of recordings and Usage is the number of recorded minutes. Note that Restcomm doesn’t charge for making recordings (only storing them long term) so Price will always be 0.
transcriptions Transcriptions of voice calls. Count is the number of transcriptions and Usage is the number of transcribed minutes.
recordingstorage Amount of storage used by call recordings stored for the account. Count is the number of stored recordings, Usage is the number of stored recorded minutes, and Price is the price of storing the recordings.
totalprice Total price of all usage. Usage will be the same as Price, and Count will be empty. Note that because some Restcomm costs may not be included in any usage category, the sum of the Price in all UsageRecords may or may not be equal to the Price of TotalPrice.

UsageRecords Instance Resource

You cannot make requests directly to a UsageRecord resource. Instead,
make a request to the UsageRecords list resource or one of
its

 

The post Restcomm API – Usage Records appeared first on Telestax Docs Online.

Restcomm – Installing on Google Cloud

$
0
0

Rescomm is a turn-key telephony SaaS solution ready for public or private cloud deployment. Restcomm is compatible with Twilio API’s and is part of the  Mobicents open source community. Here is the Restcomm Open Source community github page.

This tutorial will guide you through the steps required to install and run Restcomm on Google Cloud Compute Engine.


 

Requirements

  • Basic Knowledge of Telscale Restcomm or Mobicents Restcomm
  • Google Cloud Compute Engine as explained HERE
  • Java JDK 7 or higher as explained HERE
  • Install screen (yum install screen)
  • Minimum compute engine “Machine-type” g1-small (1 vCPU, 1.7 GB memory) On a production server, increase the machine type to account for higher traffic.

 Initial Setup and Installing Restcomm

      • ssh into your google cloud compute instance
      • install “screen”
        • yum install screen
      • Download Java
        • download java jdk to the /opt directory of your install as follows
        • wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz”
        • extract the content of the file to the /opt directory as follows
        • tar xzf jdk-7u79-linux-x64.tar.gz
        • point the java command to the correct directory with the following command
        • alternatives –config java
      • open firewall ports for Restcomm http traffic and RTP traffic
        • from the ssh terminal run the following command
        • gcloud compute firewall-rules update restcomm-rules –allow tcp:444 tcp:8080 tcp:8000 tcp:2080 udp:5060 udp:5061 udp:5080 udp:34534-65535
        • these are some of the essential ports for SIP, RTP traffic.
      • download  Mobicents Restcomm
        • download Restcomm to any directory of your choice. (In this tutorial, we created a new directory called telestax)
        • wget https://mobicents.ci.cloudbees.com/view/RestComm/job/RestComm/lastSuccessfulBuild/artifact/mobicents-Restcomm-JBoss-AS7-7.2.2.611.zip
        • in the directory telestax extract the content of the zip file
        • unzip mobicents-Restcomm-JBoss-AS7-7.2.2.611.zip
        • go into the newly created mobicents-Restcomm-JBoss-AS7-7.2.2.611 directory
        • you should see the following content
        • appclient      docs               modules            telestax-license.xml
          bin            domain             README.txt         telscale-media
          bundles        jboss-modules.jar  standalone         tools
          copyright.txt  LICENSE.txt        Telestax-EULA.pdf  welcome-content

           
      • Config and Start Restcomm

        • go to the directory mobicents-Restcomm-JBoss-AS7-7.2.2.611/bin/restcomm
        • edit the file restcomm.conf file with the info from you google compute instance
        • run the command ifconfig to get your local network details
        • run the command gcloud compute instances list to get the Public IP Address
        • go to voicerss.org to get a free API account
        • fill out the restcomm.conf file as follows
        • # Network configuration
          NET_INTERFACE=eth0
          PRIVATE_IP=10.240.203.100
          SUBNET_MASK=255.255.255.255
          NETWORK=10.240.203.100
          BROADCAST_ADDRESS=10.240.203.100
          
          # PUBLIC IP ADDRESS
          STATIC_ADDRESS=104.197.21.130
          
          
          # VoiceRSS variable declarations
          VOICERSS_KEY='290adfae344sdfgssfgs56d4c72b7'
      • Start and Use Restcomm

        • run the start script in the directory mobicents-Restcomm-JBoss-AS7-7.2.2.611/bin/restcomm
        • ./start-restcomm.sh
        • on your web browser go to the url
        • http://104.197.21.130:8080/
        • log into the Restcomm instance with username=administrator@company.com
        • password=RestComm
        • You will be prompted to change the default password.
      • restcomm-login-page


Making SIP Calls to Restcomm

        • Start a SIP phone and make a call to sip:1234@104.197.21.130:5080
        • Make another call to sip:1235@104.197.21.130:5080

 

The post Restcomm – Installing on Google Cloud appeared first on Telestax Docs Online.

Restcomm – Configure and Connect to External DID Providers

$
0
0

This tutorial will give you a short overview of what you need to do to connect Restcomm Cloud communication platform to DID providers like VoipInnovations, Bandwidth or Nexmo

 

Requirements

  • Basic Knowledge of Restcomm
  • Account from any of the above mentioned DID providers
  • Install Restcomm as explained HERE
  • Change Default Password as explained HERE

Step 1

  • Go to $RESTCOMM_HOME/bin/restcomm
  • open the file restcomm.conf for edit

To fill out the section # Network configuration

run the following command on your bash terminal

$> ifconfig 
enp19s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.3  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f2bf:97ff:fe03:9e0a  prefixlen 64  scopeid 0x20<link>
        ether f0:bf:97:03:9e:0a  txqueuelen 1000  (Ethernet)
        RX packets 44916  bytes 36481273 (34.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 37502  bytes 5636746 (5.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$> netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 enp19s0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 enp19s0

 

Use the information above to fill out your configuration as shown in the example below:

NET_INTERFACE=enp19s0
PRIVATE_IP=192.168.1.3
SUBNET_MASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST_ADDRESS=192.168.1.255

Note

If you want to be able to call your Restcomm instance by initiating a call from the internet, you will need to configure your firewall NAT and the ports defined below

Restcomm Ports to open on the firewall for NAT

  • tcp:8080
  • udp:5080
  • udp:64535-65535
  • tcp/udp: 5060
  1. Port 8080 is used for the restcomm-management console over http
  2. Port 5080 is used to make calls ex. sip:1234@Restcomm_IP:5080
  3. Port 64535-65535 are used for media RTP traffic
  4. Port 5060 is used for SIP

 

Step 2 – Setting the Static Public IP Adress

  • Go to the file restcomm.conf under the section # PUBLIC IP ADDRESS
  • Get the public IP address of the server on which Restcomm is installed
Note

Open your internet browser and in google.com, type, “what is my ip”.

This will give you the Public IP address of your Internet Facing Server

Use the public IP address to fill out the STATIC_ADDRESS below

# PUBLIC IP ADDRESS
STATIC_ADDRESS=SERVER_PUBLIC_IP_ADDRESS

ex. STATIC_ADDRESS=222.222.111.111

Step 3 – DID Provider Configuration

In the file restcomm.conf, go to the section # DID Provision provider variable declarations

# DID Provision provider variable declarations

PROVISION_PROVIDER=”               # values: VI (VoipInnovation), BW (Bandwidth), NX (Nexmo)
DID_LOGIN=”
DID_PASSWORD=”
DID_ENDPOINT=”
DID_SITEID=”

Enter your account details as provided by your Telco Service Provider.

  • Save the restcomm.conf file
  • start restcomm by running the script $RESTCOMM_HOME/bin/restcomm/start-restcomm.sh

 


You must stop ($RESTCOMM_HOME/bin/restcomm/stop-restcomm.sh) and start ($RESTCOMM_HOME/bin/restcomm/start-restcomm.sh )restcomm after making changes to the restcomm.conf file.


 

The post Restcomm – Configure and Connect to External DID Providers appeared first on Telestax Docs Online.

SMSC – Understanding the Different Sending Modes

$
0
0
Telscale SMSC has 4 different sending modes
  • Datagram
  • Transactional
  • Forward and Store (FAS)
  • Store and Forward (SAF)
Datagram:
  • Incoming messages will be immediately sent to a destination without being stored in the database.
Transactional:
  • This is similar to datagram mentioned above, however, a return message (success or failure) will be sent to the originator.
  • Datagramm and Transactional have only one message delivery attempt. If message delivery fails, no further attempt will be made to resend the message therefore, the message will be dropped
Forward and Store (FAS):
  • In this mode, an immediate delivery is performed. If the attempt fails, the message will be stored into a database and then, periodic attempts at sending the message will be performed.
Store and Forward (SAF):
  • In this mode, the message will be stored in the database and then, periodic attempts at sending the message will be performed

The post SMSC – Understanding the Different Sending Modes appeared first on Telestax Docs Online.

Restcomm – Working with RestComm and Dialogic XMS

$
0
0

RestComm is a next generation Cloud Communications Platform. It allows web developers to rapidly build voice, video, WebRTC, USSD, SMS, fax and rich messaging applications. Restcomm opens new revenue streams for service providers by exposing existing SS7 and IMS core network assets to application developers.

This documentation will explain how you can configure Dialogic JSR-309 driver to work with Restcomm.

Automatic configuration and startup

  • Download the JBoss Restcomm binary from here.
  • Unzip the file to the directory of your choice. This directory will be known as RESTCOMM_HOME from now on.
  • Modify $RESTCOMM_HOME/bin/restcomm/restcomm.conf file by setting the variable MS_ADDRESS to the public address of your Dialogic XMS instance.
    • A detailed guide to RestComm’s automatic configuration and startup can be found here.
  • Start RestComm using the $JBOSS_HOME/bin/restcomm/restcomm-start.sh script.

An example of configuration for the RestComm startup mechanism can be found below:

NET_INTERFACE=eth0
PRIVATE_IP=192.168.1.175
SUBNET_MASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST_ADDRESS=192.168.1.255
MS_ADDRESS=54.55.56.57

Creating a Logger for JSR-309 Connector

  • Go to the  $JBOSS_HOME/standalone/configuration folder
  • Edit the file standalone-sip.xml
  • Locate the tag <subsystem xmlns=”urn:jboss:domain:logging:1.2″>
  • Change the logger level to one of this options: DEBUG, INFO, WARN or ERROR
  • As shown below the logger level is set to INFO

<logger category="com.vendor.dialogic">
    <level name="INFO"/>
</logger>

 

 

 

 

 

 

 

 

 

 

The post Restcomm – Working with RestComm and Dialogic XMS appeared first on Telestax Docs Online.

Restcomm – Install and Configure Restcomm to use MariaDB

$
0
0

When working with the binary version of Restcomm, the default database is hsqlDB. This is of course not suitable for production but it is provided as a way for you to conveniently and quickly start up Restcomm. If you are running Restcomm on Amazon Cloud, the configuration and setup comes with MariaDB. For those who wish to run Restcomm on a local server or on another cloud based system, the following tutorial will show you how to get started with Restcomm and MariaDB

Requirements

  • Make sure MariaDB is installed, for those run on systems that supports Yum install, see the instruction HERE
  • Download the latest version of Restcomm Telscale or Mobicents as explained HERE

 

Step 1 – Adding the MariaDB JDBC connector to JBoss Datasource

  • Edit $RESTCOMM_HOME/standalone/configuration/standalone-sip.xml file
  • Under the datasource tag add the following:
  • Make sure you are using the correct IP address and port default port 3306. In the example below the local IP is 192.168.1.3:3306
  • Use the correct username and password for the MariaDB access
  • Set the MariaDB enabled=”true” and make sure you set the default dummy datasource to “false”

<datasource jndi-name="java:/MariaDS" pool-name="MariaDS" enabled="true">
                    <connection-url>jdbc:mariadb://192.168.1.3:3306/restcomm</connection-url>
                    <driver>mariadb</driver>
                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                    <pool>
                        <min-pool-size>100</min-pool-size>
                        <max-pool-size>200</max-pool-size>
                    </pool>
                    <security>
                        <user-name>myTestUsername</user-name>
                        <password>myTestPassword</password>
                    </security>
                    <statement>
                        <prepared-statement-cache-size>100</prepared-statement-cache-size>
                        <share-prepared-statements/>
                    </statement>
                </datasource>

  • In the datasource under the drivers tag, add the following:
  • save and exit the standalone-sip.xml file

                    <driver name="mariadb" module="org.mariadb.jdbc">
                        <xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class>
                    </driver>

 

Step 2 – Configuring the mybatis.xml file to use MariaDB

  • Edit the file $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/mybatis.xml
  • Change the environments id to id=”mariadb”
  • Add the MariaDB configuration environment tag as shown below

<environments default="mariadb">

        <environment id="mariadb">
                <transactionManager type="JDBC" />
                <dataSource type="JNDI">
                        <property name="data_source" value="java:/MariaDS" />
                </dataSource>
        </environment>

  • Save and exist the mybatis.xml file

 

Step 3 – Download MariaDB Java Client Driver

  • Download the mariaDB java client driver from HERE
  • Go to the directory $RESTCOMM_HOME/modules
  • Run the following command to create a new directory structure:  mkdir -p ./org/mariadb/jdbc/main
  • Go to the newly created directory structure $RESTCOMM_HOME/modules/org/mariadb/jdbc/main
  • Copy the downloaded mariadb-java-client-1.2.0.jar to the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main
  • In the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main create a new xml file called module.xml
  • The content of the module.xml should be similar to the one below. Notice the path name of the java client must matches the one you download
  • You should now have 2 files in the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main directory.

<?xml version="1.0" encoding="UTF-8" ?>
<module xmlns="urn:jboss:module:1.1" name="org.mariadb.jdbc">
	<resources>
    	<resource-root path="mariadb-java-client-1.2.0.jar"/>
	</resources>
	<dependencies>
		<module name="javax.api"/>
		<module name="javax.transaction.api"/>
	</dependencies>
</module>

 

 Step 4 – Start mariaDB and Create the restcomm Database.

  •  Start mariaDB  – sudo /etc/init.d/mysql start
  • Go to the directory $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/scripts/mariadb
  • There will be an init.sql file and an sql directory
  • Create the restcomm database from the init.sql as follows:
  • mysql -u root < init.sql

Step 5 – Edit the restcomm.xml file to point the DAO to mariadb

  • Edit the file $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/restcomm.xml
  • Find the dao-manager tag and change the sql-files path to mariadb as shown below

<dao-manager class="org.mobicents.servlet.restcomm.dao.mybatis.MybatisDaoManager">
		<configuration-file>${restcomm:home}/WEB-INF/conf/mybatis.xml
		</configuration-file>
		<data-files>${restcomm:home}/WEB-INF/data/hsql</data-files>
		<sql-files>${restcomm:home}/WEB-INF/scripts/mariadb/sql</sql-files>
	</dao-manager>

 

Start Restcomm as explained HERE

 

 

 

 

 

 

 

 

 

The post Restcomm – Install and Configure Restcomm to use MariaDB appeared first on Telestax Docs Online.

JDiameter – Quick Telscale Diameter Performance Testing Using Seagull

$
0
0

This tutorial will guide you through how to send traffic to Telscale jDiameter using Seagull. This test will measure maximum stack performance with no additional computing.

 

Requirements

  • Ensure Java installed
  • Install Seagull as explained HERE – The version used in this tutorial can be found here: http://downloads.sourceforge.net/project/gull/seagull/1.8.2/seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz
  • Ensure that ksh is installed
  • Download the latest version of Telscale-Diameter (Please note that this tutorial will also work for Mobicents-jdiameter)

 

Step 1 – Download and Install Seagull

  • Download seagull as follows: wget http://downloads.sourceforge.net/project/gull/seagull/1.8.2/seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz
  • Extract the content of the  seagull file as follows : tar -xvf seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz
  • This will create a new directory  called packages, cd into the packages directory
  • We are only interested in the rpm files seagull-core and seagull-diameter (You may install all if you so desire)
  • Install the packages as shown below

sudo rpm -ivh seagull-core-1.8.2-linux-2.6-intel.rpm
Preparing...                          ################################# [100%]
Updating / installing...
  1:seagull-core-1.8.2-0             ################################# [100%]

Next install Diameter seagull app

sudo rpm -ivh seagull-diameter-protocol-1.8.2-linux-2.6-intel.rpm
Preparing...                          ################################# [100%]
Updating / installing...
  1:seagull-diameter-protocol-1.8.2-0################################# [100%]

  •  Run the command : seagull
  • You should see an output similar to the one below

seagull]$ seagull
option -conf is mandatory
seagull
 Version tool   : 1.8.2
 Command syntax : 
 -conf <configuration file name> 
 -scen <scenario file name>

 

Step 2  – Download and Install Telscale-Diameter

[INFO] Mobicents :: Diameter :: diameter-parent ........... SUCCESS [  0.485 s]
[INFO] Mobicents :: Diameter Core :: diameter-core-parent . SUCCESS [  0.041 s]
[INFO] Mobicents :: Diameter Stack :: jdiameter-parent .... SUCCESS [  0.040 s]
[INFO] Mobicents :: Diameter Stack :: jdiameter-api ....... SUCCESS [  2.805 s]
[INFO] Mobicents :: Diameter Stack :: jdiameter-impl ...... SUCCESS [  6.583 s]
[INFO] Mobicents :: Diameter Stack HA :: jdiameter-ha-parent SUCCESS [  0.011 s]
[INFO] Mobicents :: Diameter Stack HA :: jdiameter-ha-api . SUCCESS [  0.721 s]
[INFO] Mobicents :: Diameter Stack HA :: jdiameter-ha-impl  SUCCESS [  1.307 s]

  • go to the directory telscale-diameter/examples/
  • Download from the link : wget https://app.box.com/shared/static/zasdgurv1gbsi0jm46kqbwr06gincfas.zip
  • unzip zasdgurv1gbsi0jm46kqbwr06gincfas.zip
  • This will create 2 new directories inside the telscale-diameter/examples/ directory: charging-server-simulator-perf-config  charging-server-simulator-perf-test
  • Go to the directory telscale-diameter/examples/charging-server-simulator-perf-test/
  • Run the command: mvn clean install -Prelease
  • If the build is successfull, you should see the following output:

[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.mobicents.diameter/ already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.163 s
[INFO] Finished at: 2015-07-28T17:16:37-06:00
[INFO] Final Memory: 34M/384M
[INFO] -----------------------------------------------------------------------

  •  The telscale-diameter/examples/charging-server-simulator-perf-test/target/ directory should contain the following jar files

archive-tmp  
classes  
maven-archiver  
mobicents-dcs-b20150728.1716.jar  
mobicents-dcs-b20150728.1716-standalone.jar

 Step 3 – Start the Telscale-jDiameter Server

  • Go to the directory telscale-diameter/examples/charging-server-simulator-perf-test/
  • Start the charging server simulator by running the the command :  java $JAVA_OPTS -jar target/mobicents-dcs-b*-standalone.jar
  • If the server is successfully started you should see a screen similar to the one below showing that the server is listening on the loopback IP 127.0.0.1 and on port 3868

2015-07-28 17:21:55,140 INFO  StackCreator - Diameter Server :: Supporting 0 applications.
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator - ===============================================================================
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator -
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator - == Mobicents Diameter Ro/Rf Server Simulator (Linux/amd64)
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator -
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator - == Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 24.79-b02
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator -
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator - == jDiameter (aaa://127.0.0.1:3868 @ mobicents.org)
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator -
2015-07-28 17:21:55,188 INFO  ChargingServerSimulator - ===============================================================================
2015-07-28 17:21:55,189 INFO  ChargingServerSimulator - Provisioned user 'sip:alexandre@mobicents.org' with [45] units.
2015-07-28 17:21:55,189 INFO  ChargingServerSimulator - Provisioned user 'sip:bbaranowb@mobicents.org' with [123] units.

Step 4 – Start the Seagull Client to Send Traffic to Telscale-jDiameter

  • Open a new bash terminal
  • Go to the directory telscale-diameter/examples/charging-server-simulator-perf-config/seagull/
  • Execute the file : ./ccr-cca-event-client.ksh
  • You will see a screen similar to the one below

telscale-jdiameter-perf-test

Note that the Seagull client will only send 1 call on initialization, to increase the amount of simultaneous calls, press the plus < + > button on your keyboard. To decrease the amount of simultaneous calls, press the  minus< – > button on your keyboard

Step 5 – Changing Default settings

It is possible to change the server binding address from the default loopback 127.0.0.1 to any IP of your choice. The Realm and the IP address must match in both config-server.xml file and the ccr-cca-event-client.xml file

  • Edit the file : telscale-diameter/examples/charging-server-simulator-perf-test/src/main/resources/config-server.xml

<LocalPeer>
    <URI value="aaa://127.0.0.1:3868" />
    <IPAddresses>
      <IPAddress value="127.0.0.1" />
    </IPAddresses>
    <Realm value="mobicents.org" />
....

 <Network>
    <Peers>
      <Peer name="aaa://127.0.0.1:13868" attempt_connect="false" rating="1" />
    </Peers>
    <Realms>
      <Realm name="mobicents.org" peers="127.0.0.1" local_action="LOCAL" dynamic="false" exp_time="1">
        <ApplicationID>

  •  Edit the file telscale-diameter/examples/charging-server-simulator-perf-config/seagull/ccr-cca-event-client.xml

...

<command name="CCR">
      <avp name="Session-Id" value="value_is_replaced"> </avp>
      <avp name="Auth-Session-State" value="0"> </avp>
      <avp name="Origin-Host" value="storm01.mobicents.org"> </avp>
      <avp name="Origin-Realm" value="mobicents.org"> </avp>
      <avp name="Destination-Realm" value="mobicents.org"> </avp>
      <avp name="Destination-Host" value="127.0.0.1"> </avp>
      <avp name="Auth-Application-Id" value="4"></avp>

 

 

 

 

 

 

 

 

 

The post JDiameter – Quick Telscale Diameter Performance Testing Using Seagull appeared first on Telestax Docs Online.


Restcomm – Connecting to French Legos SIP BornSIP Trunk

$
0
0

Restcomm is a next generation Cloud Communications Platform to rapidly build voice and text messaging applications, using mainstream web development skills. Restcomm is a turnkey Cloud Communications solution from Telestax.

Requirements

  • Restcomm running on Amazon Cloud HERE or Standalone version HERE
  • Go to the website of Legos to get an account HERE

Legos will give you the followng configuration information

SIP Trunk Server : XXX.bornsip.XXX
Trunk Authentication Id : AuthenticaionIDXXXXXXXX
Trunk Password : AuthPasswordXXXXXXXXX
Outbound CallerID : CallerIDXXXXXXX

 

Step 1 – Change outbound setting in the read-user-data.sh file

  • Edit the read-user-data.sh  as follows (ONLY FOR RESTCOMM ON AMAZON CLOUD)
  • #Change the Outbound proxy to ” export OUTBOUND_PROXY=$(readUserData OUTBOUND_PROXY ‘XXX.bornsip.XXX’)
  • Disable the Telestax proxy by setting the following line to ‘false’
  • export ACTIVE_PROXY=$(readUserData active_proxy ‘false’)

Step 2 – Edit restcomm.conf file

Go to the $Restcomm_HOME/bin/restcomm/restcomm.conf file and edit the following lines

# Address for outbound calls
OUTBOUND_PROXY=’XXX.bornsip.XXX’
OUTBOUND_PROXY_USERNAME=’AuthenticaionIDXXXXXXX’
OUTBOUND_PROXY_PASSWORD=’AuthPasswordXXXXXXXXX’

Step 3 – Edit restcomm.xml

  • In the $Restcomm_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/restcomm.xml
  • Search for the tag <outboudproxy-user-at-from-header> the value must be set to “true”
  • <outboudproxy-user-at-from-header>true</outboudproxy-user-at-from-header>

Step 4 – Restart Restcomm

  • Restart Restcomm and make a call to a PSTN in France.
  • The CallerID of the SIP phone you use to make the call should be CallerIDXXXXXXX (Provided by Legos)

The post Restcomm – Connecting to French Legos SIP BornSIP Trunk appeared first on Telestax Docs Online.

Restcomm – Sending SMS to an SMPP Endpoint

$
0
0

This tutorial will show how to configure Restcomm to allow messages from any SMPP endpoint through the Telscale SMSC gateway.

 

Requirements

  • Latest Restcomm version
  • Latest Telscale SMSC Gateway
  • You must understand how to Install and run Restcomm and Telscale SMSC Gateway (Install and Start SMSC Gateway)

Step 1 – Configure Restcomm to Use SMPP

Edit the file  $RESTCOMM_HOME//standalone/deployments/restcomm.war/WEB-INF/conf/restcomm.xml

Go to the tag smpp and configure the section as follows:

  • <peerip>192.168.1.3</peerip> – This is the IP address of the Telscale SMSC Gateway
  • sourceAddressMap=”7777″ – This is a simple map used by Restcomm when sending outbound SMS to an SMPP endpoint
  • destinationAddressMap=”6666″– This is the address of the SMPP destination endpoint listening at the address 6666
  • tonNpiValue=”1″ – This used for outbound messages
  • Save and exit the file
  • The changes should be similar to the example below

<!--by default activateSmppConnection is set to false -->

    <smpp class="org.mobicents.servlet.restcomm.smpp.SmppService" activateSmppConnection ="true">
        <connections>
            <connection activateAddressMapping="false" sourceAddressMap="7777" destinationAddressMap="6666" tonNpiValue="1">
				<!-- Name must be unique for each connection -->
				<name>RestcommSmpp</name>
				<systemid>RestcommSmpp</systemid>
				<peerip>192.168.1.3</peerip>
				<peerport>2776</peerport>
				<bindtype>TRANSCEIVER</bindtype>
				<!-- These are optional params -->
				<password>RestcommSmpp</password>
				<systemtype>sms</systemtype>
				<!-- byte value for interface version 0x34 is 3.4, 0x33 is 3.3 and 0x50 
					is 5.0 -->
				<interfaceversion>0x34</interfaceversion>
				<ton>-1</ton>
				<npi>-1</npi>
				<range></range>
				<!-- Default value is 1. The window size is the amount of unacknowledged 
					requests that are permitted to be outstanding/unacknowledged at any given 
					time. If more requests are added, the underlying stack will throw an exception. -->
				<windowsize>1</windowsize>
				<!-- Default value is 60000 milli seconds. This parameter is used to 
					specify the time to wait until a slot opens up in the 'sendWindow'. -->
				<windowwaittimeout>60000</windowwaittimeout>
				<!-- BIND request must be sent within configured timeout in ms -->
				<connecttimeout>10000</connecttimeout>
				<!-- Set the amount of time to wait for an endpoint to respond to a request 
					before it expires. Defaults to disabled (-1). -->
				<requestexpirytimeout>30000</requestexpirytimeout>
				<!-- Sets the amount of time between executions of monitoring the window 
					for requests that expire. It's recommended that this generally either matches 
					or is half the value of requestExpiryTimeout. Therefore, at worst a request 
					would could take up 1.5X the requestExpiryTimeout to clear out. -->
				<windowmonitorinterval>15000</windowmonitorinterval>
				<logbytes>true</logbytes>
				<countersenabled>true</countersenabled>
				<!-- Default value is 30000 milli seconds. When SMPP connects to a remote 
					server, it sends an 'ENQUIRE_LINK' after every configured enquire-link-delay. 
					If no response received for 3 consecutive requests, connection will be killed 
					and attempted to connect again -->
				<enquirelinkdelay>30000</enquirelinkdelay>
			</connection>
			

		</connections>
	</smpp>

 

Step 2 – Configure ESME on the Telscale SMSC Gateway Server

  • Edit the file $SMSC_HOME/server/simulator/data/SmppManagement_esme.xml
  • Append the ESME configuration below to the SmppManagement_esme.xml

<esme name="RestcommSmpp" clusterName="RestcommSmpp" systemId="RestcommSmpp" password="RestcommSmpp" host="-1" port="-1" networkId="0" rateLimitPerSecond="0" rateLimitPerMinute="0" rateLimitPerHour="0" rateLimitPerDay="0" smppBindType="TRANSCEIVER" smppSessionType="SERVER" started="true" smppVersion="3.4" systemType="" ton="-1" npi="-1" addressRange="" windowSize="1" connectTimeout="10000" requestExpiryTimeout="-1" windowMonitorInterval="-1" windowWaitTimeout="60000" countersEnabled="true" enquireLinkDelay="30000" chargingEnabled="false" sourceTon="-1" sourceNpi="-1" sourceAddressRange="7777" routingTon="-1" routingNpi="-1" routingAddressRange="7777" useSsl="false" keyManagerFactoryAlgorithm="SunX509" keyStoreType="JKS" maxCertPathLength="-1" needClientAuth="false" protocol="TLS" sslSessionCacheSize="0" sslSessionTimeout="0" trustManagerFactoryAlgorithm="PKIX" trustStoreType="JKS" wantClientAuth="false" allowRenegotiate="true" enableCRLDP="false" sessionCachingEnabled="true" trustAll="true" validateCerts="false" validatePeerCerts="false"/>

  •  The SmppManagement_esme.xml file should now contain 2 esme configurations named respectively “test” and “RestcommSmpp
  • Save and exit the file SmppManagement_esme.xml file

Step 3 – Start Telscale SMSC Gateway

  • Make sure the Cassandra DB is already started and configured as explained HERE
  • Start the Telscale SMSC gateway as follows :  $SMSC_HOME/bin/run.sh -b 192.168.1.3 -c simulator
  • Open your web browser and go to the url : http://192.168.1.3:8080/smsc-management/

Enter the default credentials as follows:

  • username : admin
  • passwood : admin

On the left side pane of the screen, click on ESMEs. This will show the 2 ESMEs configured in the SmppManagement_esme.xml as explained in Step 2. See the screenshot below:

restcomm-smpp-esme-config

Step 4 – Start Restcomm and the Media Server

  • Start media server by running the command  :  $RESTCOMM_HOME/mediaserver/bin/run.sh -b 192.168.1.3
  • Start Restcomm by running the command below:
  • $RESTCOMM_HOME/bin/standalone.sh -b 192.168.1.3 -Djboss.socket.binding.port-offset=100

 Note

We are using an offset to avoid port conflict as Restcomm and the Telscale SMSC are running on the same machine


 

If Restcomm is successfully started, you should see the following in the console

10:43:37,136 INFO [org.mobicents.servlet.restcomm.smpp.SmppService] (RestComm-akka.actor.default-dispatcher-5) checking if to use SMPP connection set to : true
10:43:37,140 INFO  [org.mobicents.servlet.restcomm.telephony.proxy.ProxyManagerProxy] (ServerService Thread Pool -- 54) ProxyManagerProxy sip servlet initialized. Will proceed to create ProxyManager
10:43:37,147 INFO  [org.mobicents.servlet.restcomm.smpp.SmppService] (RestComm-akka.actor.default-dispatcher-4) creating new SMPP connection Smpp [name=RestcommSmpp, systemId=RestcommSmpp, peerIp=192.168.1.3, peerPort=2776, smppBindType=TRANSCEIVER, password=RestcommSmpp, systemType=sms, interfaceVersion=52, address=null, connectTimeout=10000, windowSize=1, windowWaitTimeout=60000, requestExpiryTimeout=30000, windowMonitorInterval=15000, countersEnabled=true, logBytes=true, enquireLinkDelay=30000]

In the Telscale SMSC gateway console, you will see the following:

New channel from [192.168.1.3:60966]
10:44:07,530 INFO  [UnboundSmppSession] (SmppManagement.UnboundSession.192.168.1.3:60966) received PDU: (bind_transceiver: 0x0000002F 0x00000009 0x00000000 0x00000001) (body: systemId [RestcommSmpp] password [RestcommSmpp] systemType [] interfaceVersion [0x34] addressRange (0x00 0x00 [])) (opts: )
10:44:07,560 INFO  [DefaultSmppServerHandler] (SmppManagement.UnboundSession.192.168.1.3:60966) Session created: Name=RestcommSmpp SysemId=RestcommSmpp

 Step 5 – Start the SMPP Simulator

  • Start the SMPP simulator as follows : $SMSC_HOME/tools/TelScale-smpp-simulator/bin/run.sh
  • Click on the button : Configure
  • In the “SMPP General Parameters” window, delete the “6666” in the “Esme Address Range Field
  • Click on the button “Ok” to validate the changes (Screenshot below)

smsc-simulator

Click on the button “Run test” – In the window, click on the button “Start a session”. Make sure the session is successfully started

restcomm-smsc-simulator2

 Step  6 – Send an SMS from a SIP Phone through Restcomm to the SMPP endpoint

  • Start any SIP phone of you choice that is capable of sending SMS.
  • Send an SMS to the following address : sip:smpp@192.168.1.3:5180 (See screenshot below)

 Note

The default Restcomm port is 5080, but we are using 5180 because we started Restcomm using an offset of 100

  • If you know the SMPP endpoint address, you may also send an SMS using the format : smpp6666@Restcomm_IP:Port
  • Restcomm will bypass the parameter destinationAddressMap=”6666″ in the restcomm.xml and use the destination address 6666. This allows you to send an SMS on the fly to any SMPP endpoint as long as you have the destination addresss

 

restcomm-smsc-simulator3

If the message is successfully sent, you will see the result in the SMPP endpoint (Screenshot below)

restcomm-smsc-simulator4

 Step 7 – Sending Messages from SMPP Endpoint to Restcomm.

  • Open your web browser and go to the url //192.168.1.3:8180
  • Note: The url is using an offset of the port. The default port is 8080
  • Click on the tab “Visual Designer”
  • Login to the Visual Designer and choose the SMS button to create an SMS project

restcom-smpp1

Create an SMS project similar to the one in the screenshot below:

restcomm-smpp2

  •  Save the project
  • Go to the Management GUI and attach a number to the newly created SMS application
  • Our SMPP endpoint will send Messages to the address 7777.
  • Create the number 7777 and attach it to the SMS application (Screenshot below)

restcomm-smpp3

  •  Send a message from the SMPP simulator to Restcomm using the
  • Click the “Configure data for a message submitting”

restcomm-smpp4

In the SMPP message parameters window

  • Change the “Destination address” to 7777
  • Change the “Messaging mode” to datagramm
  • Leave the rest as default and press the button OK to validate your changes

 

restcomm-smpp5

  • Press the button “Submit a message”  to send the SMPP message to Restcomm
  • To see the result, go to the Restcomm Management GUI =>Logs => Messages

restcomm-smpp6

 

 

 

The post Restcomm – Sending SMS to an SMPP Endpoint appeared first on Telestax Docs Online.

Restcomm – Connecting SMPP Endpoint through Nexmo

$
0
0

Restcomm latest iteration comes with SMPP integration that allows sending messages from multiple SMPP endpoints. This tutorial will explain how to connect Restcomm SMPP to Nexmo. If you want to learn how to connect Restcomm SMPP to Telscale SMSC gateway, see more HERE

Requirements

  • Latest version of Restcomm
  • Nexmo Account

 

Step 1 – Get Nexmo Account Details

Go into your Nexmo account dashboard and get the following data

  • In the screenshot below, you need the
  • Callback System-type = text

 

restcomm-smpp-nexmo

You also need the API Settings

  • Key :
  • Secret :

 

restcomm-smpp-nexmo2

You also need to get the Nexmo gateway and the port as explained   HERE

 

Step 2 – Configure Restcomm to Use Nexmo SMPP

Go to $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/restcomm.xml

Find the section <smpp> section and configure as shown below

Activate as follows

  • activateSmppConnection = “true”

Set the systemid using the Key of the API

  • <systemid>XXXX</systemid>

Set the peerip with the Nexmo Gateway

  • <peerip>smpp0.nexmo.com</peerip>

Set the peerport using the Nexmo default port as follows

  • <peerport>8000</peerport> 

Set the <password> using the Nexmo API Secret

  • <password>XXXX</password>

Set the <systemtype> of Nexmo (This is required for inbound SMS)

  • <systemtype>text</systemtype>

The final configuration should look like the one below. You can leave the rest as default

<smpp class="org.mobicents.servlet.restcomm.smpp.SmppService" activateSmppConnection ="true">
        <connections>
            <connection activateAddressMapping="false" sourceAddressMap="7777" destinationAddressMap="6666" tonNpiValue="1">
				<!-- Name must be unique for each connection -->
				<name>RestcommSmpp</name>
				<systemid>xxxxx</systemid>
				<peerip>smpp0.nexmo.com</peerip>
				<peerport>8000</peerport> <!--2776-->
				 <bindtype>TRANSCEIVER</bindtype>
				<!-- These are optional params -->
				<password>xxxxx</password>
				<systemtype>text</systemtype>

 

Step 3 – Start Restcomm and Send inbound Messages

  • Start Restcomm and make sure SMPP is correctly bound to Nexmo
  • Create a new RVD Application and attach your Nexmo Number to the application (See below)

restcomm-smpp-nexmo3

  • See the screenshot below (The number below is the one to attach to your RVD application)

restcomm-smpp-nexmo

 

  • Send an SMS message to the Number registered in your Nexmo Dashboard.
  • The Nexmo Callback System-type setting lets Nexmo know that the message should be sent to Restcomm

Step 4 – Send Outbound SMS through Nexmo SMPP

To send an outbound message through Restcomm SMPP endpoint, you must prepend the number with the “smpp”

Example, if you want to send an SMS to the number 3399999999, you send it to smpp3399999999@RESTCOMM_IP:5080

The prepended smpp tells Restcomm to use SMPP instead of SIP to forward the message

See screenshot below

restcomm-smpp-nexmo5

 

 

 

 

 

The post Restcomm – Connecting SMPP Endpoint through Nexmo appeared first on Telestax Docs Online.

SMSC – How to Run Load Test

$
0
0

This tutorial will show you how to run Load Test on Telscale SMSC Gateway.

Amazon Cloud Server specification

Model vCPU Mem (GiB) SSD Storage (GB) Dedicated EBS Throughput (Mbps)
m4.2xlarge 8 32 EBS-only 1,000

Server configuration

  • Java version JDK version 7
  • Install screen
  • Install ant
  • Telscale version Telscale-smsc-6.2.2.672
  • Cassandra apache-cassandra-2.0.17-src.tar.gz
  • JAVA_OPTS=”-Xms12g -Xmx12g -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000″

 

You must have screen install on the server in order to be able to toggle between multiple process window.

Load Test Telscale SMSC and Cassandra DB on the Same Server

Step 1 – Monitor CPU and Memory Usage

  • screen -S cpu
  • run command top

Step 2 – Configure and Start Cassandra DB

  • screen -S cassandra
    change log to WARN
  • Edit the file  /root/apache-cassandra-2.0.16/conf/log4j-server.properties
    # output messages into a rolling log file as well as stdout
    log4j.rootLogger=WARN,stdout,R
  • Got to /root/apache-cassandra-2.0.16/bin
  • Start cassandra as follows
    ./cassandra -f 

Step 3 – Configure and Start Telscale SMSC

  • screen -S smsc
  • Edit the file /root/TelScale-smsc-6.2.2.695/jboss-5.1.0.GA/server/simulator/conf/jboss-log4j.xml
    change all INFO value to WARN
  • Go to the directory /root/TelScale-smsc-6.2.2.695/jboss-5.1.0.GA/bin
    ./run.sh -b 172.30.1.87 -c simulator

This will start SMSC in simulator mode and bind it to the local IP address of the server

Step 4 – Start Packet Trace with TCPDUMP

  • screen -S tcpdump
  • sudo tcpdump -i any -w filename1.000.000.pcap -s 0 -vvv

Step 5 – Start HLR

  • screen -S hlr
  • Go to the directory /root/TelScale-smsc-6.2.2.695/tools/TelScale-hlr-simulator/bin/
  • Edit the file telestax-license.xml
  • Add some random text in the tag <licenseKey>testlicense</licenseKey>
  • Start the HLR tool as follows
  • ../run.sh

Step 6 – Configure Smpp Load and Send Traffic

  • screen -S load
  • Go to /root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/
  • Edit the file /root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/build.xml
  • Set the amount of SMSC to send as follows (below we shall be sending 1 million messages)
  • change the setting in the file build.xml
    <!– SUBMIT_SM to send –>
    <arg value=”1000000″ />

Result of Sending 1 Million SMS

client:
     [echo] /root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/smpp-load-6.2.2.695.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/ch-smpp-5.0.7.GA-TelScale.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/netty-3.9.0.Final.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/slf4j-api-1.5.6.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/slf4j-log4j12-1.5.6.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/ch-commons-charset-3.0.2.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/ch-commons-util-6.0.1.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/joda-time-2.6.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/target/load/log4j-1.2.14.jar:/root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/src/main/resources
   [delete] Deleting directory /root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/client
    [mkdir] Created dir: /root/TelScale-smsc-6.2.2.695/tools/TelScale-smpp-load/client
     [java] Input Stream = sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@1b8f2e35
     [java] 0    [main] INFO  org.mobicents.protocols.smpp.load.Client  - sessionCount=1
     [java] 4    [main] INFO  org.mobicents.protocols.smpp.load.Client  - windowSize=10000
     [java] 4    [main] INFO  org.mobicents.protocols.smpp.load.Client  - submitToSend=1000000
     [java] 5    [main] INFO  org.mobicents.protocols.smpp.load.Client  - startDestNumber=9960200000
     [java] 5    [main] INFO  org.mobicents.protocols.smpp.load.Client  - destNumberDiff=10000
     [java] 6    [main] INFO  org.mobicents.protocols.smpp.load.Client  - endDestNumber=9960210000
     [java] 6    [main] INFO  org.mobicents.protocols.smpp.load.Client  - sourceNumber=6666
     [java] 6    [main] INFO  org.mobicents.protocols.smpp.load.Client  - peerAddress=127.0.0.1
     [java] 7    [main] INFO  org.mobicents.protocols.smpp.load.Client  - peerPort=2776
     [java] 7    [main] INFO  org.mobicents.protocols.smpp.load.Client  - systemId=test
     [java] 8    [main] INFO  org.mobicents.protocols.smpp.load.Client  - password=test
     [java] 8    [main] INFO  org.mobicents.protocols.smpp.load.Client  - message=Hello World
     [java] 96   [main] INFO  org.mobicents.protocols.smpp.load.Client  - Waiting up to 7 seconds for all sessions to bind...
     [java] 402  [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sending signal to start test...

[java] 624643 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 624653 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 624656 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=1000000 expired=0 response=1000000 avgWaitTime=0.5ms avgResponseTime=6030.1ms avgEstimatedProcessingTime=0.2ms cmdStatus=[0=1000000]]
     [java] 624657 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 624661 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 624661 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 624662 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 624662 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 624663 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 624258 ms
     [java] 624663 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 1000000
     [java] 624663 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 1000000
     [java] 624664 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 624666 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1601.902 per sec
     [java] 624667 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=1000000 expired=0 response=1000000 avgWaitTime=0.5ms avgResponseTime=6030.1ms avgEstimatedProcessingTime=0.2ms cmdStatus=[0=1000000]]
     [java] 624667 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 624675 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 10 minutes 25 seconds

Notice the result.

  • Average of 1601 message per second

Result of Sending 500.000 SMS

Edit build.xml file

<!– SUBMIT_SM to send –>
<arg value=”500000″ />

Sending signal to start test...
     [java] 297830 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 297839 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 297842 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=500000 expired=0 response=500000 avgWaitTime=0.4ms avgResponseTime=5740.0ms avgEstimatedProcessingTime=0.1ms cmdStatus=[0=500000]]
     [java] 297843 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 297847 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 297847 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 297848 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 297848 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 297848 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 297694 ms
     [java] 297849 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 500000
     [java] 297849 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 500000
     [java] 297849 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 297851 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1679.577 per sec
     [java] 297852 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=500000 expired=0 response=500000 avgWaitTime=0.4ms avgResponseTime=5740.0ms avgEstimatedProcessingTime=0.1ms cmdStatus=[0=500000]]
     [java] 297852 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 297857 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 4 minutes 59 seconds

Notice the result.

  • Average of 1679 message per second

Result of Sending 100.000 SMS

Edit build.xml file

<!– SUBMIT_SM to send –>
<arg value=”100000″ />

Sending signal to start test...
     [java] 58146 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 58154 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 58157 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=100000 expired=0 response=100000 avgWaitTime=0.4ms avgResponseTime=5214.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=100000]]
     [java] 58158 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 58162 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 58162 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 58163 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 58163 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 58163 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 57999 ms
     [java] 58164 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 100000
     [java] 58164 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 100000
     [java] 58165 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 58169 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1724.168 per sec
     [java] 58170 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=100000 expired=0 response=100000 avgWaitTime=0.4ms avgResponseTime=5214.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=100000]]
     [java] 58170 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 58176 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 59 seconds

Notice the result.

  • Average of 1724 message per second

Result of Sending 100.000 SMS

Edit build.xml file

<!– SUBMIT_SM to send –>
<arg value=”50000″ />

Sending signal to start test...
     [java] 20771 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 20780 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 20782 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=50000 expired=0 response=50000 avgWaitTime=0.2ms avgResponseTime=2954.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=50000]]
     [java] 20782 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 20786 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 20786 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 20787 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 20787 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 20787 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 20634 ms
     [java] 20788 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 50000
     [java] 20788 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 50000
     [java] 20789 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 20790 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 2423.185 per sec
     [java] 20790 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=50000 expired=0 response=50000 avgWaitTime=0.2ms avgResponseTime=2954.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=50000]]
     [java] 20791 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 20797 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 21 seconds

Notice the result.

  • Average of 2423 message per second

 

Result from Packet Tcpdump

SMPP Operations Summary

smpp-summary-load-test

GSM Map Operations

 

gsm-operations-summary

 

Result CPU Usage

CPU usage constantly oscillated between 55 and 60 percent

smsc-load-1.000.000

SMSC Metrics from the Telscale SMSC Admin UI

 

smsc-metrics

 

 

smsc-metrics2

 

Load Test Telscale SMSC and Cassandra DB on Separate Servers

On the first server that will host the Cassandra DB, you need to make modifications to the /root/apache-cassandra-2.0.16/conf/cassandra.yaml to allow Cassandra DB to bind to a routable IP instead of the localhost.

Change
  • listen_address: localhost
  • rpc_address: localhost
to the local IP address of the server ex.
  •  listen_address: 172.30.1.160
  • rpc_address: 172.30.1.160
Start Cassandra as mentioned above in Step 2
On the server that will host Telscale SMSC Gateway, you must point to the IP address of the Cassandra server to which the SMSC gateway  must connect.
  • Edit the file /TelScale-smsc-6.2.2.664/jboss-5.1.0.GA/server/simulator/data/SmscManagement_smscproperties.xml
  • Search for this line <dbHosts value=”127.0.0.1″/>
  • Change the loopback “127.0.0.1” IP to the IP address of the Cassandra DB server.

 

If you are on Amazon EC2, make sure your Security Group allows the appropriate ports and traffic between SMSC gateway and Cassandra DB using the local IP address


 

Result of Sending 1.000.000 SMS

  • 1 minute 30 seconds slower due to Network Latency
  • Throughput: 1420.067 per sec which is about 200 messages lesser and running both SMSC and Cassandra on the same server

 

Sending signal to start test...
     [java] 704331 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 704339 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 704342 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=1000000 expired=0 response=1000000 avgWaitTime=0.5ms avgResponseTime=6904.1ms avgEstimatedProcessingTime=0.3ms cmdStatus=[0=1000000]]
     [java] 704343 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 704346 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 704346 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 704346 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 704347 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 704347 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 704192 ms
     [java] 704347 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 1000000
     [java] 704347 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 1000000
     [java] 704348 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 704349 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1420.067 per sec
     [java] 704350 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=1000000 expired=0 response=1000000 avgWaitTime=0.5ms avgResponseTime=6904.1ms avgEstimatedProcessingTime=0.3ms cmdStatus=[0=1000000]]
     [java] 704350 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 704355 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 11 minutes 45 seconds

 

Result of Sending 500.000 SMS

 

Sending signal to start test...
     [java] 378225 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 378238 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 378242 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=500000 expired=0 response=500000 avgWaitTime=0.5ms avgResponseTime=7379.5ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=500000]]
     [java] 378243 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 378247 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 378248 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 378248 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 378248 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 378249 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 378095 ms
     [java] 378249 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 500000
     [java] 378250 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 500000
     [java] 378250 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 378253 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1322.419 per sec
     [java] 378253 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=500000 expired=0 response=500000 avgWaitTime=0.5ms avgResponseTime=7379.5ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=500000]]
     [java] 378254 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 378262 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 6 minutes 19 seconds

Result of Sending 100.000 SMS

[java] 68273 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - before waiting sendWindow.size: 0
     [java] 68283 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session rx-submitSM[request=0 expired=0 response=0 avgWaitTime=0.0ms avgResponseTime=0.0ms avgEstimatedProcessingTime=0.0ms cmdStatus=[]]
     [java] 68291 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - Final Session tx-submitSM[request=100000 expired=0 response=100000 avgWaitTime=0.4ms avgResponseTime=6317.9ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=100000]]
     [java] 68292 [pool-5-thread-1] INFO  org.mobicents.protocols.smpp.load.Client  - after waiting sendWindow.size: 0
     [java] 68304 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Performance client finished:
     [java] 68305 [main] INFO  org.mobicents.protocols.smpp.load.Client  -        Sessions: 1
     [java] 68305 [main] INFO  org.mobicents.protocols.smpp.load.Client  -     Window Size: 10000
     [java] 68305 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Sessions Failed: 0
     [java] 68306 [main] INFO  org.mobicents.protocols.smpp.load.Client  -            Time: 68131 ms
     [java] 68306 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Target Submit: 100000
     [java] 68307 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Actual Submit: 100000
     [java] 68307 [main] INFO  org.mobicents.protocols.smpp.load.Client  -   Throttled Message count: 0
     [java] 68309 [main] INFO  org.mobicents.protocols.smpp.load.Client  -      Throughput: 1467.761 per sec
     [java] 68310 [main] INFO  org.mobicents.protocols.smpp.load.Client  -  Session 0: submitSM [request=100000 expired=0 response=100000 avgWaitTime=0.4ms avgResponseTime=6317.9ms avgEstimatedProcessingTime=0.0ms cmdStatus=[0=100000]]
     [java] 68310 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Shutting down client bootstrap and executors...
     [java] 68317 [main] INFO  org.mobicents.protocols.smpp.load.Client  - Done. Exiting

BUILD SUCCESSFUL
Total time: 1 minute 9 seconds

 

Conclusion

From the load test conducted using Telscale SMSC Gateway and Cassandra DB, there is a 50 percent increase in SMS throughput when log4 settings are changed from INFO to WARN. This change also prevents the server logs from using up all the available disk space.

Putting the Cassandra DB on a different server doesn’t seem to change the amount of CPU cycle. It often oscillate between 55 to 60 percent CPU usage when under heavy load. Another reason for the high CPU usage is because the SMPP and HLR load test clients ran on the same server as the SMSC gateway. Moving the Cassandra DB to a different server didn’t impact CPU usage.

When the Cassandra DB was moved to a different server on the same Amazon Cloud, there was a decrease in SMS throughput which can be attributed to network latency.

Here is a Table of SMS throughput summary of the results

 

Everything on a Single Server DB on a Separate Server
Amount of SMS Processed SMS throuhput per second SMS throuhput per second Difference Decrease %
1 Million 1679.577 1420.067 259.51 15.45091413
500 Thousand 1724.168 1322.419 401.749 23.30103563
100 Thousand 2423.185 1467.761 955.424 39.42843819

 

 

 

The post SMSC – How to Run Load Test appeared first on Telestax Docs Online.

Ussd – How to Create an App that Returns to Main Menu

$
0
0

This quick tutorial will show how to solve the following USSD application scenario.

A user can go back to the root menu after receiving the result of his chosen menu.  For example, the Main menu says

  • Press 1 for account balance and press 2 for weather report.
  • User chooses 1 and gets account balance. Can the user go back to the main menu and choose another option?

 

Here is a quick USSD Restcomm app built with the RVD that will explain how to go back to the main menu.

 

Step 1 – Create a Welcome Main Module in the RVD

ussd-return-main-menu

 

Step 2 –  Create a Module to hold the first Menu Option

Note that the module Account Balance uses the USSD Collect verb to send a reply and also allow user to return to the main menu

ussd-return-main-menu2

Step 3 – Create a Module to hold the second Menu Option

Note that the module Account Balance uses the USSD Collect verb to send a reply and also allow user to return to the main menu

ussd-return-main-menu3

You can save the application and assign a USSD number in the Restcomm main Dashboard GUI. The assigned SIP number must be in the format (ex. *1234#)

 

 

 

 

 

The post Ussd – How to Create an App that Returns to Main Menu appeared first on Telestax Docs Online.

Ussd – General Overview Videos and Restcomm Integration

SMSC – Running USSD, SMSC and Restcomm on the Same Server

$
0
0

In most cases, products like USSD, SMSC and Restcomm will be installed on different servers for performance gain. However, in some pre-production environment, it might be necessary to have all 3 products installed and running on the same physical server. Below are a few configuration details to take into consideration.

Step 1 – Configuring SMSC

  • Start SMSC server as normal as explained HERE
  • SMSC will use port 8080 to access the GUI dashboard
  • SMSC will use port 5060 to Listen for SIP messages
  • SMSC will use port 3435 for the CLI shell (See HERE for how to use the CLI Shelf)

 

Step 2 – Configuring USSD and Using Port Offset

 

USSD uses at the above ports that are now already in use by SMSC. You will need to use an off to start USSD

  • Start USSD in default mode as follows (This will offset the default port by 200)
  • $USSD_HOME/jboss-5.1.0.GA/bin# ./run.sh -b IP_ADDRESS  -Djboss.service.binding.set=ports-02
  • You may also use add the parameters (-c simulator) to start USSD in simulator mode as follows:
  • $USSD_HOME/jboss-5.1.0.GA/bin# ./run.sh -b IP_ADDRESS -c simulator -Djboss.service.binding.set=ports-02
  • The USSD GUI will be accessible as http://IP_ADDRESS:8280/ussd-management
  • The JSS7 console will be available at http://IP_ADDRESS:8280/jss7managementconsole

 

USSD SIP PORT

 

You need to change the default SIP port 5060 to an offset (200) that will match the above for easier management (You can use any offset of your choice if you which)
  • Go to  USSD_HOME/server/default (or “simulator”)/deploy/sip11-ra-DU-6.1.2.GA-TelScale.jar.
  • Extract the content of the file like this : jar xf sip11-ra-DU-6.1.2.GA-TelScale.jar.
  • (Note the version of the jar file above might be different)
  • Edit the file  META-INF/deploy-config.xml
  • Look for the line –  <property name=”javax.sip.PORT” type=”java.lang.Integer” value=”5060″ />
  • change the value=”5060” to value=”5260
  • Save the file
  • create a new jar archive as follows
  • “jar cf sip11-ra-DU-6.1.2.GA-TelScale.jar jars META-INF”
(The above steps can also be used to offset the default SIP port for SMSC)

USSD Command Line Interface (CLI) Shell Port

You need to change the default CLI port 3435 to an offset (200) that will match the above for easier management (You can use any offset of your choice if you which)
  • Edit the file  USSD_HOME/server/default (or “simulator“)/deploy/telscale-ussd-server/META-INF/jboss-beans.xml.
  • Look for the line “<bean name=”ShellExecutor“”.
  • Under the  parameter “<property name=”port”>3435</property>“.
  • Change the port “<property name=”port”>3435</property> to “<property name=”port”>3635</property>
  • Save and exit the file
  • Access the USSD command line interface as follows
  • Execute :  $USSD_HOME/jboss-5.1.0.GA/bin/ss7-cli.sh
  • Execute the following command to acccess the CLI : connect IP_ADDRESS 3645
(Note that you need to specify the IP address and the new port offset)
(The above steps can also be used to offset the default CLI Port for SMSC)

Other Ports to take into consideration

SMSC Gateway listerns for incoming SMPP connections (SMPP server port) on the default port value of 2776.
  • You might need to change the ports if you have multiple server instances.
  • Go to http://IP_ADDRESS:8080/smsc-management/#
  • Go to SMPP Server – Port
  • On the CLI shelf
  • Execute –  smppserver set port <port>
  • Restart SMPP server (using the GUI) or you may restart the SMSC Gateway
You also need to consider using different ports for multiple instances when using  SS7 SCTP.

Step 3 – Configuring  Restcomm Using Port Offset

 

By default Restcomm uses port 8080 for the Admin UI and ports 508x  for communication. In order to avoid conflicts with the 2 previously configured products (USSD and SMSC)

 

  • Edit the file RESTCOMM_HOME/bin/restcomm/start-restcomm.sh
  • Search for the section

'standalone'*)
                        # start restcomm on standalone mode
                        chmod +x $RESTCOMM_HOME/bin/standalone.sh
                        echo 'TelScale RestComm started running on standalone mode. Screen session: restcomm.'
                        echo "Using IP Address: $BIND_ADDRESS"
                        if [[ "$RUN_DOCKER" == "true" || "$RUN_DOCKER" == "TRUE" ]]; then
                                $RESTCOMM_HOME/bin/standalone.sh -b $bind_address
                        else
                                screen -dmS 'restcomm' $RESTCOMM_HOME/bin/standalone.sh -b $bind_address
                        fi
                        ;;

  • Change the line

screen -dmS 'restcomm' $RESTCOMM_HOME/bin/standalone.sh -b $bind_address

  • to the following

screen -dmS 'restcomm' $RESTCOMM_HOME/bin/standalone.sh -b $bind_address -Djboss.socket.binding.port-offset=100

  • Save and exit the file RESTCOMM_HOME/bin/restcomm/start-restcomm.sh

 

(The following section might not be needed as Restcomm doesn’t use the default SIP port 5060. However, it might be useful in case there are other port conflicts)

 

 

Open and Edit the file RESTCOMM_HOME/standalone/configuration/standalone-sip.xml
  • Got to the section

<subsystem xmlns="urn:org.mobicents:sip-servlets-as7:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
            <connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5080"/>
            <connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5080"/>
            <connector name="sip-tls" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tls" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5081"/>
            <connector name="sip-ws" protocol="SIP/2.0" scheme="sip" socket-binding="sip-ws" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5082"/>
        </subsystem>

  • Change all the ports from 508x to 518x as follows

<subsystem xmlns="urn:org.mobicents:sip-servlets-as7:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
            <connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5180"/>
            <connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5180"/>
            <connector name="sip-tls" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tls" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5181"/>
            <connector name="sip-ws" protocol="SIP/2.0" scheme="sip" socket-binding="sip-ws" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5182"/>
        </subsystem>

  • Save and exit the file
  • Restart Restcomm

The post SMSC – Running USSD, SMSC and Restcomm on the Same Server appeared first on Telestax Docs Online.


Restcomm – Connecting to Bandwidth for DID Calls

$
0
0

This tutorial is about how to connect Restcomm to Bandwidth and provision DIDs. Restcomm uses ports 5080 for SIP traffic while Bandwidth expects to receive traffic on port 5060.

Normal SIP traffic will work using a SIP phone (ex sip:DID@RESTCOMM_IP:5080) but making a call from a PSTN to a DID provisioned by Bandwidth will not work as Restcomm replies using a different port.

Step 1 – Configure Restcomm IP Address

Please see the instruction HERE

Step 2 – Configure Restcomm to use Bandwidth

Edit the file $RESTCOMM_HOME/bin/restcomm/restcomm.conf

Look for the section below and add your Bandwidth connection details

# DID Provision provider variable declarations
PROVISION_PROVIDER='BW'               # values: VI (VoipInnovation), BW (Bandwidth), NX (Nexmo), VB (Voxbone)
#Username and password for all supported DID provision providers
DID_LOGIN='YOUR_BANDWIDTH_LOGIN'
DID_PASSWORD='YOUR_BANDWIDTH_PWD'

Save and exit file

Step 3 – Configure standalone-sip.xml to use 5060 instead of 5080

Open and Edit the file RESTCOMM_HOME/standalone/configuration/standalone-sip.xml
  • Got to the section

<subsystem xmlns="urn:org.mobicents:sip-servlets-as7:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
            <connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5080"/>
            <connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5080"/>
            <connector name="sip-tls" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tls" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5081"/>
            <connector name="sip-ws" protocol="SIP/2.0" scheme="sip" socket-binding="sip-ws" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5082"/>
        </subsystem>

  • Change all the ports from 508x to 518x as follows

<subsystem xmlns="urn:org.mobicents:sip-servlets-as7:1.0" application-router="configuration/dars/mobicents-dar.properties" stack-properties="configuration/mss-sip-stack.properties" path-name="org.mobicents.ext" app-dispatcher-class="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" concurrency-control-mode="SipApplicationSession" congestion-control-interval="-1">
            <connector name="sip-udp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-udp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5060"/>
            <connector name="sip-tcp" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tcp" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5060"/>
            <connector name="sip-tls" protocol="SIP/2.0" scheme="sip" socket-binding="sip-tls" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5061"/>
            <connector name="sip-ws" protocol="SIP/2.0" scheme="sip" socket-binding="sip-ws" use-static-address="true" static-server-address="192.168.1.3" static-server-port="5062"/>
        </subsystem>

  • Save and exit the file
  • Restart Restcomm

Making future SIP Calls

You will now need to use port 5060 to make calls from a SIP phone as follows: sip:DID@RESTCOMM_IP:5060

 

The post Restcomm – Connecting to Bandwidth for DID Calls appeared first on Telestax Docs Online.

USSD – How to Configure Multi-tenancy and Initiate SCTP Session

$
0
0

This tutorial will show you how to start the Telscale USSD Gateway and make it act as a CLIENT that will initiate SCTP connection. You will also learn how to configure Telscale USSD Gateway to connect to 2 operators in a multi-tenancy setup.

Requirements

  • It is assumed you are familiar with the basics of SS7 topology and Telscale USSD Gateway
  • You have installed Telscale USSD Gateway version TelScale-ussd-6.2.1.257 or higher
  • You have installed LKSCTP on your server
  • You have Java JDK 1.7x installed

Network Diagram for this tutorial

Telscale USSD Multi-tenancy setup

 

Step 1 – Start Telscale USSD and Connect to the SS7 Command Line Interface

  • Go to $USSD_HOME/jboss-5.1.0.GA/bin/run.sh -b 192.168.1.3

Connect to the SS7 command line window

  • $USSD_HOME/jboss-5.1.0.GA/bin/ss7-cli.sh

This will show an output similar to the one be

  • version=6.2.5.GA-TelScale,name=TelScale CLI,prefix=telscale,vendor=TeleStax
    telscale>

At the telscale> prompt, connect to the USSD server on IP 192.168.1.3 and on port 3435

  • telscale>connect 192.168.1.3 3435
  • Enter the Username : admin
  • Enter the Password : admin

Step 2 – Create a New Global Title and New Network ID

Got to ss7 command line terminal as mentioned in Step 1 and create a new Global Title for Network ID 1

  • telscale>ussd set ussdgt 923330053059 1

Check to make sure you now have 2 new GT and Network ID

  • telscale(192.168.1.3:3435)>ussd get ussdgt
    ussdgt = networkId=0 – GT=923330053058
    networkId=1 – GT=923330053059

You should now see the new Global Title and Network ID 1 you created above and the default Global Title and Networkd ID 0

Step 3 – Create Short Code Routing Rules

telscale(192.168.1.3:3435)>ussd scrule create *519# http://192.168.1.3:8080/ussddemo/test true HTTP 1
telscale(192.168.1.3:3435)>ussd scrule create *666# http://192.168.1.3:8080/ussddemo/test true HTTP 0

http://192.168.1.3:8080/ussd-management/#

Under Routing Rules, you should see something similar to the screenshot below

Ussd_Short_code_routing_rules

 

Step 4 – Create SCTP Associations as CLIENTS

This step will ensure that the USSD will act as a client an initiate SCTP connect to Mobile Operators

SCTP association for Operator 1

  • telscale(192.168.1.3:3435)>sctp association create ass1 CLIENT 192.168.1.3 8011 192.168.1.3 8012 ​

SCTP association for Operator 2

  • telscale(192.168.1.3:3435)>sctp association create ass2 CLIENT 192.168.1.14 9011 192.168.1.3 9012

 

You can check the SCTP associations from the GUI by going to the following IP Address

  • http://192.168.1.3:8080/jss7-management-console/#
  • Click on : SCTP ->SCTPManagement -> Associations

Screenshot of the 2 Associations created above

SCTP_ASS1

 

Association 2

SCTP_ass2

 

Step 5 – Create M3UA  connection to be linked to the Associations created in the previous step

You have to create Application Server, then, create Application Server Process,

Create Application Server with Routing Context 102,Network Appearance 103 and IP Server Process (IPSP)

  • telscale(192.168.1.3:3435)>m3ua as create as1 IPSP mode SE rc 102 traffic-mode loadsharing network-appearance 103

Create Application Server Process and Link it to the SCTP Association created in step 3  above

  • telscale(192.168.1.3:3435)>m3ua asp create asp1 ass1

Link the Application Server Process (ASP) above to the Application Server (AS)

  • telscale(192.168.1.3:3435)>m3ua as add as1 asp1

Start the Application Server Process

  • telscale(192.168.1.3:3435)>m3ua asp start asp1

Create a route for the Application Server  Destination Point Code is 1, Originating Point Code is 2 and the Service Indicator is 3

  • telscale(192.168.1.3:3435)>m3ua route add as2 1 2 3

NOTE: The DPC 1 (Destination Point Code) must match the SPC from Operator 1 (see network diagram above) – The OPC 2 (Originating Point Code) must match the (OPC) of the USSD Gateway (see network diagram above). the Service Indicator 3 tells the system to use SCCP for routing.

You must create the same steps for Operator 2

  1. telscale(192.168.1.3:3435)>m3ua as create as2 IPSP mode SE rc 102 traffic-mode loadsharing network-appearance 101
  2. telscale(192.168.1.3:3435)>m3ua asp create asp2 ass2
  3. telscale(192.168.1.3:3435)>m3ua as add as2 asp2
  4. telscale(192.168.1.3:3435)>m3ua asp start asp2
  5. telscale(192.168.1.3:3435)>m3ua route add as1 8 2 3

In point number 2 the Application Server Process is linked to ass2 (Association 2) which connects using SCTP ports 9011 and 9012 respectively.

In point number 5 you createed a route for the Application Server  Destination Point Code is 8, Originating Point Code is 2 and the Service Indicator is 3. The DPC 8 matches the SPC from Operator 2

Here are some screenshots from the USSD JSS7 Management Console GUI

ASP 1

m3ua_asp1

ASP2

m3ua_asp2

M3UA ROUTERS

  m3ua_routers

Step 6 – Create  SCCP Connections SAP (Service Access Point)

Create a SAP (Service Access Point) connection for network id 0

  • telscale(192.168.1.3:3435)>sccp sap create 1 1 2 2 networkid 0

The above parameters are as follow

  • 1 = The unique number that identifiers the SAP
  • 1 = The MTP3 id, this identifies the M3UA, there is only one
  • 2 = The OPC field must match the USSD Gateway SPC (see network diagram above)
  • 2 = Network Indicator is set to 2 for National routing and 0 is used for International routing
  • 0 = default network id as explained in step 2

Create a MTP3 Destination for the SAP connection

  • telscale(192.168.1.3:3435)>sccp dest create 1 1 1 1 0 255 255

The above parameters are as follow

  • 1 = This matches the identifier of the SAP above
  • 1 = A unique identifier of this MTP3 Destination
  • 1 = First Point Code. This must match the SPC of Operator 1 (see network diagram above)
  • 1 = Last Point Code
  • 0 = First SLS (Signaling Link Selector (SLS)— An identifier used for load sharing across linksets and links)
  • 255 = Last SLS
  • 255 = SLS Mask

 

Screenshots from the SS7 Management Console GUI

SAP and MTP Destination

SCCP_SAP_DEST

Step 7 – Create  SCCP Connections RSP (Remote Signalling Point)

 

  • telscale(192.168.1.3:3435)>sccp rsp create 1 1 0 0

The above parameters are as follow

  • 1 = Unique identifier of this RSP
  • 1 = Remote SPC that matches the (Operator 1) SPC (see network diagram above)
  • 0 = Flag
  • 0 = Mask

Screenshots from the SS7 Management Console GUI

RSP

SCCP_RSP

Step 8 – Create  SCCP Connections RSS (Remote SubSystem)

  • telscale(192.168.1.3:3435)>sccp rss create 1 1 8 0

The above parameters are as follow

  • 1 = Unique identifier of this RSS
  • 1 = Remote SPC that matches the (Operator 1) SPC (see network diagram above)
  • 8 = Remote SSN that matches the (Operator 1) SSN (see network diagram above)
  • 0 = Flag

Screenshots from the SS7 Management Console GUI

RSS

SCCP_RSS

Step 9 – Create  SCCP Address

 

  • 1 = Unique identifier
  • 82 = Address indicator 82 means that the Global Title includes ( Translation Type, Numbering Plan and Encoding Scheme and Nature of Address) but routing will be based on PC and SSN
  • 1 = Point Code that must match (Operator 1) SPC (see network diagram above)
  • 8 = SubSystem Number that must match (Operator 1) SSN (see network diagram above)
  • 1 = Translation Type
  • 1 = Numbering Plan
  • 4 = Nature of Address – 4 represents International Carrier while 3 represents National Carrier
  • * = Global Title Digits. * represents wildcard.

Screenshots from the SS7 Management Console GUI

ADDRESS

SCCP_ADDRESS

Step 10 – Create  SCCP Rules

telscale(192.168.1.3:3435)>sccp rule create 2 K 82 1 8 1 1 4 * solitary 2 origination-type remoteOriginated networkid 0

  • 1 =  Unique identifier for the SCCP rule
  • K = <mask> Retain the original dialed digits of this section in the translated digits.
  • 82 = <address-indicator>(see Step 8 for more information)
  • 1 = <point-code>
  • 8 = <subsystem-number>
  • 1 =  <translation-type>
  • 1 = <numbering-plan>
  • 4 = <nature-of-address-indicator>
  • * = <digits>
  • solitary = <ruleType>
  • 1 = <primary-address-id> This matches the unique identifier of the address created in Step 8
  • origination-type remoteOriginated = This identifies means that the Operator 1 can send a USSD PULL
  • networkid 0 = This rule will add the network ID 0 to the any incoming message that matches the specified PC ans SSN

Screenshots from the SS7 Management Console GUI

SCCP RULE

SCCP_RULE

Step 11 – Create the same SCCP Configuration for Operator 2

Note that the networkid is set to 1. The SPC is 8 and the SSN is 8 (see network diagram at the top of the page)

  • telscale(192.168.1.3:3435)>sccp sap create 2 1 2 2 networkid 1
    telscale(192.168.1.3:3435)>sccp dest create 2 1 8  8 0 255 255
    telscale(192.168.1.3:3435)>sccp rsp create 2 8 0 0
    telscale(192.168.1.3:3435)>sccp rss create 2 8 8 0
    telscale(192.168.1.3:3435)>sccp address create 2 82 8 8 1 1 4 *
    telscale(192.168.1.3:3435)>sccp rule create 2 K 82 8 8 1 1 4 * solitary 2 origination-type remoteOriginated networkid 1

Step 12 – Simulate the Operator’s Connection by starting the JSS7 Simulator as a Server

Go to $USSD_HOME/tools/TelScale-jss7-simulator/bin

Change the permission of the all .sh file to execute

  • chmod +x *.sh

Start the simulator

  • ./run.sh gui

 

Press the Start button

JSS7_SIM1

 

Press the edit button to configure M3UA as shown below

JSS7_SIM2

Configure the M3UA settings as below to simulate Operator 1 network as shown below

JSS7_SIM_M3UA

Configure the SCCP settings as below to simulate Operator 1 network as shown below. Not that Routing is based on DPC and SSN

JSS7_SIM_SCCP

  • Save the configuration and go back to the main window
  • Press the button Run Test
  • You will see a screenshot similar to the one below

JSS7_SIM_RUN_TEST

  • In the “Message text” box type the short code *666# and press the button “Send ProcessUnstructuredRequest”
  • You will see the Message in the message above that prompts you to choose either 1 for “Hello World” or 2 for “Remaining Balance”
  • Delete the text in the “Message text” box and enter your choice (1 or 2), then, press the button “Send UnstructureResponse”.
  • You will receive a final reply from the USSD Server

 

Step 13 – Simulate the Operator 2 from the IP 192.168.1.14

Start the JSS7 from another computer.

Go to $USSD_HOME/tools/TelScale-jss7-simulator/bin

Change the permission of the all .sh file to execute

  • chmod +x *.sh

Start the simulator

  • ./run.sh gui

Press the Start button and follow the same procedure as in Step 12.

The SCTP M3UA configuration should use the following IP address:

  • SCTP Local Host IP = 192.168.1.14
  • SCTP Local Host Port = 9011
  • SCTP Remote Host IP = 192.168.1.3
  • SCTP Remotet Port = 9012
  • M3UA DPC = 2
  • M3UA OPC = 8
  • M3UA Service Indicator  = 3

The SCCP Setting should use

  • Local SPC = 8
  • Local SSN = 8
  • Remote SPC = 2
  • Remote SSN = 8

The post USSD – How to Configure Multi-tenancy and Initiate SCTP Session appeared first on Telestax Docs Online.

Restcomm – Quick Start User Guide

$
0
0

**** Restcomm is Moving to Docker *****

Getting Started with Restcomm on Docker

Rapid WebRTC application development with Restcomm and docker


 

 

If you are still using Restcomm Binary or if you want to build from source, please proceed with with the instructions below.

  • Telscale Restcomm binary or Mobicents Restcomm Binary get latest HERE
  • You may also choose to build Restcomm from source as explained HERE
  • (Optional but recommended) Install screen

 


Step 1 – Download and unzip Restcomm binary

  • Go to a local directory on your computer and run the following command:
  • wget https://mobicents.ci.cloudbees.com/job/RestComm/lastSuccessfulBuild/artifact/Mobicents-Restcomm-JBoss-AS7-<xxx>.zip
  • Where <xxx> is the release version number
  • unzip the binary to a local directory. It should be similar to this Mobicents-Restcomm-JBoss-AS7-<version-number>
  • We shall refer to this above Restcomm directory as the $RESTCOMM_HOME

Step 2 – Configure Restcomm IP information and Text-to-speech

  • Go to the directory $RESTCOMM_HOME/bin/restcomm
  • Open the file restcomm.conf
  • Go to the section # Network configuration

Configure the following variables with the network configuration details of your server.

NET_INTERFACE=
PRIVATE_IP=
SUBNET_MASK=
NETWORK=
BROADCAST_ADDRESS=

Here is an sample ifconfig output and how you can use the information to autoconfigure Restcomm

p5p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.5  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f2bf:97ff:fe03:9e0a  prefixlen 64  scopeid 0x20<link>
        ether f0:bf:97:03:9e:0a  txqueuelen 1000  (Ethernet)
        RX packets 16992066  bytes 17183323972 (16.0 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14220143  bytes 2457011656 (2.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

  • un the command netstat -r to get the Network address of your computer

netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 p5p1
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 p5p1

  • This is what the restcomm.conf file will look like using the information from the network interface

NET_INTERFACE=p5p1
PRIVATE_IP=192.168.1.10
SUBNET_MASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST_ADDRESS=192.168.1.255

Add your Text-to-Speech Key

  • In $RESTCOMM_HOME/bin/restcomm/restcomm.conf file
  • Go to the section # VoiceRSS variable declarations
  • Add your VoiceRSS API key to the variable VOICERSS_KEY=‘2901c0ab0a544399ab862123f561ff135d3’
  • save and exit the restcomm.conf file

Step 3 – Start Restcomm and Open the Admin GUI

  • Go to the directory Restcomm by running the $RESTCOMM_HOME/bin/restcomm/
  • run the command below to start Restcomm and the media server
  • ./start-restcomm.sh
  • To see the Restcomm startup process run (screen -r restcomm) (Only works if you have screen installed)
  • To see the MMS startup process (screen -r mms)
  • Open your web browser and go to the url – http://IP:8080/
  • log in with the username=administrator@company.com and the password=RestComm
  • You will be prompted to change the default password.
  1. To stop Restcomm run the command
  2. $RESTCOMM_HOME/bin/restcomm/stop-restcomm.sh

Step 4 – Making Test SIP Calls using the Demo Apps

Restcomm comes pre-configured with SIP demo apps

Open any SIP phone of your choice, you may use Linphone which doesn’t require registeration

Make a sip call to the numbers below

  1. 1234@Restcomm_IP:5080 – you will hear a welcome message
  2. 1235@Restcomm_IP:5080 – you will hear an hello world message in 3 languages
  3. 1236@Restcomm_IP:5080 – this will test the collect verb,

for more demo apps, check HERE.

 

 

 

 

The post Restcomm – Quick Start User Guide appeared first on Telestax Docs Online.

Restcomm – Multi-tenancy and Managing Sub-Accounts

$
0
0

In our continuous effort to improve Restcomm functionalities, we have introduced multi-tenancy as part of Restcomm 7.4.0 and Restcomm as a Service (RaaS). Multi tenancy support provides a set of rules that improve user information management and control who can gain access to specific accounts. This set of rules will be also applied by the upcoming OAuth support, so they both OAuth and Multi-tenancy Support will handle this consistency together. The information below will provide an overview of how multi-tenancy is applied to Restcomm.

Restcomm REST API

Restcomm REST API access control is managed by two main entities, credentials and accounts. To better understand how it works, we’ll assume the following diagram as the account hierarchy, where each account and sub account has its own information.

ElementTree-4

 

Considering that Primary and Secondary accounts represents different Restcomm users, they will not be able to manage information from each other. So if Primary Account tries to access the REST API using its own credentials but requesting for the list of DIDs of the Secondary Account, the response will be a HTTP 401 error. The ‘curl’ command below represents the given situation.

curl -X GET http://[primarySid]:[primaryAuthToken]@127.0.0.1:8080/restcomm/2012-04-24/Accounts/[secondarySid]/IncomingPhoneNumbers.json

 

As mentioned above, there are more possible combinations between credentials and accounts used to request information through the API. But instead list all those possibilities, we can assume the pattern used by the API to control access in a general way, grouped by the result obtained from the API:

Allowed:

  • Request information about the same account used as credential
  • Request information about a sub account of the account used as credential

Denied:

  • Request information about the parent account of the account used as credential
  • Request information about a account of the same level of the account used as credential
  • Request information about a sub account different than the ones from the account used as credential

This access control is applied to the API’s: Accounts, IncomingPhoneNumbers, Calls, SMS Messages, OutgoingCallerIds, Recordings, Transcriptions and Notifications.

To understand this rules based on the hierarchy presented by the diagram above, we can assume the following for each account:

Primary Account can view and manage Primary Application, DID P, DID A and DID B only.
Subaccount A can view and manage Application A and DID A only.
Subaccount B can view and manage Application B and DID B only.
Secondary Account can view and manage Application S, DID S, DID C and DID D only.
Subaccount C can view and manage Application C and DID C only.
Subaccount D can view and manage Application D and DID D only.

Important!: The Applications API has a different access control, and allows the accounts to manage its own applications only. So, if a request is made to this API using a credential different than the account, the response will be a HTTP 401 error.

Restcomm Admin UI

The user interface follows a similar behaviour to the API. Is known that the AdminUI currently shows only info related to the logged user, but now the local applications displayed under the ‘Restcomm Apps’ option were adjusted to follow the same behaviour. This filter is also applied to the available applications when configuring a DID, as shown by the images below.

Screen Shot 2015-10-05 at 16.40.46

Available applications at DID’s configuration, filtered by logged user.

 

Screen Shot 2015-10-05 at 16.35.37

Restcomm Apps list, filtered by logged user.

 

Screen Shot 2015-10-05 at 16.34.53

RVD Projects created by the user.

This is the way that multi tenancy support provides access control between accounts, ensuring that only authorized accounts will be able to see and manage another accounts info.

 

The post Restcomm – Multi-tenancy and Managing Sub-Accounts appeared first on Telestax Docs Online.

SMSC – How to Connect to the CLI (Command Line Interface)

$
0
0

How to connect to the command line interface of the Telscale SMSC

 Command Shell

  • Go to the root directory of SMSC referred to as the $SMSC_HOME/jboss-5.1.0.GA/bin
  • Start the shell by running the following command
  • ./ss7-cli.sh
  • You will see the following

version=6.2.2.GA-TelScale,name=TelScale CLI,prefix=telscale,vendor=TeleStax
telscale>

run the command – connect

telscale>connect
Connected to TelScale CLI 6.2.2.GA-TelScale TeleStax Authenticating against configured security realm
Username:admin
Password:*****
telscale(local)>

  • The default username and password is admin
  • To get the current configuration SMSC variables run the following
  • telscale(local)>smsc get
  • Press the <TAB>  button on your keyboard to get more command options

 

The post SMSC – How to Connect to the CLI (Command Line Interface) appeared first on Telestax Docs Online.

Viewing all 36 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>