Revision: b5cb7085b1bc
Author: [email protected] <[email protected]>
Date: Thu Aug 16 06:23:01 2012
Log: Issue 32: Add support for selecting the Application Context (AC)
version
http://code.google.com/p/smscgateway/source/detail?r=b5cb7085b1bc
Added:
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtForwardSmsInterface.java
Modified:
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtActivityContextInterface.java
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtCommonSbb.java
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbb.java
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbbLocalObject.java
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/SriSbb.java
/core/slee/services/mtsbb/src/main/resources/META-INF/sbb-jar.xml
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagement.java
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagementMBean.java
/test/mapmodule/src/main/java/org/mobicents/smsc/ihub/MAPListener.java
=======================================
--- /dev/null
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtForwardSmsInterface.java
Thu Aug 16 06:23:01 2012
@@ -0,0 +1,37 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.mobicents.smsc.slee.services.mt;
+
+import javax.slee.EventContext;
+
+import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
+import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
+
+/**
+ *
+ * @author amit bhayani
+ *
+ */
+public interface MtForwardSmsInterface {
+ public void setupMtForwardShortMessageRequest(ISDNAddressString
networkNode, IMSI imsi,
+ EventContext nullActivityEventContext);
+}
=======================================
---
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtActivityContextInterface.java
Thu Apr 26 01:25:46 2012
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtActivityContextInterface.java
Thu Aug 16 06:23:01 2012
@@ -1,7 +1,33 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.mobicents.smsc.slee.services.mt;
import javax.slee.ActivityContextInterface;
+/**
+ *
+ * @author amit bhayani
+ *
+ */
public interface MtActivityContextInterface extends
ActivityContextInterface {
public int getPendingEventsOnNullActivity();
=======================================
---
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtCommonSbb.java
Wed Aug 15 06:29:01 2012
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtCommonSbb.java
Thu Aug 16 06:23:01 2012
@@ -38,6 +38,7 @@
import org.mobicents.protocols.ss7.indicator.NatureOfAddress;
import org.mobicents.protocols.ss7.indicator.NumberingPlan;
import org.mobicents.protocols.ss7.indicator.RoutingIndicator;
+import org.mobicents.protocols.ss7.map.api.MAPApplicationContextVersion;
import org.mobicents.protocols.ss7.map.api.MAPParameterFactory;
import org.mobicents.protocols.ss7.map.api.MAPProvider;
import org.mobicents.protocols.ss7.map.api.primitives.AddressNature;
@@ -103,6 +104,8 @@
private AddressString serviceCenterAddress;
private SccpAddress serviceCenterSCCPAddress = null;
+ protected MAPApplicationContextVersion maxMAPApplicationContextVersion =
null;
+
public MtCommonSbb(String className) {
this.className = className;
}
@@ -319,6 +322,8 @@
this.mapParameterFactory =
this.mapProvider.getMAPParameterFactory();
this.logger = this.sbbContext.getTracer(this.className);
+
+ this.maxMAPApplicationContextVersion =
MAPApplicationContextVersion.getInstance(smscPropertiesManagement.getMaxMapVersion());
} catch (Exception ne) {
logger.severe("Could not set SBB context:", ne);
}
=======================================
---
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbb.java
Wed Aug 15 06:29:01 2012
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbb.java
Thu Aug 16 06:23:01 2012
@@ -31,15 +31,15 @@
import org.mobicents.protocols.ss7.indicator.RoutingIndicator;
import org.mobicents.protocols.ss7.map.api.MAPApplicationContext;
import org.mobicents.protocols.ss7.map.api.MAPApplicationContextName;
-import org.mobicents.protocols.ss7.map.api.MAPApplicationContextVersion;
import org.mobicents.protocols.ss7.map.api.MAPException;
+import org.mobicents.protocols.ss7.map.api.dialog.MAPRefuseReason;
+import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
import org.mobicents.protocols.ss7.map.api.service.sms.MAPDialogSms;
import
org.mobicents.protocols.ss7.map.api.service.sms.MtForwardShortMessageRequest;
import
org.mobicents.protocols.ss7.map.api.service.sms.MtForwardShortMessageResponse;
import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA;
import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_OA;
-import
org.mobicents.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse;
import org.mobicents.protocols.ss7.map.api.smstpdu.AddressField;
import
org.mobicents.protocols.ss7.map.api.smstpdu.NumberingPlanIdentification;
import org.mobicents.protocols.ss7.map.api.smstpdu.TypeOfNumber;
@@ -52,12 +52,14 @@
import org.mobicents.protocols.ss7.map.smstpdu.UserDataImpl;
import org.mobicents.protocols.ss7.sccp.parameter.GT0100;
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress;
+import org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName;
import org.mobicents.slee.resource.map.events.DialogProviderAbort;
+import org.mobicents.slee.resource.map.events.DialogReject;
import org.mobicents.slee.resource.map.events.DialogTimeout;
import org.mobicents.slee.resource.map.events.ErrorComponent;
import org.mobicents.smsc.slee.services.smpp.server.events.SmsEvent;
-public abstract class MtSbb extends MtCommonSbb {
+public abstract class MtSbb extends MtCommonSbb implements
MtForwardSmsInterface {
private static final String className = "MtSbb";
@@ -105,6 +107,30 @@
// TODO : Set flag for this MSISDN so no more Mt process is
tried,
// rather handed to Mt directly
}
+
+ @Override
+ public void onDialogReject(DialogReject evt, ActivityContextInterface
aci) {
+ MAPRefuseReason mapRefuseReason = evt.getRefuseReason();
+
+ // If ACN not supported, lets use the new one suggested
+ if (mapRefuseReason ==
MAPRefuseReason.ApplicationContextNotSupported) {
+ // lets detach so we don't get onDialogRelease() which
will start
+ // delivering SMS waiting in queue for same MSISDN
+ aci.detach(this.sbbContext.getSbbLocalObject());
+
+ // Now send new SRI with supported ACN
+ ApplicationContextName tcapApplicationContextName =
evt.getAlternativeApplicationContext();
+ MAPApplicationContext supportedMAPApplicationContext =
MAPApplicationContext
+
.getInstance(tcapApplicationContextName.getOid());
+
+ SmsEvent event = this.getOriginalSmsEvent();
+
+ this.sendMtSms(this.getNetworkNode(), this.getImsi(), event,
supportedMAPApplicationContext);
+
+ } else {
+ super.onDialogReject(evt, aci);
+ }
+ }
/**
* SMS Event Handlers
@@ -163,24 +189,57 @@
*
* @throws MAPException
*/
- public void
setupMtForwardShortMessageRequestIndication(SendRoutingInfoForSMResponse
evt,
+ @Override
+ public void setupMtForwardShortMessageRequest(ISDNAddressString
networkNode, IMSI imsi,
EventContext nullActivityEventContext) {
if (this.logger.isInfoEnabled()) {
- this.logger
- .info("Received setupMtForwardShortMessageRequestIndication
SendRoutingInfoForSMResponseIndication= "
- + evt + "
nullActivityEventContext" + nullActivityEventContext);
+ this.logger.info("Received setupMtForwardShortMessageRequestIndication
ISDNAddressString= " + networkNode
+ + " nullActivityEventContext" +
nullActivityEventContext);
}
this.setNullActivityEventContext(nullActivityEventContext);
+ this.setNetworkNode(networkNode);
+ this.setImsi(imsi);
SmsEvent smsEvent = (SmsEvent)
nullActivityEventContext.getEvent();
+
+ this.sendMtSms(networkNode, imsi, smsEvent,
this.getMtFoSMSMAPApplicationContext());
+ }
+
+ /**
+ * CMPs
+ */
+
+ /**
+ * Set the ISDNAddressString of network node where Mt SMS is to be
submitted
+ *
+ * @param networkNode
+ */
+ public abstract void setNetworkNode(ISDNAddressString networkNode);
+
+ public abstract ISDNAddressString getNetworkNode();
+
+ /**
+ * Set the IMSI of destination MSISDN
+ *
+ * @param imsi
+ */
+ public abstract void setImsi(IMSI imsi);
+
+ public abstract IMSI getImsi();
+
+ /**
+ * Private Methods
+ */
+
+ private void sendMtSms(ISDNAddressString networkNode, IMSI imsi, SmsEvent
smsEvent,
+ MAPApplicationContext mapApplicationContext) {
MAPDialogSms mapDialogSms = null;
try {
- mapDialogSms =
this.mapProvider.getMAPServiceSms().createNewDialog(this.getMtFoSMSMAPApplicationContext(),
- this.getServiceCenterSccpAddress(),
null,
-
this.getMSCSccpAddress(evt.getLocationInfoWithLMSI().getNetworkNodeNumber()),
null);
+ mapDialogSms =
this.mapProvider.getMAPServiceSms().createNewDialog(mapApplicationContext,
+ this.getServiceCenterSccpAddress(), null,
this.getMSCSccpAddress(networkNode), null);
- SM_RP_DA sm_RP_DA =
this.mapParameterFactory.createSM_RP_DA(evt.getIMSI());
+ SM_RP_DA sm_RP_DA =
this.mapParameterFactory.createSM_RP_DA(imsi);
SM_RP_OA sm_RP_OA =
this.mapParameterFactory.createSM_RP_OA_ServiceCentreAddressOA(this
.getServiceCenterAddressString());
@@ -205,7 +264,19 @@
SmsSignalInfoImpl SmsSignalInfoImpl = new
SmsSignalInfoImpl(smsDeliverTpduImpl, null);
- mapDialogSms.addMtForwardShortMessageRequest(sm_RP_DA, sm_RP_OA,
SmsSignalInfoImpl, false, null);
+ switch
(mapApplicationContext.getApplicationContextVersion()) {
+ case version3:
+ mapDialogSms.addMtForwardShortMessageRequest(sm_RP_DA, sm_RP_OA,
SmsSignalInfoImpl, false, null);
+ break;
+ case version2:
+ mapDialogSms.addForwardShortMessageRequest(sm_RP_DA, sm_RP_OA,
SmsSignalInfoImpl, false);
+ break;
+ default:
+ // TODO take care of this, but should this ever
happen?
+ logger.severe(String.format("Trying to send Mt SMS with version=%d.
This is serious!!",
+
mapApplicationContext.getApplicationContextVersion().getVersion()));
+ break;
+ }
ActivityContextInterface mtFOSmsDialogACI =
this.mapAcif.getActivityContextInterface(mapDialogSms);
mtFOSmsDialogACI.attach(this.sbbContext.getSbbLocalObject());
@@ -224,17 +295,12 @@
.getNullActivityEventContext().getActivityContextInterface());
this.resumeNullActivityEventDelivery(mtSbbActivityContextInterface,
this.getNullActivityEventContext());
}
-
}
-
- /**
- * Private Methods
- */
private MAPApplicationContext getMtFoSMSMAPApplicationContext() {
if (this.mtFoSMSMAPApplicationContext == null) {
this.mtFoSMSMAPApplicationContext =
MAPApplicationContext.getInstance(
- MAPApplicationContextName.shortMsgMTRelayContext,
MAPApplicationContextVersion.version3);
+ MAPApplicationContextName.shortMsgMTRelayContext,
this.maxMAPApplicationContextVersion);
}
return this.mtFoSMSMAPApplicationContext;
}
=======================================
---
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbbLocalObject.java
Tue May 8 08:35:43 2012
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/MtSbbLocalObject.java
Thu Aug 16 06:23:01 2012
@@ -1,10 +1,32 @@
+/*
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.mobicents.smsc.slee.services.mt;
-import javax.slee.EventContext;
import javax.slee.SbbLocalObject;
-import
org.mobicents.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse;
-
-public interface MtSbbLocalObject extends SbbLocalObject {
- public void
setupMtForwardShortMessageRequestIndication(SendRoutingInfoForSMResponse
evt, EventContext nullActivityEventContext);
+/**
+ *
+ * @author amit bhayani
+ *
+ */
+public interface MtSbbLocalObject extends SbbLocalObject,
MtForwardSmsInterface {
}
=======================================
---
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/SriSbb.java
Wed Aug 15 06:29:01 2012
+++
/core/slee/services/mtsbb/src/main/java/org/mobicents/smsc/slee/services/mt/SriSbb.java
Thu Aug 16 06:23:01 2012
@@ -31,8 +31,8 @@
import org.mobicents.protocols.ss7.indicator.RoutingIndicator;
import org.mobicents.protocols.ss7.map.api.MAPApplicationContext;
import org.mobicents.protocols.ss7.map.api.MAPApplicationContextName;
-import org.mobicents.protocols.ss7.map.api.MAPApplicationContextVersion;
import org.mobicents.protocols.ss7.map.api.MAPException;
+import org.mobicents.protocols.ss7.map.api.dialog.MAPRefuseReason;
import org.mobicents.protocols.ss7.map.api.primitives.AddressNature;
import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
import org.mobicents.protocols.ss7.map.api.service.sms.MAPDialogSms;
@@ -40,11 +40,19 @@
import
org.mobicents.protocols.ss7.map.api.service.sms.SendRoutingInfoForSMResponse;
import org.mobicents.protocols.ss7.sccp.parameter.GT0100;
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress;
+import org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName;
import org.mobicents.slee.resource.map.events.DialogProviderAbort;
+import org.mobicents.slee.resource.map.events.DialogReject;
import org.mobicents.slee.resource.map.events.DialogTimeout;
import org.mobicents.slee.resource.map.events.ErrorComponent;
import org.mobicents.smsc.slee.services.smpp.server.events.SmsEvent;
+/**
+ *
+ *
+ * @author amit bhayani
+ *
+ */
public abstract class SriSbb extends MtCommonSbb {
private static final String className = "SriSbb";
@@ -85,7 +93,7 @@
// which case persist this even in database
// This MSISDN is available. Begin SRI and let Mt process begin
- this.sendSRI(event.getDestAddr());
+ this.sendSRI(event.getDestAddr(),
this.getSRIMAPApplicationContext());
}
@@ -102,6 +110,31 @@
/**
* Dialog Events override from MtCommonSbb that we care
*/
+
+ @Override
+ public void onDialogReject(DialogReject evt, ActivityContextInterface
aci) {
+ MAPRefuseReason mapRefuseReason = evt.getRefuseReason();
+
+ // If ACN not supported, lets use the new one suggested
+ if (mapRefuseReason ==
MAPRefuseReason.ApplicationContextNotSupported) {
+ // lets detach so we don't get onDialogRelease() which
will start
+ // delivering SMS waiting in queue for same MSISDN
+ aci.detach(this.sbbContext.getSbbLocalObject());
+
+ // Now send new SRI with supported ACN
+ ApplicationContextName tcapApplicationContextName =
evt.getAlternativeApplicationContext();
+ MAPApplicationContext supportedMAPApplicationContext =
MAPApplicationContext
+
.getInstance(tcapApplicationContextName.getOid());
+
+ SmsEvent event = this.getOriginalSmsEvent();
+
+ this.sendSRI(event.getDestAddr(),
supportedMAPApplicationContext);
+
+ } else {
+ super.onDialogReject(evt, aci);
+ }
+ }
+
@Override
public void onDialogProviderAbort(DialogProviderAbort evt,
ActivityContextInterface aci) {
super.onDialogProviderAbort(evt, aci);
@@ -149,6 +182,8 @@
this.logger.info("Received SEND_ROUTING_INFO_FOR_SM_RESPONSE = " + evt
+ " Dialog=" + evt.getMAPDialog());
}
+ // lets detach so we don't get onDialogRelease() which will
start
+ // delivering SMS waiting in queue for same MSISDN
aci.detach(this.sbbContext.getSbbLocalObject());
MtSbbLocalObject mtSbbLocalObject = null;
@@ -157,7 +192,8 @@
ChildRelation relation = getMtSbb();
mtSbbLocalObject = (MtSbbLocalObject) relation.create();
- mtSbbLocalObject.setupMtForwardShortMessageRequestIndication(evt,
this.getNullActivityEventContext());
+
mtSbbLocalObject.setupMtForwardShortMessageRequest(evt.getLocationInfoWithLMSI().getNetworkNodeNumber(),
+ evt.getIMSI(),
this.getNullActivityEventContext());
} catch (CreateException e) {
this.logger.severe("Could not create Child SBB", e);
@@ -190,12 +226,12 @@
org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan.ISDN,
destinationAddress);
}
- private void sendSRI(String destinationAddress) {
+ private void sendSRI(String destinationAddress, MAPApplicationContext
mapApplicationContext) {
// Send out SMS
MAPDialogSms mapDialogSms = null;
try {
// 1. Create Dialog first and add the SRI request to it
- mapDialogSms =
this.setupRoutingInfoForSMRequestIndication(destinationAddress);
+ mapDialogSms =
this.setupRoutingInfoForSMRequestIndication(destinationAddress,
mapApplicationContext);
// 2. Create the ACI and attach this SBB
ActivityContextInterface sriDialogACI =
this.mapAcif.getActivityContextInterface(mapDialogSms);
@@ -219,14 +255,14 @@
}
}
- private MAPDialogSms setupRoutingInfoForSMRequestIndication(String
destinationAddress) throws MAPException {
+ private MAPDialogSms setupRoutingInfoForSMRequestIndication(String
destinationAddress,
+ MAPApplicationContext mapApplicationContext) throws
MAPException {
// this.mapParameterFactory.creat
SccpAddress destinationReference =
this.convertAddressFieldToSCCPAddress(destinationAddress);
- MAPDialogSms mapDialogSms =
this.mapProvider.getMAPServiceSms().createNewDialog(
- this.getSRIMAPApplicationContext(),
this.getServiceCenterSccpAddress(), null, destinationReference,
- null);
+ MAPDialogSms mapDialogSms =
this.mapProvider.getMAPServiceSms().createNewDialog(mapApplicationContext,
+ this.getServiceCenterSccpAddress(), null,
destinationReference, null);
mapDialogSms.addSendRoutingInfoForSMRequest(this.getCalledPartyISDNAddressString(destinationAddress),
true,
this.getServiceCenterAddressString(), null,
false, null, null);
@@ -236,13 +272,14 @@
private SccpAddress convertAddressFieldToSCCPAddress(String address) {
GT0100 gt = new GT0100(0, NumberingPlan.ISDN_TELEPHONY,
NatureOfAddress.INTERNATIONAL, address);
- return new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE,
0, gt, smscPropertiesManagement.getHlrSsn());
+ return new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE,
0, gt,
+ smscPropertiesManagement.getHlrSsn());
}
private MAPApplicationContext getSRIMAPApplicationContext() {
if (this.sriMAPApplicationContext == null) {
this.sriMAPApplicationContext =
MAPApplicationContext.getInstance(
- MAPApplicationContextName.shortMsgGatewayContext,
MAPApplicationContextVersion.version3);
+ MAPApplicationContextName.shortMsgGatewayContext,
this.maxMAPApplicationContextVersion);
}
return this.sriMAPApplicationContext;
}
=======================================
--- /core/slee/services/mtsbb/src/main/resources/META-INF/sbb-jar.xml Sun
Aug 12 05:35:01 2012
+++ /core/slee/services/mtsbb/src/main/resources/META-INF/sbb-jar.xml Thu
Aug 16 06:23:01 2012
@@ -241,6 +241,12 @@
<cmp-field>
<cmp-field-name>nullActivityEventContext</cmp-field-name>
</cmp-field>
+ <cmp-field>
+
<cmp-field-name>networkNode</cmp-field-name>
+ </cmp-field>
+ <cmp-field>
+ <cmp-field-name>imsi</cmp-field-name>
+ </cmp-field>
</sbb-abstract-class>
<sbb-local-interface>
<sbb-local-interface-name>
=======================================
---
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagement.java
Wed Aug 15 06:29:01 2012
+++
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagement.java
Thu Aug 16 06:23:01 2012
@@ -41,6 +41,7 @@
private static final String SC_SSN = "scssn";
private static final String HLR_SSN = "hlrssn";
private static final String MSC_SSN = "mscssn";
+ private static final String MAX_MAP_VERSION = "maxmapv";
private static final String TAB_INDENT = "\t";
private static final String CLASS_ATTRIBUTE = "type";
@@ -59,6 +60,7 @@
private int serviceCenterSsn = -1;
private int hlrSsn = -1;
private int mscSsn = -1;
+ private int maxMapVersion = 3;
private SmscPropertiesManagement(String name) {
this.name = name;
@@ -123,6 +125,15 @@
this.mscSsn = mscSsn;
this.store();
}
+
+ public int getMaxMapVersion() {
+ return maxMapVersion;
+ }
+
+ public void setMaxMapVersion(int maxMapVersion) {
+ this.maxMapVersion = maxMapVersion;
+ this.store();
+ }
public void start() throws Exception {
@@ -170,6 +181,7 @@
writer.write(this.serviceCenterSsn, SC_SSN,
Integer.class);
writer.write(this.hlrSsn, HLR_SSN, Integer.class);
writer.write(this.mscSsn, MSC_SSN, Integer.class);
+ writer.write(this.maxMapVersion, MAX_MAP_VERSION,
Integer.class);
writer.close();
} catch (Exception e) {
@@ -193,7 +205,9 @@
this.serviceCenterSsn = reader.read(SC_SSN,
Integer.class);
this.hlrSsn = reader.read(HLR_SSN, Integer.class);
this.mscSsn = reader.read(MSC_SSN, Integer.class);
+ this.maxMapVersion = reader.read(MAX_MAP_VERSION,
Integer.class);
+ reader.close();
} catch (XMLStreamException ex) {
// this.logger.info(
// "Error while re-creating Linksets from persisted
file", ex);
=======================================
---
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagementMBean.java
Wed Aug 15 06:29:01 2012
+++
/core/smpp/src/main/java/org/mobicents/smsc/smpp/SmscPropertiesManagementMBean.java
Thu Aug 16 06:23:01 2012
@@ -38,4 +38,8 @@
public int getMscSsn();
public void setMscSsn(int mscSsn);
+
+ public int getMaxMapVersion();
+
+ public void setMaxMapVersion(int maxMapVersion);
}
=======================================
--- /test/mapmodule/src/main/java/org/mobicents/smsc/ihub/MAPListener.java
Sun Aug 12 05:35:01 2012
+++ /test/mapmodule/src/main/java/org/mobicents/smsc/ihub/MAPListener.java
Thu Aug 16 06:23:01 2012
@@ -258,8 +258,6 @@
// Lets first close the Dialog
MAPDialogSms mapDialogSms = event.getMAPDialog();
- System.err.println("\n" + this.currentMapMessageCount + "\n");
-
if (this.currentMapMessageCount % 7 == 0) {
// Send back AbsentSubscriber for every 7th MtSMS
try {