Hi all,
We have developed a Java application for getting messages on SS7. We have already defined module id in system.txt. However, it seems that we cannot get the messages in the module id defined when we initiate ss7_play. We were confused if we have to define the module id as "hex" on the Java application because in the system.txt , the module id is in "hex" format but the Java API (gctApi.jar's GctLib.receive() method accepts only a "short" datatype). We tried to print out the module id in the Java application, both yields "157" for this initialization:
short module_id = 0x9d and short module_id = 157
Our question is, will the gctApi.jar API be able to map the module id's (0x9d and/or 157) with the system.txt module id (0x9d) defined in our system? Thanks for your quick reply
Hi Clark,
the module_id is a number, it doesn't matter if you refer to it as 0x9d or as 157 in java or even in the system.txt
if you send a message to 0x9d with s7_play, you should get it in your java app even if you do a GCT_receive() with 157.
if it's not the case, then you have a problem in your configuration files or in your code.
-Franck.
Hi Franck,
So you're saying that if we pass 0x9d as short parameter for module id, the GCTLib.receive() wil still treat it as 157 then bash it with the module id defined in the system.txt (in this case, it is 0x9d). This is my code:
try {
short module_id = (short) 0x9d;
System.out.println("module_id: " + module_id);
GctMsg gctMsg = GctLib.receive(moduleId);
System.out.println(""
+ "M-t" + String.format("%04x", gctMsg.getType())
+ "-i" + String.format("%04x", gctMsg.getId())
+ "-f" + String.format("%02x", gctMsg.getSrc())
+ "-d" + String.format("%02x", gctMsg.getDst())
+ "-s" + String.format("%02x", gctMsg.getStatus()));
ByteBuffer buf = gctMsg.getParam();
if (buf.hasRemaining()) {
System.out.println("-p");
while (buf.hasRemaining()) {
System.out.println(String.format("%02x", BBUtil.getU8(buf)));
}
System.out.println("\n");
} catch (GctException e) {
System.out.println("Exception encountered on receivedMsg");
e.printStackTrace();
but we dont get any message being printed even when running s7_play. What do you think is the problem?
PS. The system.txt is an existing config currently defined in our system.
you can check if the message is stuck in the queue of 0x9d with ./gctload -t3
if it's not there and you didn't get it with GCT_receive() it means you didn't sent to the right queue or s7_play failed to send it for some reasons.
We tried to run gctload -t3 and here is the output:
LOCAL=0x9d, MSGs queued=0, last read by pid=13109
running gctload -t2:
M-I0000-t0011-i0000-f5d-d9d-s00-p(1)02
but still the message didn't print out in our code? Can you tell us what could be wrong? Thanks
Update:
We were now able to retrieve the message from the module id 0x9d. Thanks for your assistance
Hi,
Asking another question. Is it possible to decode and get the TCAP and GSM part from the message which was acquired from reading the module id? Does the gctApi.jar have some sort of functionality for this? If no, what are the tools that we can use to decode the message? Thank you very much for your reply
Yes. there are tools to decode the upper layers.
if your application is active then you can use Dialogic SCCP and TCAP modules.
if you application is passive than we can provide you with a 3rd party library for that.
Franck.
What do you mean by active and passive? Also, what is this 3rd party library? Is it free? Thanks
Up for this thread
active in the case you are SP so you are a point code in the network
passive in case you are tapping the network in a non intruive mode.
no. none of those libraries are free.
if you want it free you need to look for opensource libraries...
Franck
I think the application is on passive mode.
ok
ehat information do you need to parse?
Yes, parse and decode the hex stream dump messages and be able to interpret the data. Is that doable?
Also, may I ask how to use GctLib.send() function and how will I construct the GctMsg object to be send? Thanks