RestComm / gmlc

Restcomm Location Server
http://www.restcomm.com/
GNU Affero General Public License v3.0
17 stars 40 forks source link

Document usage for the SS7 simulator #58

Closed angrygreenfrogs closed 8 years ago

angrygreenfrogs commented 8 years ago

Related to https://github.com/RestComm/jss7/issues/100

It'd be nice to include some "Getting Started" user (or developer) level documentation explaining how to install and use the JSS7 simulator with the GMLC.

I haven't used the simulator before myself, but it looks like it has a bit of a learning curve on it. There's some related docs here:

https://github.com/RestComm/jss7/blob/master/docs/userguide/sources-asciidoc/src/main/asciidoc/Chapter-Simulator.adoc#_running_ss7_simulator

angrygreenfrogs commented 8 years ago

Note: There's some mention of the simulator and how to start it here:

http://documentation.telestax.com/core/gmlc/GMLC_Admin_Guide.html#_running_the_gateway_simulator

But what we're really missing is a step by step of how to actually use it and do a full test request with the GMLC.

FerUy commented 8 years ago

Thanks @angrygreenfrogs. Agreed. We are currently working on some improvements for adding 3G location MAP procedures in jSS7 simulator as for https://github.com/RestComm/jss7/issues/100, so I would rather wait for that to be finished to make the tutorial with all use cases... Would you agree?

FerUy commented 8 years ago

Btw, that Admin Guide needs a total refactor. I'm committed to do that.

angrygreenfrogs commented 8 years ago

All sounds good, @FerUy. Yeah, I can see the admin guide was essentially a find/replace from USSD it looks like - a lot of it is still close to the truth, of course. In my spare minutes I'll poke around a bit more with the simulator and write down any relevant notes somewhere (perhaps I'll keep going with putting them in the readme until we pull them out into the full guides).

FerUy commented 8 years ago

Great @angrygreenfrogs ... actually, I've been working on that since yesterday too (along with other tasks). Will come back when finished debugging some stuff there.

deruelle commented 8 years ago

@FerUy do we have an issue in github to track the Admin Guide refactoring ?

FerUy commented 8 years ago

Yes @deruelle : this one https://github.com/RestComm/gmlc/issues/52

FerUy commented 8 years ago

@angrygreenfrogs tell me if this helps. Follow this steps in order to run the simulation. First you'll need to fix the default configuration (0.1 and 0.2):

