SMSC- Invoke ForwardSM

398 views
Skip to first unread message

Armache Antoni

unread,
Nov 14, 2019, 8:17:37 AM11/14/19
to mobicents-public
Hi guys,

I am receiving Invoke ForwardSM from SMSC and i am forwarding it to SS7 Simulator. But the simulator is giving an ABORT RESPONSE.

Can somebody tell what i am doing wrong ?

i have attach the pcap files below. >>>>> as the pcap file shows it is related to ((((dtid))))



This how i am catching the Invoke ForwardSM on my jainslee APP and forwading it to SS7 SIMULATOR.





    public void onMT_FORWARD_SHORT_MESSAGE_REQUEST(
   

                outgoingMapDialog = event.getMAPDialog();       
                   
                outgoingMapDialog.setLocalAddress(ModuleHelper.createLocalAddress());
                outgoingMapDialog.setRemoteAddress(ModuleHelper.createRemoteAddress());

                outgoingMapDialog.setNetworkId(0);

                outgoingMapDialog.addMtForwardShortMessageRequest(sm_RP_DA, sm_RP_OA, sm_RP_UI, false,
                        extensionContainer);
                // Create the ACI and attach this SBB
                sriDialogACI = this.mapAcif.getActivityContextInterface(outgoingMapDialog);
                sriDialogACI.attach(this.sbbContext.getSbbLocalObject());
                // Forward Request
                outgoingMapDialog.send();


     }
concatenetedMessage.pcap

BarbosSergos

unread,
Nov 14, 2019, 8:44:27 AM11/14/19
to mobicents-public
Hi Antoni,

You are sending second part of concatenated messages to TCAP Destination TransactionID dtid: 000000b9 which is unknown on Simulator as it related to TCAP Transaction on SMSC. 
As a result, you've got the error p-abortCause: unrecognizedTransactionID (1).

Check you Source and Destination TCAP Ids starting from first MT-FSM and between SMSC <-> your app, your app <-> SS7 Simulator, and you will see the difference.


Best regards,
Sergey Yashchenkov


четверг, 14 ноября 2019 г., 16:17:37 UTC+3 пользователь Armache Antoni написал:
abortError.JPG
mtFsm.JPG

Armache Antoni

unread,
Nov 14, 2019, 10:03:33 AM11/14/19
to mobicents-public
Hey Barbos,

Thanks so much for the quick reply ..... i feel like killing myself right now. You are totally correct in terms of TCAP Ids.....

But do you have any example or libraries that show how to change TCAP ids from the (code perspective).....

I have no lead to follow at the moment........ I just know that when receiving (mtFSM) ----------> TCAP ids need to be modified and forwarded.

Br.

BarbosSergos .

unread,
Nov 14, 2019, 10:07:24 AM11/14/19
to mobicent...@googlegroups.com
I did it once.. will try to find my code example for you tomorrow

Best regards,
Sergey Yashchenkov

--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobicents-public/e4eb544c-6f66-4d1c-a4fd-c93f0c84f0ce%40googlegroups.com.

Armache Antoni

unread,
Nov 14, 2019, 10:16:17 AM11/14/19
to mobicents-public
Thanks Bro

BarbosSergos

unread,
Nov 15, 2019, 2:53:05 AM11/15/19
to mobicents-public
Hi Antoni,

To proxy all requests through your app you have to create a new dialog with remaining TCAP DialogId from original and changed SccpCallingParty to GT of your platform and SCCPCalledParty to GT to:
- for SRIForSM to B-num
- for MT-FSM to real MSC Address which you get from SRIForSM and stored in your cache.

