Run Restcomm SMSC Gateway

Pre-requisite

  • You must have Restcomm SMSC Gateway installed as explained in the Installation Guide.

  • If you are using the SS7 board on server, you must ensure that the java.library.path variable is set to point to the directory containing the native component. Alternatively you can copy it to the JBoss native library path manually.

    • You must have Cassandra database running and configured as explained in the Installation Guide.

    • You must have the Cassandra Keyspace created as explained in the Installation Guide.

  • All you have to do to start the Gateway is start the JBoss Application Server. To start the JBoss Server you must execute the run.sh (Unix) or run.bat (Microsoft Windows) startup script in the Restcomm-smscgateway-<version>/jboss-5.1.0.GA/bin folder (on Unix or Windows). Note that this will start the server in the default profile. The "default" profile is a clean profile where you will have to start from scratch and configure the entire SS7 Stack and SMSC Gateway.

  • Result: If the service started properly you should see the following last few output lines in the Unix terminal or Command Prompt depending on your environment:

    2013-07-22 17:41:48,817 INFO [org.mobicents.slee.container.management.ResourceManagement] (pool-27-thread-1) Created Resource Adaptor Entity SmppServerRA for ResourceAdaptorID[name=SMPPServerResourceAdaptor,vendor=org.mobicents,version=1.0] Config Properties: []
    2013-07-22 17:41:49,067 INFO [org.mobicents.slee.container.management.ResourceManagement] (pool-27-thread-1) Activated RA Entity SmppServerRA 2013-07-22 17:41:49,317 INFO [org.mobicents.slee.container.management.ResourceManagement] (pool-27-thread-1) Bound link between RA Entity SmppServerRA and Name SmppServerRA
    2013-07-22 17:41:49,615 INFO [javax.slee.RAEntityNotification[entity=SchedulerResourceAdaptor].SchedulerResourceAdaptor] (pool-27-thread-1) Verify configuration in RA Entity SchedulerResourceAdaptor
    2013-07-22 17:41:49,616 INFO [org.mobicents.slee.container.management.ResourceManagement] (pool-27-thread-1) Created Resource Adaptor Entity SchedulerResourceAdaptor for ResourceAdaptorID[name=SchedulerResourceAdaptor,vendor=org.mobicents,version=1.0] Config Properties: []
    2013-07-22 17:41:49,866 INFO [org.mobicents.slee.container.management.ResourceManagement] (pool-27-thread-1) Activated RA Entity SchedulerResourceAdaptor
    .
    .
    .
    2013-07-22 17:41:51,122 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installing DeployableUnitID[url=file:/C:/JavaT/jboss/server/default/deploy/smsc-services-du-6.1.2-Restcomm-SNAPSHOT.jar/]
    2013-07-22 17:41:52,307 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installed LibraryID[name=com.Restcomm.smsc,vendor=smsc-library,version=1.0]
    2013-07-22 17:41:52,349 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installed SbbID[name=AlertSbb,vendor=org.mobicents,version=1.0]
    2013-07-22 17:41:52,408 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installed SbbID[name=RxSmppServerSbb,vendor=org.mobicents,version=1.0]
    2013-07-22 17:41:52,618 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installed SbbID[name=SriSbb,vendor=org.mobicents,version=1.0]
    .
    .
    .
    2013-07-22 17:41:53,290 INFO [org.mobicents.slee.container.management.jmx.DeploymentMBeanImpl] (pool-27-thread-1) Installed DeployableUnitID[url=file:/C:/JavaT/jboss/server/default/deploy/smsc-services-du-6.1.2-Restcomm-SNAPSHOT.jar/]
    2013-07-22 17:41:53,543 INFO [org.mobicents.slee.container.management.ServiceManagementImpl] (pool-27-thread-1) Activated ServiceID[name=MoService,vendor=org.mobicents,version=1.0]
    .
    .
    .
     2013-07-22 17:41:54,974 INFO [me.prettyprint.cassandra.connection.CassandraHostRetryService] (Thread-27) Downed Host Retry service started with queue size -1 and retry delay 10s
    2013-07-22 17:41:55,004 INFO [me.prettyprint.cassandra.service.JmxMonitor] (Thread-27) Registering JMX me.prettyprint.cassandra.service_TelestaxSMSC:ServiceType=hector,MonitorType=hector
    2013-07-22 17:41:55,014 INFO [javax.slee.RAEntityNotification[entity=SchedulerResourceAdaptor].SchedulerResourceAdaptor] (Thread-27) Scheduler IS up, starting fetch tasks
    2013-07-22 17:41:55,019 INFO [org.mobicents.smsc.smpp.SmscManagement] (main) SMSC configuration file path C:\JavaT\jboss\server\default\data\SmscManagement_smsc.xml
    2013-07-22 17:41:55,022 INFO [org.mobicents.smsc.smpp.SmppServerManagement] (main) Loading SMPP Server Properties from C:\JavaT\jboss\server\default\data\SmscManagement_smppserver.xml
    2013-07-22 17:41:55,297 INFO [org.mobicents.smsc.smpp.SmppServerManagement] (main) Starting SMPP server...
    2013-07-22 17:41:55,322 INFO [com.cloudhopper.smpp.impl.DefaultSmppServer] (main) SmscManagement started on SMPP port [2776]
    2013-07-22 17:41:55,322 INFO [org.mobicents.smsc.smpp.SmppServerManagement] (main) SMPP server started
    2013-07-22 17:41:55,378 INFO [org.mobicents.smsc.smpp.SmppClientOpsThread] (Thread-30) SmppClientOpsThread started.
    2013-07-22 17:41:55,379 INFO [org.mobicents.smsc.smpp.SmscManagement] (main) Started SmscManagement
    2013-07-22 17:41:55,379 INFO [javax.slee.RAEntityNotification[entity=SmppServerRA].SmppServerResourceAdaptor] (main) Activated RA Entity SmppServerRA
    2013-07-22 17:42:00,652 INFO [org.apache.coyote.http11.Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
    2013-07-22 17:42:00,674 INFO [org.apache.coyote.ajp.AjpProtocol] (main) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    2013-07-22 17:42:00,689 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:45s:372ms
  • If you are starting Restcomm SMSC Gateway for the first time, SS7 and SMSC working parameters (and possibly database access) are not configured. You need to use the Shell Client or the GUI to connect to the Gateway and configure the SS7 Stack and SMSC. Once configured, the state and configuration is persisted which stands server re-start. The next chapter will discuss in detail about configuration.

Bind the SMSC Gateway to a specific IP

  • Using run.sh without any arguments binds the SMSC Gateway to localhost 127.0.0.1. To bind the Gateway to a different IP, pass the IP address as value to the -b command line option. For example to bind the SMSC to`10.199.7.23` you will use the command from the bin folder as below:

    [vsmsc bin]$ ./run.sh -b 10.199.7.23

Stop the Gateway

  • To stop the Restcomm SMSC Gateway, you must shut down the JBoss Application Server. To shut down the server(s) you must execute the shutdown.sh -s (Unix) or shutdown.bat -s (Microsoft Windows) script in the`Restcomm-smscgateway-<version>/jboss-5.1.0.GA/bin` directory (on Unix or Windows).

  • If the server stopped properly, you will see the following three lines as the last output in the Unix terminal or Command Prompt:

    [Server] Shutdown complete
    Halting VM

Running the Gateway - Simulator Profile

The Restcomm SMSC Gateway offers you an option to run the Gateway with a "simulator" profile for testing purpose. The "simulator" profile is a pre-configured profile to work with the jss7-simulator and the smpp-simulator. Starting the Gateway with the "simulator" profile is similar to the steps explained for the "default" profile except that you must pass the string value "simulator" to the -c command line option when invoking the run script.

[bin]$ ./run.sh -c simulator

By default, the SMSC Simulator profile is configured for use in Linux systems. For using it under Micsrosoft Windows you need to open the file Restcomm-smscgateway-<version>/jboss-5.1.0.GA/server/simulator/data/SCTPManagement_sctp.xml and replace (in two places) ipChannelType="0" to ipChannelType="1" for using a TCP connection instead of SCTP (SCTP is not supported under Windows).

Configuring the Gateway in Simulator Profile

In order to configure the Gateway in a Simulator Profile, you can make use of the following commands:

sctp server create serv1 127.0.0.1 8012 TCP
sctp server start serv1
sctp association create ass1 SERVER serv1 127.0.0.1 8011 TCP

m3ua as create as1 IPSP mode SE ipspType server rc 101 traffic-mode loadsharing network-appearance 102
m3ua asp create asp1 ass1
m3ua as add as1 asp1
m3ua asp start asp1
m3ua route add as1 1 2 3

sccp sap create 1 1 2 2
sccp dest create 1 1 1 1 0 255 255
sccp address create 1 82 1 8 0 1 4 000
sccp address create 2 82 2 8 0 1 4 000
sccp rule create 1 K 82 0 8 0 1 4 * solitary 1 origination-type localOriginated
sccp rule create 2 K 82 0 8 0 1 4 * solitary 2 origination-type remoteOriginated
sccp rsp create 1 1 0 0
sccp rss create 1 1 8 0

smsc set scgt 22220
smsc set scssn 8
smsc set hlrssn 8
smsc set mscssn 8
smsc set maxmapv 3

smsc esme create test test test 127.0.0.1 -1 TRANSCEIVER SERVER esme-ton 1 esme-npi 1 esme-range 6666
smsc esme start test

Running the jSS7 Simulator

If you are not familiar with the Restcomm jss7 Simulator, you can find instructions about using the jss7-simulator in the Restcomm jSS7 User Guide. You will also find example test cases explained in detail in the jSS7 User Guide.

Running Restcomm jSS7 Simulator

  • Change the working directory to the bin folder in the Simulator’s installation directory.

    [vinu@vinu-neha ~]$ cd Restcomm-smsc-<version>/tools/Restcomm-ss7-simulator/bin
  • Ensure that the run.sh start script is executable.

    bin$ chmod +x run.sh
  • Execute the run.sh Bourne shell script with the command ./run.sh gui or in the case of Windows`./run.bat gui`.

    bin$ ./run.sh gui

    This will launch the Simulator GUI Application.

  • When the GUI shows up, select "main" (default) as host name [or type "win" as host name under Windows] and press the 'Start' button. The Simulator is already pre-configured to connect to the SMSC Gateway (running in simulator profile). Press 'Run test' and again click on 'Start' in the next screen. The Simulator will connect to SMSC (via m3ua protocol).

  • The Low level part is configured to SCTP (not TCP) protocol and hence you can test the SMSC in a Linux environment. To test under Windows OS, you must change the SS7 simulator settings to TCP. The SS7 Simulator will play both HLR and MSC roles and respond to SendRoutingInfo and ForwardSM requests from SMSC gateways.

  • You can configure the SMS_TEST_CLIENT testing task to play with different modes including return error responses to SMSC and bulk mode without adding information for any event to an application form. You can also play with different data coding schemes and MAP protocol versions.

Running the jSS7 Simulator

  • Change the working directory to the bin folder for the SMPP Simulator.

    [vinu@vinu-neha ~]$ cd Restcomm-smsc-<version>/tools/Restcomm-smpp-simulator/bin
  • Ensure that the run.sh start script is executable.

    bin$ chmod +x run.sh
  • Execute the run.sh Bourne shell script with the command ./run.sh gui or in the case of Windows`./run.bat gui`.

    bin$ ./run.sh gui

    This will launch the SMPP Simulator GUI Application.

  • The SMPP Simulator is already pre-configured to connect to the SMSC Gateway (running in simulator profile). Press 'Run test' and then click on 'Start Session' to connect to the SMSC Gateway.

  • Using the button 'Configuring data for message submitting', you can configure different sending modes, data coding schemas, origination and destination addresses.

  • When the SMSC Gateway is running in a "simulator" profile it works with SMPP as ESME with the address "6666" (TON=1, NPI=1). So all messages with the destination address "6666" (TON=1, NPI=1) will be routed to SMPP Simulator. All other messages will be routed to SS7 Simulator.

Running the Shell

You must start the Shell client and connect to the managed instance prior to executing commands to configure the Gateway. Shell can be started by issuing the following command from `Restcomm-smscgateway-<version>/jboss-5.1.0.GA/bin `directory:

[$] ./ss7-cli.sh

Once console starts, it will print following information and await further commands:

version=2.0.0-SNAPSHOT,name=Restcomm CLI,prefix=mobicents,vendor=TeleStax
Restcomm>

Before issuing further commands you must connect to a managed instance. For more details on connecting to an instance and for a list of all supported commands and details on configuring the SS7 stack refer to the Restcomm SS7 Stack User Guide.