JBoss.orgCommunity Documentation
MAP Resource Adaptor Type is defined by JBoss Communications team as part of effort to standardize RA Types.
An MAP activity object represents a set of related events in an MAP resource. This RA Type defines only one activity object:
All the events related to MAP Dialog and events related to Service are fired on this activity.
This activity ends implicitly when MAP stack sends P-Abort or explicitly when user aborts the
Dialog or end's the Dialog.
Class name is
org.mobicents.protocols.ss7.map.api.MAPDialog
New
MAPDialog
activity objects are created via specific MAP Service interface. Check Section 2.4, “Resource Adaptor Interface” section for available services.
Depending on service used, activity object provides additional set of methods. For instance USSD
dialog: org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary
exposes
methods specific for exchange of USSD
messages.
Events represent's MAP's common services as well as services related to USSD Events are fired on
MAPDialog. Below sections detail different type of events, depending on cause of it beeing fired into SLEE.
Below events are fired into SLEE when something happens with components passed in MAP messages.
For proper render of this table prefixes, for entries on some columns are omitted. For prefix values, for each column, please see list below:
ss7.map.
org.mobicents.slee.resource.map.events
Version for all defined events is 1.0
Vendor for all defined events is org.mobicents
Spaces where introduced in
Name
column values, to correctly render the table. Please remove them when using copy/paste.
Table 2.1. Component events
Name | Event Class | Comments |
---|---|---|
INVOKE_TIMEOUT | InvokeTimeout | Fired when localy initiated Invoke does not receive any answer for extended period of time. |
ERROR_COMPONENT | ErrorComponent | Fired when remote peer indicates abnormal component. It indicates some protocol error in component sent from local peer. |
PROVIDER_ERROR_COMPONENT | ProviderErrorComponent | Fired when transport provider encounters error on parsing MAP message. It is similar in meaning to ERROR_COMPONENT, but for component received from remote peer. |
REJECT_COMPONENT | RejectComponent | Fired when remote end rejects component for some reason. |
Dialog events are fired into SLEE to indicate basic occurrence of dialog related data.
For proper render of this table prefixes, for entries on some columns are omitted. For prefix values, for each column, please see list below:
ss7.map.
org.mobicents.slee.resource.map.events
Version for all defined events is 1.0
Vendor for all defined events is org.mobicents
Spaces where introduced in
Name
column values, to correctly render the table. Please remove them when using copy/paste.
Table 2.2. Dialog events
Name | Event Class | Comments |
---|---|---|
DIALOG_DELIMITER | DialogDelimiter | Indicates end of MAP commands that triggered other events to be fired. |
DIALOG_REQUEST | DialogRequest | Generic event representing ANY map request. This event is fired for ALL incoming requests. |
DIALOG_ACCEPT | DialogAccept | Indicates that remote peer acknowledged dialog. This event is fired prior to any other event in such case. |
DIALOG_REJECT | DialogReject | Opposite to DIALOG_ACCEPT. Indicates that remote peer rejected dialog for some reason. This event is fired prior to one indicating reason. |
DIALOG_USERABORT | DialogUserAbort | Fired when remote MAP user aborts dialog. |
DIALOG_PROVIDERABORT | DialogProviderAbort | Fired when when dialog is aborted due to transport level error. |
DIALOG_CLOSE | DialogClose | Fired when dialog is closed via TCAP-END primitive. |
DIALOG_NOTICE | DialogNotice |
Fired when abnormal message is received within dialog. For instance when when duplicated
InvokeID
or wrong operation is received(for running MAP service).
|
DIALOG_TIMEOUT | DialogTimeout | Fired when dialog is about to timeout. Depending on configuration RA may sustain dialog or let it timeout. This event is fired when there is no activity on dialog for extended period of time. |
Below events are fired when dialog receives callbacks for suplementary service.
For proper render of this table prefixes, for entries on some columns are omitted. For prefix values, for each column, please see list below:
ss7.map.service.suplementary.
org.mobicents.protocols.ss7.map.api.service.supplementary.
Version for all defined events is 1.0
Vendor for all defined events is org.mobicents
Spaces where introduced in
Name
column values, to correctly render the table. Please remove them when using copy/paste.
Table 2.3. Suplementary service events
Name | Event Class | Comments |
---|---|---|
UNSTRUCTURED _SS_REQUEST | ProcessUnstructuredSSRequest | Indicates either initial or subsequent USSD message(all non final messages exchanged are of this type). Its exchanged between user device and USSD application. |
UNSTRUCTURED _SS_RESPONSE | ProcessUnstructuredSSResponse | Final message exchanged in USSD dialog. |
PROCESS_UNSTRUCTURED _SS_REQUEST | ProcessUnstructuredSSRequest | As UNSTRUCTURED _SS_REQUEST, however this message is exchanged between SS7 equipment/nodes, like HLR and VLR |
PROCESS_UNSTRUCTURED _SS_RESPONSE | ProcessUnstructuredSSResponse | This event is equivalent of UNSTRUCTURED _SS_RESPONSE. |
UNSTRUCTURED_SS _NOTIFY_REQUEST | UnstructuredSSNotifyRequest | This event represents will of entity to notify user device. |
Below events are fired when dialog receives callbacks for local service management.
For proper render of this table prefixes, for entries on some columns are omitted. For prefix values, for each column, please see list below:
ss7.map.service.lsm.
org.mobicents.protocols.ss7.map.api.service.lsm.
Version for all defined events is 1.0
Vendor for all defined events is org.mobicents
Spaces where introduced in
Name
column values, to correctly render the table. Please remove them when using copy/paste.
Table 2.4. Local service management events
Name | Event Class | Comments |
---|---|---|
PROVIDE_SUBSCRIBER _LOCATION_REQUEST | ProvideSubscriberLocationRequest | This event indicates that GLMC requests location of user device(subscriber). |
PROVIDE_SUBSCRIBER _LOCATION_RESPONSE | ProvideSubscriberLocationResponse | |
SEND_ROUTING_INFO _FOR_LCS_REQUEST | SendRoutingInfoForLCSRequest | This event indicates that SS7 entity requests routing information from HLR. Provided information is used to route SMS |
SEND_ROUTING_INFO _FOR_LCS_RESPONSE | SendRoutingInfoForLCSResponse | |
SUBSCRIBER_LOCATION _REPORT_REQUEST | SubscriberLocationReportRequest | This event indicates change in location of user device. It provides SS7 equipment with update on subscriber location. |
SUBSCRIBER_LOCATION _REPORT_RESPONSE | SubscriberLocationReportResponse |
Below events are fired when dialog receives callbacks for short message service.
For proper render of this table prefixes, for entries on some columns are omitted. For prefix values, for each column, please see list below:
ss7.map.service.sms.
org.mobicents.protocols.ss7.map.api.service.sms.
Version for all defined events is 1.0
Vendor for all defined events is org.mobicents
Spaces where introduced in
Name
column values, to correctly render the table. Please remove them when using copy/paste.
Table 2.5. Short message service events
Name | Event Class | Comments |
---|---|---|
FORWARD_SHORT _MESSAGE_REQUEST | ForwardShortMessageRequest | This event indicates that SMS must be forwarded to another SS7 node. This is MAP Phase 1 event, hence no distinction between MO and MT. |
FORWARD_SHORT _MESSAGE_RESPONSE | ForwardShortMessageResponse | |
MO_FORWARD_SHORT _MESSAGE_REQUEST | MoForwardShortMessageRequest | This event indicates that mobile originated SMS must be forwarded to another SS7 node. |
MO_FORWARD_SHORT _MESSAGE_RESPONSE | MoForwardShortMessageResponse | |
MT_FORWARD_SHORT _MESSAGE_REQUEST | MtForwardShortMessageRequest | This event indicates that mobile terminated SMS must be forwarded to another SS7 node. |
MT_FORWARD_SHORT _MESSAGE_RESPONSE | MtForwardShortMessageResponse | |
SEND_ROUTING_INFO _FOR_SM_REQUEST | SendRoutingInfoForSMRequest | This event indicates that HLR is being queried for routing inforamtion. |
SEND_ROUTING_INFO _FOR_SM_RESPONSE | SendRoutingInfoForSMResponse | |
REPORT_SM_DELIVERY _STATUS_REQUEST | ReportSMDeliveryStatusRequest | This event is used to inform HLR about SMS delivery status. |
REPORT_SM_DELIVERY _STATUS_RESPONSE | ReportSMDeliveryStatusResponse | |
INFORM_SERVICE _CENTER_REQUEST | InformServiceCentreRequest | This event is used by HLR to inform message center about subscriber status. |
ALERT_SERVICE _CENTER_REQUEST | AlertServiceCentreRequest | This event is used by HLR to inform message center about change in subscirber status. |
ALERT_SERVICE _CENTER_RESPONSE | AlertServiceCentreResponse |
The interface of the MAP resource adaptor type specific Activity Context Interface Factory is defined as follows:
package org.mobicents.slee.resource.map; import org.mobicents.protocols.ss7.map.api.MAPDialog; import javax.slee.ActivityContextInterface; import javax.slee.FactoryException; import javax.slee.UnrecognizedActivityException; public interface MAPContextInterfaceFactory { public ActivityContextInterface getActivityContextInterface(MAPDialog dialog) throws NullPointerException, UnrecognizedActivityException, FactoryException; }
The MAP Resource Adaptor SBB Interface provides SBBs with access to the MAP objects required for creating a new, aborting, ending a MAPdialog and sending USSD Request/Response. It is defined as follows:
package org.mobicents.protocols.ss7.map.api; public interface MAPProvider { public abstract void addMAPDialogListener(MAPDialogListener mapdialoglistener); public abstract void removeMAPDialogListener(MAPDialogListener mapdialoglistener); public abstract MAPParameterFactory getMAPParameterFactory(); public abstract MAPErrorMessageFactory getMAPErrorMessageFactory(); public abstract MAPDialog getMAPDialog(Long long1); public abstract MAPServiceSupplementary getMAPServiceSupplementary(); public abstract MAPServiceSms getMAPServiceSms(); public abstract MAPServiceLsm getMAPServiceLsm(); }
this method is not supported. Call to it causes NotSupportedException to be thrown.
this method is not supported. Call to it causes NotSupportedException to be thrown.
retrieves factory for generic MAP components
retrieves implementation of MAP error message factory. Error messages are used to indicate erroneous conditions.
retrieves active dialog by its ID
.
retrieves MAP sumplementary service. It is used to create USSD dialogs.
retrieves MAP SMS service. It is used to create SMS dialogs. In current release it is not supported.
retrieves MAP LMS service. It is used to create LMS dialogs. In current release it is not supported.
As MAP stack is beeing completed, it will support more services, this list of getMAPServiceX
will expand to support all implemented services.
The resource adaptor implementation should prevent SBBs from adding themselves as MAP listeners, or changing the MAP network configuration. Any attempt to do so should be rejected by throwing a SecurityException.
The following code shows complete flow of application receiving the MAP Dialog request and then USSD Request. Application sends back Unstructured SS Response and finally on receiving Unstructured SS Request, application closes the MAPDialog
public abstract class SipSbb implements Sbb { private SbbContext sbbContext; private MAPContextInterfaceFactory mapAcif; private MAPProvider mapProvider; private MAPParameterFactory mapParameterFactory; private static byte ussdDataCodingScheme = 0x0F; private Tracer logger; /** Creates a new instance of CallSbb */ public SipSbb() { } /** * MAP USSD Event Handlers */ public void onProcessUnstructuredSSRequest( ProcessUnstructuredSSIndication evt, ActivityContextInterface aci) { try { long invokeId = evt.getInvokeId(); this.setInvokeId(invokeId); String ussdString = evt.getUSSDString().getString(); this.setUssdString(ussdString); int codingScheme = evt.getUSSDDataCodingScheme() & 0xFF; String msisdn = evt.getMSISDNAddressString().getAddress(); if (this.logger.isFineEnabled()) { this.logger .fine("Received PROCESS_UNSTRUCTURED_ SS_REQUEST_INDICATION for MAP Dialog Id " + evt.getMAPDialog().getDialogId()+ " ussdString = "+ussdString); } USSDString ussdStringObj = this.mapServiceFactory .createUSSDString("1. Movies 2. Songs 3. End"); evt.getMAPDialog().addUnstructuredSSResponse(invokeId, false, ussdDataCodingScheme, ussdStringObj); evt.getMAPDialog().send(); } catch (Exception e) { logger.severe("Error while sending MAP USSD message", e); } } public void onUnstructuredSSRequest(UnstructuredSSIndication evt, ActivityContextInterface aci) { if (this.logger.isFineEnabled()) { this.logger .fine("Received UNSTRUCTURED_SS_REQUEST_INDICATION for MAP Dialog Id " + evt.getMAPDialog().getDialogId()); } try{ MAPDialog mapDialog = evt.getMAPDialog(); USSDString ussdStrObj = evt.getUSSDString(); long invokeId = evt.getInvokeId(); USSDString ussdStringObj = this.mapServiceFactory.createUSSDString("Thank you"); evt.getMAPDialog().addUnstructuredSSResponse(invokeId, false, ussdDataCodingScheme, ussdStringObj); //End MAPDialog evt.getMAPDialog().close(false); }catch(Exception e){ logger.severe("Error while sending MAP USSD ", e); } } ... public void setSbbContext(SbbContext sbbContext) { this.sbbContext = sbbContext; this.logger = sbbContext.getTracer("USSD-SIP"); try { Context ctx = (Context) new InitialContext() .lookup("java:comp/env"); mapAcif = (MAPContextInterfaceFactory) ctx .lookup("slee/resources/map/2.0/acifactory"); mapProvider = (MAPProvider) ctx .lookup("slee/resources/map/2.0/provider"); this.mapParameterFactory = this.mapProvider.getMAPParameterFactory(); } catch (Exception ne) { logger.severe("Could not set SBB context:", ne); } } public void unsetSbbContext() { this.sbbContext = null; this.logger = null; } public void sbbCreate() throws CreateException { } public void sbbPostCreate() throws CreateException { } public void sbbActivate() { } public void sbbPassivate() { } public void sbbLoad() { } public void sbbStore() { } public void sbbRemove() { } public void sbbExceptionThrown(Exception exception, Object object, ActivityContextInterface activityContextInterface) { } public void sbbRolledBack(RolledBackContext rolledBackContext) { } }