In this case, your app doesn't generate any new TCAP DialogId and all communications through your App will be transparent. 
Now all responses from HLR or MSC should come to your app and you can resend them to origin by changing SccpCalledParty back (don't forget to save it).

I'll show you based on Camel InitialDP, but for SRI-ForSM and MT-FSM logic states the same.

#Incoming IDP
open fun onInitialDpRequest(event: InitialDPRequest, aci: ActivityContextInterface, eventContext: EventContext?) {
 withRestMdcContext
(event.capDialog.remoteDialogId) {
 logger
.debug("onInitialDpRequest EVENT = {}, ACI = {}, EVENT_CONTEXT = {}", event, aci, eventContext)
 val call
= callBuilder.build(event, eventContext)
 
CapLoggingUtil.logInitialDpRequest(call)
 setCall
(call)
 logger
.debug("onInitialDpRequest CALL = {}", call)
 val newCalledGT
= "79061111111"
 capHandler
?.forwardIDP(event, newCalledGT)
 
}
}

#Change SccpCalledGT and send in a new capDialog with the same TCAP DialogId and other parameters.

@Throws(CapGatewayException::class)
override fun forwardIDP(event: InitialDPRequest, newCalledGT: String) {
 
try {
 logger
.debug("forwardIDP event = {}", event)

 val remoteCapDialog
= event.capDialog

 val capDialog
= capProvider.capServiceCircuitSwitchedCall.createNewDialog(getCAPApplicationContext(), getSCCPCallingPartyAddress(event.mscAddress.address, remoteCapDialog.remoteAddress.subsystemNumber), getSCCPCalledPartyAddress(newCalledGT, remoteCapDialog.localAddress.subsystemNumber), remoteCapDialog.remoteDialogId)
 capDialog
.networkId = NETWORK_ID
 capDialog
.returnMessageOnError = true

 val serviceKey
= event.serviceKey
 val calledPartyNumber
= event.calledPartyNumber
 val callingPartyNumber
= event.callingPartyNumber
 val callingPartysCategory
= event.callingPartysCategory
 val cgEncountered
= event.cgEncountered
 val ipsspCapabilities
= event.ipsspCapabilities
 val locationNumber
= event.locationNumber
 val originalCalledPartyID
= event.originalCalledPartyID
 val extensions
= event.extensions
 val highLayerCompatibility
= event.highLayerCompatibility
 val additionalCallingPartyNumber
= event.additionalCallingPartyNumber
 val bearerCapability
= event.bearerCapability
 val eventTypeBCSM
= event.eventTypeBCSM
 val redirectingPartyID
= event.redirectingPartyID
 val redirectionInformation
= event.redirectionInformation
 val cause
= event.cause
 val serviceInteractionIndicatorsTwo
= event.serviceInteractionIndicatorsTwo
 val carrier
= event.carrier
 val cugIndex
= event.cugIndex
 val cugInterlock
= event.cugInterlock
 val cugOutgoingAccess
= event.cugOutgoingAccess
 val imsi
= event.imsi
 val subscriberState
= event.subscriberState
 val locationInformation
= event.locationInformation
 val extBasicServiceCode
= event.extBasicServiceCode
 val callReferenceNumber
= event.callReferenceNumber
 val mscAddress
= event.mscAddress
 val calledPartyBCDNumber
= event.calledPartyBCDNumber
 val timeAndTimezone
= event.timeAndTimezone
 val callForwardingSSPending
= event.callForwardingSSPending
 val initialDPArgExtension
= event.initialDPArgExtension


 capDialog
.addInitialDPRequest(serviceKey, calledPartyNumber, callingPartyNumber, callingPartysCategory, cgEncountered, ipsspCapabilities, locationNumber, originalCalledPartyID, extensions, highLayerCompatibility, additionalCallingPartyNumber, bearerCapability, eventTypeBCSM, redirectingPartyID, redirectionInformation, cause, serviceInteractionIndicatorsTwo, carrier, cugIndex, cugInterlock, cugOutgoingAccess, imsi, subscriberState, locationInformation, extBasicServiceCode, callReferenceNumber, mscAddress, calledPartyBCDNumber, timeAndTimezone, callForwardingSSPending, initialDPArgExtension)

 logger
.debug("forwardIDP capDialog = {}", capDialog)
 capDialog
.send()

 
} catch (e: Exception) {
 logger
.error("Error while sending forwardIDP request:", e)
 
throw CapGatewayException("Error while forwardIDP SRIForSM request:", e)
 
}
}


Best regards,
Sergey Yashchenkov

четверг, 14 ноября 2019 г., 18:16:17 UTC+3 пользователь Armache Antoni написал:
Thanks Bro

Eugene Prokopiev

unread,
Nov 15, 2019, 3:12:25 AM11/15/19
to mobicent...@googlegroups.com
Hi Sergey,

Very interesting example! Maybe you have simple IDP processing example
with ReleaseCall or so, but with full development environment (source
+ maven/gradle/sbt configuration)?

пт, 15 нояб. 2019 г. в 10:53, BarbosSergos <barbos...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "mobicents-public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mobicents-public/463551ba-d4c5-4492-b2d3-f581324dbdfc%40googlegroups.com.



--
WBR,
Eugene Prokopiev

BarbosSergos

unread,
Nov 15, 2019, 6:04:07 AM11/15/19
to mobicents-public
Hi Eugene,

Unfortunately, I can't share it with you, all my projects a business-related.
I would recommend to read these articles (I read them when trying to create first SBB):

As per your scenario, it's pretty simple - just add Release object to dialog and send it back:
capDialog.addReleaseCallRequest(customInvokeTimeout, cause)
capDialog.send()

Best regards,
Sergey Yashchenkov

пятница, 15 ноября 2019 г., 11:12:25 UTC+3 пользователь Eugene Prokopiev написал:
> To unsubscribe from this group and stop receiving emails from it, send an email to mobicent...@googlegroups.com.

Eugene Prokopiev

unread,
Nov 15, 2019, 8:12:28 AM11/15/19
to mobicent...@googlegroups.com
Hi Sergey,

Thank you for urls, I hoped to see standalone project which can
compile without full JAIN SLEE environment with pure jSS7 only :) Is
it possible at least on theory or CAP-related classes can be used in
JAIN SLEE environment only?