0.1) In $JBOSS_HOME/server/simulator/data/SccpStack_sccprouter2.xml set the configuration to the following: `<?xml version="1.0" encoding="UTF-8" ?>

` 0.2) In $JBOSS_HOME/server/simulator/data/SccpStack_sccpresource2.xml set the configuration to the following: ` ` 1) Run the GMLC in simulator mode (next, I'm also binding it to the machine's IP 192.168.26.128). Go to $JBOSS_HOME/bin, then execute: ./run.sh -b 192.168.26.128 -c simulator (if you don't use the -b option, it will run in 127.0.0.1). Wait until you see the server has completely started by seeing in the console log something like this: 13:47:56,877 INFO [ServerImpl](main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:31s:455ms 2) From $JBOSS_HOME go to the jSS7 simulator path, i.e. cd ../tools/restcomm-jss7-simulator/bin. 3) Execute ./run.sh gui (you need to give x rights to the file, chmod +x run.sh). 4) On the GUI that pops up (see image below), just click "Start": ![1_connectingtotesterhost](https://cloud.githubusercontent.com/assets/14883482/17149718/e241ec30-5342-11e6-87c9-c0ba0c9b678d.png) 5) SS7 simulator configuration will pop up. Make sure M3UA settings appear like the images below: ![2_ss7sim_m3ua](https://cloud.githubusercontent.com/assets/14883482/17149788/318ababa-5343-11e6-8f5b-b92b5de2d0f3.png) ![3_ss7sim_m3ua_settings](https://cloud.githubusercontent.com/assets/14883482/17149801/40c112ae-5343-11e6-973a-56711741beab.png) This is consistent with what's by default configured in $JBOSS_HOME/server/simulator/data/Mtp3UserPart_m3ua1.xml 6) Set SCCP settings like it's shown below: ![4_ss7sim_sccp](https://cloud.githubusercontent.com/assets/14883482/17149944/e7b6e386-5343-11e6-9313-cba43c9f9008.png) ![5_ss7sim_sccp_settings](https://cloud.githubusercontent.com/assets/14883482/17149951/ee5e2e88-5343-11e6-8f71-d90c77d24b08.png) The latter shall be consistent with what was configured in 0.1 & 0.2, i.e. $JBOSS_HOME/server/simulator/data/SccpStack_sccprouter2.xml and $JBOSS_HOME/server/simulator/data/SccpStack_sccpresource2.xml (NEVER run the simulator previous to the server, as it might overwrite the server configuration). 7) Just in case, make sure TCAP/MAP settings is as follows: ![7_ss7sim_tcap_settings](https://cloud.githubusercontent.com/assets/14883482/17150227/fe6caa42-5344-11e6-89c0-24de4978b29f.png) and ATI_TEST_SERVER is set, then click "Run Test": ![6_ss7sim_tcap](https://cloud.githubusercontent.com/assets/14883482/17150218/f853c488-5344-11e6-9b13-d34d5e070932.png) 8) On the window that pops up, click on "Start". After some seconds, you should see that SCTP state is connected and M3UA is active, like in the following image: ![8_ss7sim_started_sctpconnectedm3uaactive](https://cloud.githubusercontent.com/assets/14883482/17150376/8bb2b75c-5345-11e6-962f-fcb580675fa6.png) In the server console log, you should see something like this: 14:31:31,775 INFO [SelectorThread](Thread-37) Connected Association [name=ass1, associationType=SERVER, ipChannelType=SCTP, hostAddress=, hostPort=0, peerAddress=127.0.0.1, peerPort=8011, serverName=serv1, extraHostAddress=[]] 14:31:31,776 INFO [AssociationHandler](Thread-37) New association setup for Association=ass1 with 10 outbound streams, and 32 inbound streams. 14:31:31,825 WARN [SccpStackImpl-SccpStack](pool-27-thread-1) Rx : MTP-RESUME: AffectedDpc=1 You are then set to test. 9) Open a browser and perform an HTTP GET test, for example: http://192.168.26.128:8080/restcomm?msisdn=59898437910 (if you are binded to 192.168.26.128) You should immediately receive the following "hardcoded" response: mcc=250,mnc=1,lac=32000,cellid=221,aol=5,vlrNumber=5555555666 Meanwhile, in the server console log, you should read something like this: 14:40:50,911 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-0-thread-1) HTTP Request received and response sent. If you check the SS7 simulator (where the MAP ATI was sent and responded back), you should be able to see the following request and response (click on "Open Event Window" on each event logged): ![9_ss7sim_map-ati_req_eventwindow](https://cloud.githubusercontent.com/assets/14883482/17150555/48f0c48a-5346-11e6-965c-ed372805a563.png) ![10_ss7sim_map-ati_resp_eventwindow](https://cloud.githubusercontent.com/assets/14883482/17150565/527c2ab2-5346-11e6-8f7e-9b0e4613e2c9.png) 10) Try an HTTP POST, for example, by issuing the following command on a terminal window at $JBOSS_HOME/bin (the following assumes the server is running binded to 192.168.26.128): curl -X POST -d @mlpreq.txt http://192.168.26.128:8080/restcomm mlpreq.txt is like this (you may change the MSISDN): ` USERNAME PASSWORD SERVICEID 59899077937 15 ` You should receive the following "hardcoded" response: ` 59899077937 27 28 25.00S 153 01 43.00E 5000 ` In the server console log, you should see something like this: Parsed location request for MSISDN: 59899077937 14:44:31,083 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-7-thread-1) Generated response XML: ` 59899077937 27 28 25.00S 153 01 43.00E 5000 ` 14:44:31,083 INFO [MobileCoreNetworkInterfaceSbb](SLEE-EventRouterExecutor-7-thread-1) HTTP Request received and response sent. Looking forward for your feedback to close this issue and make the proper additions to Admin Guide and perhaps README file. Best regards