本文整理汇总了Java中org.mobicents.protocols.ss7.sccp.parameter.SccpAddress类的典型用法代码示例。如果您正苦于以下问题:Java SccpAddress类的具体用法?Java SccpAddress怎么用?Java SccpAddress使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SccpAddress类属于org.mobicents.protocols.ss7.sccp.parameter包,在下文中一共展示了SccpAddress类的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createNewDialog
点赞 3
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Override
public MAPDialogCallHandling createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException(
"Cannot create MAPDialogRoutingInformation because MAPServiceRoutingInformation is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogCallHandlingImpl dialog = new MAPDialogCallHandlingImpl(appCntx, tcapDialog, this.mapProviderImpl, this,
origReference, destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:17,
代码来源:MAPServiceCallHandlingImpl.java
示例2: createNewDialog
点赞 3
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogPdpContextActivation createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference,
SccpAddress destAddress, AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException(
"Cannot create MAPDialogPdpContextActivation because MAPServicePdpContextActivation is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogPdpContextActivationImpl dialog = new MAPDialogPdpContextActivationImpl(appCntx, tcapDialog,
this.mapProviderImpl, this, origReference, destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:17,
代码来源:MAPServicePdpContextActivationImpl.java
示例3: doGet
点赞 3
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<h1>CAMEL Gw Demo Get</h1>");
SccpAddress orgAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 1, 8);
SccpAddress dstAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 2, 8);
XmlCAPDialog copy = new XmlCAPDialog(CAPApplicationContext.CapV1_gsmSSF_to_gsmSCF, orgAddress, dstAddress, 12l,
13l);
try {
byte[] data = factory.serialize(copy);
System.out.println(Arrays.toString(data));
} catch (XMLStreamException e) {
e.printStackTrace();
}
out.println("</body>");
out.println("</html>");
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:23,
代码来源:TestServlet.java
示例4: testXmlCAPDialogNotNull
点赞 3
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Test
public void testXmlCAPDialogNotNull() throws XMLStreamException, CAPException {
SccpAddress orgAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 1, 8);
SccpAddress dstAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 2, 8);
XmlCAPDialog original = new XmlCAPDialog(CAPApplicationContext.CapV1_gsmSSF_to_gsmSCF, orgAddress, dstAddress,
12l, 13l);
byte[] serializedEvent = this.factory.serialize(original);
System.out.println(new String(serializedEvent));
XmlCAPDialog copy = this.factory.deserialize(serializedEvent);
assertNotNull(copy);
assertEquals(copy.getApplicationContext(), original.getApplicationContext());
assertEquals(copy.getLocalDialogId(), original.getLocalDialogId());
assertEquals(copy.getRemoteDialogId(), original.getRemoteDialogId());
assertEquals(copy.getLocalAddress(), original.getLocalAddress());
assertEquals(copy.getRemoteAddress(), original.getRemoteAddress());
assertEquals(copy.getReturnMessageOnError(), original.getReturnMessageOnError());
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:23,
代码来源:XmlCAPDialogTest.java
示例5: testXmlCAPDialogPreArrangedTest
点赞 3
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Test
public void testXmlCAPDialogPreArrangedTest() throws XMLStreamException, CAPException {
SccpAddress orgAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 1, 8);
SccpAddress dstAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 2, 8);
XmlCAPDialog original = new XmlCAPDialog(CAPApplicationContext.CapV1_gsmSSF_to_gsmSCF, orgAddress, dstAddress,
12l, 13l);
original.close(true);
byte[] serializedEvent = this.factory.serialize(original);
System.out.println(new String(serializedEvent));
XmlCAPDialog copy = this.factory.deserialize(serializedEvent);
assertNotNull(copy);
assertEquals(copy.getApplicationContext(), original.getApplicationContext());
assertEquals(copy.getLocalDialogId(), original.getLocalDialogId());
assertEquals(copy.getRemoteDialogId(), original.getRemoteDialogId());
assertEquals(copy.getLocalAddress(), original.getLocalAddress());
assertEquals(copy.getRemoteAddress(), original.getRemoteAddress());
assertEquals(copy.getPrearrangedEnd(), original.getPrearrangedEnd());
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:26,
代码来源:XmlCAPDialogTest.java
示例6: createNewDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogOam createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException("Cannot create MAPDialogOam because MAPServiceOam is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogOamImpl dialog = new MAPDialogOamImpl(appCntx, tcapDialog, this.mapProviderImpl, this, origReference,
destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:16,
代码来源:MAPServiceOamImpl.java
示例7: createNewDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogSupplementary createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException("Cannot create MAPDialogSupplementary because MAPServiceSupplementary is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogSupplementaryImpl dialog = new MAPDialogSupplementaryImpl(appCntx, tcapDialog, this.mapProviderImpl, this,
origReference, destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:16,
代码来源:MAPServiceSupplementaryImpl.java
示例8: createNewDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogSms createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException("Cannot create MAPDialogSms because MAPServiceSms is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogSmsImpl dialog = new MAPDialogSmsImpl(appCntx, tcapDialog, this.mapProviderImpl, this, origReference,
destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:16,
代码来源:MAPServiceSmsImpl.java
示例9: createNewDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogLsm createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference,
SccpAddress destAddress, AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException("Cannot create MAPDialogLsm because MAPServiceLsm is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogLsmImpl dialog = new MAPDialogLsmImpl(appCntx, tcapDialog, this.mapProviderImpl, this, origReference,
destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:16,
代码来源:MAPServiceLsmImpl.java
示例10: createNewDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public MAPDialogMobility createNewDialog(MAPApplicationContext appCntx, SccpAddress origAddress, AddressString origReference, SccpAddress destAddress,
AddressString destReference, Long localTrId) throws MAPException {
// We cannot create a dialog if the service is not activated
if (!this.isActivated())
throw new MAPException("Cannot create MAPDialogMobility because MAPServiceMobility is not activated");
Dialog tcapDialog = this.createNewTCAPDialog(origAddress, destAddress, localTrId);
MAPDialogMobilityImpl dialog = new MAPDialogMobilityImpl(appCntx, tcapDialog, this.mapProviderImpl, this,
origReference, destReference);
this.putMAPDialogIntoCollection(dialog);
return dialog;
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:16,
代码来源:MAPServiceMobilityImpl.java
示例11: createDestAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public SccpAddress createDestAddress() {
if (this.testerHost.getConfigurationData().getMapConfigurationData().getRemoteAddressDigits() == null
|| this.testerHost.getConfigurationData().getMapConfigurationData().getRemoteAddressDigits().equals("")) {
return this.testerHost.getSccpMan().createCalledPartyAddress();
} else {
return this.testerHost.getSccpMan().createCalledPartyAddress(
this.testerHost.getConfigurationData().getMapConfigurationData().getRemoteAddressDigits(),
this.testerHost.getSccpMan().getRemoteSsn());
}
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:11,
代码来源:MapMan.java
示例12: createDestAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public SccpAddress createDestAddress() {
if (this.testerHost.getConfigurationData().getCapConfigurationData().getRemoteAddressDigits() == null
|| this.testerHost.getConfigurationData().getCapConfigurationData().getRemoteAddressDigits().equals("")) {
return this.testerHost.getSccpMan().createCalledPartyAddress();
} else {
return this.testerHost.getSccpMan().createCalledPartyAddress(
this.testerHost.getConfigurationData().getCapConfigurationData().getRemoteAddressDigits(),
this.testerHost.getSccpMan().getRemoteSsn());
}
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:11,
代码来源:CapMan.java
示例13: createCallingPartyAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public SccpAddress createCallingPartyAddress() {
if (this.testerHost.getConfigurationData().getSccpConfigurationData().isRouteOnGtMode()) {
return parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, createGlobalTitle(this.testerHost
.getConfigurationData().getSccpConfigurationData().getCallingPartyAddressDigits()), 0, this.testerHost
.getConfigurationData().getSccpConfigurationData().getLocalSsn());
} else {
return parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, this.testerHost.getConfigurationData()
.getSccpConfigurationData().getLocalSpc(), this.testerHost.getConfigurationData()
.getSccpConfigurationData().getLocalSsn());
}
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:13,
代码来源:SccpMan.java
示例14: createCalledPartyAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public SccpAddress createCalledPartyAddress(String address, int ssn) {
if (this.testerHost.getConfigurationData().getSccpConfigurationData().isRouteOnGtMode()) {
return parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, createGlobalTitle(address),0,
(ssn >= 0 ? ssn : this.testerHost.getConfigurationData().getSccpConfigurationData().getRemoteSsn()));
} else {
return createCalledPartyAddress();
}
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:9,
代码来源:SccpMan.java
示例15: initiateUSSD
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
private void initiateUSSD() throws MAPException {
logger.debug("[[[[[[[[[[ initiateUSSD ]]]]]]]]]]");
//SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
//SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, callingGT, SERVER_SPC, 8);
SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, CLIENT_SPC, 8);
ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
// First create Dialog
MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);
CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);
// USSD String: *111*+11111111111#
// The Charset is null, here we let system use default Charset (UTF-7 as
// explained in GSM 03.38. However if MAP User wants, it can set its own
// impl of Charset
USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);
ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString(
AddressNature.international_number, NumberingPlan.ISDN, "11111111111");
mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);
// This will initiate the TC-BEGIN with INVOKE component
mapDialog.send();
}
开发者ID:P1sec,
项目名称:SigFW,
代码行数:38,
代码来源:SS7Honeypot.java
示例16: initiateUSSD
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
private void initiateUSSD() throws MAPException {
//SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 1, SSN);
//SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, null, 2, SSN);
GlobalTitle callingGT = this.sccpProvider.getParameterFactory().createGlobalTitle("111111111111", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
GlobalTitle calledGT = this.sccpProvider.getParameterFactory().createGlobalTitle("222222222222", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
SccpAddress callingParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, callingGT, CLIENT_SPC, 8);
SccpAddress calledParty = this.sccpStack.getSccpProvider().getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, calledGT, SERVER_SPC, 8);
ISDNAddressString origReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "11111111111");
ISDNAddressString destReference = this.mapProvider.getMAPParameterFactory().createISDNAddressString(AddressNature.international_number, NumberingPlan.land_mobile, "111111111111111");
// First create Dialog
MAPDialogSupplementary mapDialog = this.mapProvider.getMAPServiceSupplementary().createNewDialog(
MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
MAPApplicationContextVersion.version2), callingParty, origReference, calledParty, destReference);
CBSDataCodingSchemeImpl ussdDataCodingScheme = new CBSDataCodingSchemeImpl(0x0F);
// USSD String: *111*+11111111111#
// The Charset is null, here we let system use default Charset (UTF-7 as
// explained in GSM 03.38. However if MAP User wants, it can set its own
// impl of Charset
USSDString ussdString = this.mapProvider.getMAPParameterFactory().createUSSDString("*111*+11111111111#", ussdDataCodingScheme, null);
ISDNAddressString msisdn = this.mapProvider.getMAPParameterFactory().createISDNAddressString(
AddressNature.international_number, NumberingPlan.ISDN, "11111111111");
mapDialog.addProcessUnstructuredSSRequest(ussdDataCodingScheme, ussdString, null, msisdn);
// This will initiate the TC-BEGIN with INVOKE component
mapDialog.send();
}
开发者ID:P1sec,
项目名称:SigFW,
代码行数:37,
代码来源:SS7Client.java
示例17: XmlCAPDialog
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
/**
*
*/
public XmlCAPDialog(CAPApplicationContext appCntx, SccpAddress origAddress, SccpAddress destAddress, Long localId,
Long remoteId) {
this.appCntx = appCntx;
this.origAddress = origAddress;
this.destAddress = destAddress;
this.localId = localId;
this.remoteId = remoteId;
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:12,
代码来源:XmlCAPDialog.java
示例18: testXmlCAPDialogUserAbortReason
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Test
public void testXmlCAPDialogUserAbortReason() throws XMLStreamException, CAPException {
SccpAddress orgAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 1, 8);
SccpAddress dstAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, null, 2, 8);
XmlCAPDialog original = new XmlCAPDialog(CAPApplicationContext.CapV1_gsmSSF_to_gsmSCF, orgAddress, dstAddress,
12l, 13l);
original.abort(CAPUserAbortReason.no_reason_given);
original.setPAbortCauseType(PAbortCauseType.NoCommonDialoguePortion);
byte[] serializedEvent = this.factory.serialize(original);
System.out.println(new String(serializedEvent));
XmlCAPDialog copy = this.factory.deserialize(serializedEvent);
assertNotNull(copy);
assertEquals(copy.getApplicationContext(), original.getApplicationContext());
assertEquals(copy.getLocalDialogId(), original.getLocalDialogId());
assertEquals(copy.getRemoteDialogId(), original.getRemoteDialogId());
assertEquals(copy.getLocalAddress(), original.getLocalAddress());
assertEquals(copy.getRemoteAddress(), original.getRemoteAddress());
assertEquals(copy.getCapUserAbortReason(), original.getCapUserAbortReason());
assertEquals(copy.getPAbortCauseType(), original.getPAbortCauseType());
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:28,
代码来源:XmlCAPDialogTest.java
示例19: testRelease
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
@Test
public void testRelease() throws XMLStreamException, CAPException {
GlobalTitle orgGt = new GlobalTitle0100Impl("1234",0, BCDEvenEncodingScheme.INSTANCE,NumberingPlan.ISDN_MOBILE, NatureOfAddress.NATIONAL);
GlobalTitle dstGt = new GlobalTitle0100Impl("5467",0, BCDEvenEncodingScheme.INSTANCE,NumberingPlan.ISDN_MOBILE, NatureOfAddress.NATIONAL);
SccpAddress orgAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, orgGt, 1, 8);
SccpAddress dstAddress = new SccpAddressImpl(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, dstGt, 2, 8);
XmlCAPDialog original = new XmlCAPDialog(CAPApplicationContext.CapV2_gsmSSF_to_gsmSCF, orgAddress, dstAddress,
12l, 13l);
CauseCapImpl cause = new CauseCapImpl(new byte[] { (byte) 132, (byte) 144 });
ReleaseCallRequestImpl elem = new ReleaseCallRequestImpl(cause);
original.addCAPMessage(elem);
byte[] serializedEvent = this.factory.serialize(original);
System.out.println(new String(serializedEvent));
XmlCAPDialog copy = this.factory.deserialize(serializedEvent);
assertNotNull(copy);
assertEquals(copy.getApplicationContext(), original.getApplicationContext());
assertEquals(copy.getLocalDialogId(), original.getLocalDialogId());
assertEquals(copy.getRemoteDialogId(), original.getRemoteDialogId());
assertEquals(copy.getLocalAddress(), original.getLocalAddress());
}
开发者ID:RestComm,
项目名称:camelgateway,
代码行数:29,
代码来源:XmlCAPDialogTest.java
示例20: setLocalAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public void setLocalAddress(SccpAddress localAddress) {
this.tcapDialog.setLocalAddress(localAddress);
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:4,
代码来源:MAPDialogImpl.java
示例21: setRemoteAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public void setRemoteAddress(SccpAddress remoteAddress) {
this.tcapDialog.setRemoteAddress(remoteAddress);
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:4,
代码来源:MAPDialogImpl.java
示例22: createOrigAddress
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
public SccpAddress createOrigAddress() {
return this.testerHost.getSccpMan().createCallingPartyAddress();
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:4,
代码来源:MapMan.java
示例23: initSccp
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
private void initSccp(Mtp3UserPart mtp3UserPart, int remoteSsn, int localSsn, int dpc, int opc, int ni, String callingPartyAddressDigits, String persistDir, SccpProtocolVersion sccpProtocolVersion)
throws Exception {
this.sccpStack = new SccpStackImpl("TestingSccp");
this.sccpStack.setPersistDir(persistDir);
this.sccpStack.setMtp3UserPart(1, mtp3UserPart);
this.sccpStack.start();
this.sccpStack.removeAllResourses();
this.sccpStack.setSccpProtocolVersion(sccpProtocolVersion);
this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, opc, ni, 0);
this.sccpStack.getRouter().addMtp3Destination(1, 1, dpc, dpc, 0, 255, 255);
this.sccpProvider = this.sccpStack.getSccpProvider();
this.parameterFactory = this.sccpProvider.getParameterFactory();
// router1 = sccpStack1.getRouter();
this.resource = this.sccpStack.getSccpResource();
this.resource.addRemoteSpc(1, dpc, 0, 0);
this.resource.addRemoteSsn(1, dpc, remoteSsn, 0, false);
if (this.testerHost.getConfigurationData().getSccpConfigurationData().isRouteOnGtMode()) {
this.router = this.sccpStack.getRouter();
this.router.addRoutingAddress(1,parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle(""), dpc, 0));
this.router.addRoutingAddress(2,
parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, this.createGlobalTitle(""), opc, localSsn));
SccpAddress pattern = parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle("*"), 0,
0);
String mask = "K";
((RouterImpl) this.router).addRule(1, RuleType.SOLITARY, null, OriginationType.LOCAL, pattern, mask, 1,
-1, null, 0);
pattern = parameterFactory.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, this.createGlobalTitle("*"), 0, 0);
mask = "R";
((RouterImpl) this.router).addRule(2, RuleType.SOLITARY, null, OriginationType.REMOTE, pattern, mask, 2,
-1, null, 0);
}
}
开发者ID:RestComm,
项目名称:phone-simulator,
代码行数:42,
代码来源:SccpMan.java
示例24: initSCCP
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
private void initSCCP() throws Exception {
logger.debug("Initializing SCCP Stack ....");
this.sccpStack = new SccpStackImpl("SctpServerSCCP");
this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt);
this.sccpStack.setPersistDir(persistDir);
this.sccpStack.start();
this.sccpStack.removeAllResourses();
this.sccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0);
this.sccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, 6, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(1, CLIENT_SPC, 7, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(2, CLIENT_SPC, 8, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(3, CLIENT_SPC, 9, 0, false);
this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0);
this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255);
this.sccpProvider = this.sccpStack.getSccpProvider();
this.sccpProvider.registerSccpListener(6, this);
this.sccpProvider.registerSccpListener(7, this);
this.sccpProvider.registerSccpListener(8, this);
this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0);
this.sccpStack.getSccpResource().addRemoteSsn(4, SERVER_SPC, 6, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(5, SERVER_SPC, 7, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(6, SERVER_SPC, 8, 0, false);
this.sccpStack.getSccpResource().addRemoteSsn(7, SERVER_SPC, 9, 0, false);
//this.sccpStack.setPreviewMode(true);
// SCCP routing table
GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, CLIENT_SPC, 0));
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, SSN));
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0);
String mask = "K";
((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null);
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0);
mask = "K";
((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 2, -1, null, 0, null);
logger.debug("Initialized SCCP Stack ....");
}
开发者ID:P1sec,
项目名称:SigFW,
代码行数:54,
代码来源:SS7Honeypot.java
示例25: firewallMessage
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
/**
* Method to execute firewall policy on target SCCP message.
*
* @param mup M3UA instance in forward direction
* @param mupReturn M3UA instance in reverse direction, to return UDTS
* @param opc M3UA OPC
* @param dpc M3UA DPC
* @param sls M3UA SLS
* @param ni M3UA NI
* @param lmrt LongMessageRuleType
* @param message Original SCCP message
* @param reason the reason of discarding the message
* @param lua_hm the LUA parameters, decoded from the message
*/
private void firewallMessage(Mtp3UserPart mup, Mtp3UserPart mupReturn, int opc, int dpc, int sls, int ni, LongMessageRuleType lmrt, SccpDataMessage message, String reason, HashMap<String, String> lua_hm) {
String firewallPolicy = "";
if (SS7FirewallConfig.firewallPolicy == SS7FirewallConfig.FirewallPolicy.DROP_SILENTLY) {
firewallPolicy = "DROP_SILENTLY";
} else if (SS7FirewallConfig.firewallPolicy == SS7FirewallConfig.FirewallPolicy.DROP_WITH_SCCP_ERROR) {
firewallPolicy = "DROP_WITH_SCCP_ERROR";
sendSccpErrorMessage(mupReturn, dpc, opc, sls, ni, lmrt, message, ReturnCauseValue.NO_TRANSLATION_FOR_ADDRESS);
} else if (SS7FirewallConfig.firewallPolicy == SS7FirewallConfig.FirewallPolicy.DNAT_TO_HONEYPOT && dnat_sessions != null
&& message.getCallingPartyAddress() != null
&& message.getCallingPartyAddress().getGlobalTitle() != null
&& message.getCalledPartyAddress() != null
&& message.getCalledPartyAddress().getGlobalTitle() != null
) {
firewallPolicy = "DNAT_TO_HONEYPOT";
GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle(SS7FirewallConfig.honeypot_sccp_gt, 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
SccpAddress sa_dnat = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, message.getCalledPartyAddress().getSubsystemNumber());
SccpAddress sa = message.getCalledPartyAddress();
String session_key = message.getCallingPartyAddress().getGlobalTitle().getDigits();
dnat_sessions.put(session_key, message.getCalledPartyAddress().getGlobalTitle().getDigits() + ":" + message.getCalledPartyAddress().getSubsystemNumber());
message.setCalledPartyAddress(sa_dnat);
sendSccpMessage(mup, opc, dpc, sls, ni, lmrt, message);
} else if (SS7FirewallConfig.firewallPolicy == SS7FirewallConfig.FirewallPolicy.ALLOW) {
firewallPolicy = "ALLOW";
sendSccpMessage(mup, opc, dpc, sls, ni, lmrt, message);
}
logger.info("Blocked message: Reason [" + reason + "] Policy [" + firewallPolicy + "] " + message.toString());
JSONObject json_alert = new JSONObject();
logger.debug("============ LUA variables ============");
// mThreat alerting
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-256");
for (String key : lua_hm.keySet()) {
logger.debug(key + ": " + lua_hm.get(key));
String value = lua_hm.get(key);
// Anonymize MSISDN, IMSI
if (key.equals("map_imsi") || key.equals("map_msisdn")) {
// add salt before hashing
value = SS7FirewallConfig.mthreat_salt + value;
value = DatatypeConverter.printHexBinary(digest.digest(value.getBytes(StandardCharsets.UTF_8)));
}
json_alert.put(key, value);
}
mThreat_alerts.add(json_alert.toJSONString());
} catch (NoSuchAlgorithmException ex) {
java.util.logging.Logger.getLogger(SS7Firewall.class.getName()).log(Level.SEVERE, null, ex);
}
}
开发者ID:P1sec,
项目名称:SigFW,
代码行数:69,
代码来源:SS7Firewall.java
示例26: initSCCP
点赞 2
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; //导入依赖的package包/类
private void initSCCP() throws Exception {
logger.debug("Initializing SCCP Stack ....");
this.sccpStack = new SccpStackImpl("SctpServerSCCP");
this.sccpStack.setMtp3UserPart(1, this.serverM3UAMgmt);
this.sccpStack.setPersistDir(persistDir);
this.sccpStack.start();
this.sccpStack.removeAllResourses();
this.sccpStack.getSccpResource().addRemoteSpc(0, CLIENT_SPC, 0, 0);
this.sccpStack.getSccpResource().addRemoteSsn(0, CLIENT_SPC, SSN, 0, false);
this.sccpStack.getRouter().addMtp3ServiceAccessPoint(1, 1, SERVER_SPC, NETWORK_INDICATOR, 0);
this.sccpStack.getRouter().addMtp3Destination(1, 1, CLIENT_SPC, CLIENT_SPC, 0, 255, 255);
this.sccpProvider = this.sccpStack.getSccpProvider();
this.sccpStack.getSccpResource().addRemoteSpc(1, SERVER_SPC, 0, 0);
this.sccpStack.getSccpResource().addRemoteSsn(1, SERVER_SPC, SSN, 0, false);
//this.sccpStack.setPreviewMode(true);
// SCCP routing table
GlobalTitle gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
this.sccpStack.getRouter().addRoutingAddress(1, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, CLIENT_SPC, 0));
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
this.sccpStack.getRouter().addRoutingAddress(2, this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, SERVER_SPC, SSN));
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
SccpAddress pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0);
String mask = "K";
((RouterImpl) this.sccpStack.getRouter()).addRule(1, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.LOCAL, pattern, mask, 1, -1, null, 0, null);
gt = this.sccpProvider.getParameterFactory().createGlobalTitle("*", 0, org.mobicents.protocols.ss7.indicator.NumberingPlan.ISDN_TELEPHONY, null, NatureOfAddress.INTERNATIONAL);
pattern = this.sccpProvider.getParameterFactory().createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, 0);
mask = "R";
((RouterImpl) this.sccpStack.getRouter()).addRule(2, RuleType.SOLITARY, LoadSharingAlgorithm.Bit0, OriginationType.REMOTE, pattern, mask, 2, -1, null, 0, null);
logger.debug("Initialized SCCP Stack ....");
}
开发者ID:P1sec,
项目名称:SigFW,
代码行数:45,
代码来源:SS7Server.java