пт, 15 нояб. 2019 г. в 14:04, BarbosSergos <barbos...@gmail.com>:
> To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mobicents-public/20a22e4b-254b-4a57-9ef4-9e40d35619a9%40googlegroups.com.



--
WBR,
Eugene Prokopiev

BarbosSergos .

unread,
Nov 15, 2019, 8:23:16 AM11/15/19
to mobicent...@googlegroups.com
Hmm.. It's hard to say as I never did it.

Restcomm jSS7 Stack can work as a standalone library if you do not require JSLEE Resource Adaptors and the Shell Management Tool (Command Line Interface) for run-time configuration of the platform. But if you wish to avail of these, then you must have JBoss Application Server (version 5.1.0.GA) installed on your machine.  

For Sbb which works with Camel protocol we use CAP-RA (Resource Adaptor). So I don't know, is it possible or not to combine standalone jSS7 Stack and CAP-RA without jain-slee.
Try to find the answers in doc above.

Best regards,
Sergey Yashchenkov

пт, 15 нояб. 2019 г. в 16:12, Eugene Prokopiev <e...@itx.ru>:

Armache Antoni

unread,
Nov 15, 2019, 9:06:48 AM11/15/19
to mobicents-public
Hey Barbos,

Thanks for the guidance, example and advises you gave me, it really helped me a lot .  As per your recommendation the issue was related to DTID and OTID.....

Since am not using TCAP....... and am not using CAP ........ my sbb  is only using (MAP PROTOCOL)

So i just change 1 value in my code : [RemoteID]   So my code looks like this now:


    case "Continue":

                log.info("We have receive TCAP-REQ-CONTINUE");
                // Convert Invoke id to int
                int invokeD = (int) event.getInvokeId();

                outgoingMapDialog = this.mapProvider.getMAPServiceSms().createNewDialog(event.getMAPDialog().getApplicationContext(), ModuleHelper.createLocalAddress(), null,
                        ModuleHelper.createRemoteAddress(), null, event.getMAPDialog().getRemoteDialogId());
                outgoingMapDialog.setNetworkId(0);
                outgoingMapDialog.addMtForwardShortMessageRequest(invokeD, sm_RP_DA, sm_RP_OA, sm_RP_UI, event.getMoreMessagesToSend(), event.getExtensionContainer());

           

                // Create the ACI and attach this SBB
                sriDialogACI = this.mapAcif.getActivityContextInterface(outgoingMapDialog);
                sriDialogACI.attach(this.sbbContext.getSbbLocalObject());
                // Forward Request
                outgoingMapDialog.send();

                // set status and reason
                status = "whitelisted";
                reason = "success";

                logCDR.info(tpdu.getOriginatingAddress().getAddressValue() + ",null" + "," + message + "," + status
                        + "," + reason + "," + localAddressGT + "," + remoteAddressGT + ","
                        + ModuleHelper.countChar(message));

                break;
            default:
                log.info("Unknown TCAP STATE");
            }
concatenetedSMS.pcap

BarbosSergos .

unread,
Nov 15, 2019, 9:39:53 AM11/15/19
to mobicent...@googlegroups.com
Hi Antoni,

Glad that it helps.

#Since am not using TCAP....... and am not using CAP ........ my sbb  is only using (MAP PROTOCOL)  
Just to let you know, you also use TCAP as MAP works under the TCAP layer. You can check it in pcap dumps and its illustrated here - https://images.app.goo.gl/7v6ksQAUCyWNH4Ua8

Best regards,
Sergey Yashchenkov

пт, 15 нояб. 2019 г. в 17:06, Armache Antoni <arma...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.

Vladimir Tzanev

unread,
Nov 18, 2019, 7:26:10 AM11/18/19
to mobicents-public
Hello,

This is an example of stand alone MAP Stack withot the JSLEE stuff.

BR,
Vladimir
To unsubscribe from this group and stop receiving emails from it, send an email to mobicent...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages