本文整理汇总了Java中org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary.send方法的典型用法代码示例。如果您正苦于以下问题:Java MAPDialogSupplementary.send方法的具体用法?Java MAPDialogSupplementary.send怎么用?Java MAPDialogSupplementary.send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary
的用法示例。
在下文中一共展示了MAPDialogSupplementary.send方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addUnstructuredSSRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
/**
* Adds the unstructured ss request.
*
* @param unstructuredSSRequestIndication the unstructured ss request indication
* @param mapDialogSupplementary the map dialog supplementary
* @throws MAPException the MAP exception
*/
protected void addUnstructuredSSRequest(
UnstructuredSSRequest unstructuredSSRequestIndication,
MAPDialogSupplementary mapDialogSupplementary) throws MAPException {
log.entry(unstructuredSSRequestIndication, mapDialogSupplementary);
if (mapDialogSupplementary == null) {
log.exit();
return;
}
mapDialogSupplementary.addUnstructuredSSRequest(
unstructuredSSRequestIndication.getDataCodingScheme(),
unstructuredSSRequestIndication.getUSSDString(), null, null);
try {
mapDialogSupplementary.send();
} finally {
}
log.exit();
}
示例2: performUnstructuredRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
@Override
public String performUnstructuredRequest(String msg) {
if (!isStarted)
return "The tester is not started";
if (msg == null || msg.equals(""))
return "USSD message is empty";
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
MAPDialogSupplementary curDialog = currentDialog;
try {
if (curDialog == null) {
MAPApplicationContext mapUssdAppContext = MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
MAPApplicationContextVersion.version2);
curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(),
this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference());
currentDialog = curDialog;
}
DialogData dd = (DialogData) curDialog.getUserObject();
if (dd == null) {
dd = new DialogData();
curDialog.setUserObject(dd);
}
String res = this.sendUnstructuredRequest(curDialog, msg);
curDialog.send();
return res;
} catch (Exception e) {
this.testerHost.sendNotif(SOURCE_NAME, "Exception when invoking send() : " + e.getMessage(), e, Level.ERROR);
return "Exception when sending UnstructuredSSRequest: " + e.toString();
}
}
示例3: initiateUSSD
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的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();
}
示例4: initiateUSSD
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的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();
}
示例5: performUnstructuredNotify
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
@Override
public String performUnstructuredNotify(String msg) {
if (!isStarted)
return "The tester is not started";
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
if (msg == null || msg.equals(""))
return "USSD message is empty";
USSDString ussdString = null;
try {
ussdString = mapProvider.getMAPParameterFactory().createUSSDString(
msg,
new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdServerConfigurationData()
.getDataCodingScheme()), null);
} catch (MAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ISDNAddressString msisdn = null;
if (this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddress() != null
&& !this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddress().equals("")) {
msisdn = mapProvider.getMAPParameterFactory().createISDNAddressString(
this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddressNature(),
this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnNumberingPlan(),
this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getMsisdnAddress());
}
AlertingPattern alPattern = null;
if (this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getAlertingPattern() >= 0
&& this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().getAlertingPattern() <= 255)
alPattern = new AlertingPatternImpl((byte) this.testerHost.getConfigurationData()
.getTestUssdServerConfigurationData().getAlertingPattern());
MAPDialogSupplementary curDialog = currentDialog;
try {
if (curDialog == null) {
MAPApplicationContext mapUssdAppContext = MAPApplicationContext.getInstance(MAPApplicationContextName.networkUnstructuredSsContext,
MAPApplicationContextVersion.version2);
curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext, this.mapMan.createOrigAddress(),
this.mapMan.createOrigReference(), this.mapMan.createDestAddress(), this.mapMan.createDestReference());
currentDialog = curDialog;
}
DialogData dd = (DialogData) curDialog.getUserObject();
if (dd == null) {
dd = new DialogData();
curDialog.setUserObject(dd);
}
curDialog.addUnstructuredSSNotifyRequest(new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData()
.getTestUssdServerConfigurationData().getDataCodingScheme()), ussdString, alPattern, msisdn);
curDialog.send();
this.countUnstNotifReq++;
String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), this.testerHost.getConfigurationData().getTestUssdServerConfigurationData()
.getDataCodingScheme(), msisdn, alPattern);
this.testerHost.sendNotif(SOURCE_NAME, "Sent: unstrSsNotify: " + msg, uData, Level.DEBUG);
return "UnstructuredSSNotify has been sent";
} catch (MAPException ex) {
return "Exception when sending UnstructuredSSNotify: " + ex.toString();
}
}
示例6: doPerformProcessUnstructuredRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
private String doPerformProcessUnstructuredRequest(String msg, boolean manualMode) {
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
USSDString ussdString = null;
try {
ussdString = mapProvider.getMAPParameterFactory().createUSSDString(
msg,
new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdClientConfigurationData()
.getDataCodingScheme()), null);
} catch (MAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
MAPApplicationContext mapUssdAppContext = MAPApplicationContext.getInstance(
MAPApplicationContextName.networkUnstructuredSsContext, MAPApplicationContextVersion.version2);
try {
MAPDialogSupplementary curDialog = mapProvider.getMAPServiceSupplementary().createNewDialog(mapUssdAppContext,
this.mapMan.createOrigAddress(), this.mapMan.createOrigReference(), this.mapMan.createDestAddress(),
this.mapMan.createDestReference());
if (manualMode) {
currentDialog = curDialog;
}
invokeId = null;
ISDNAddressString msisdn = null;
if (this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getMsisdnAddress() != null
&& !this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getMsisdnAddress()
.equals("")) {
msisdn = mapProvider.getMAPParameterFactory().createISDNAddressString(
this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getMsisdnAddressNature(),
this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getMsisdnNumberingPlan(),
this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getMsisdnAddress());
}
AlertingPattern alPattern = null;
if (this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getAlertingPattern() >= 0
&& this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getAlertingPattern() <= 255) {
alPattern = new AlertingPatternImpl((byte) this.testerHost.getConfigurationData()
.getTestUssdClientConfigurationData().getAlertingPattern());
}
curDialog.addProcessUnstructuredSSRequest(new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData()
.getTestUssdClientConfigurationData().getDataCodingScheme()), ussdString, alPattern, msisdn);
curDialog.send();
if (manualMode) {
currentRequestDef += "Sent procUnstrSsReq=\"" + msg + "\";";
}
this.countProcUnstReq++;
if (this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().isOneNotificationFor100Dialogs()) {
int i1 = countProcUnstReq / 100;
if (countProcUnstReqNot < i1) {
countProcUnstReqNot = i1;
this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsReq: " + (countProcUnstReqNot * 100)
+ " messages sent", "", Level.DEBUG);
}
} else {
String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), this.testerHost.getConfigurationData()
.getTestUssdClientConfigurationData().getDataCodingScheme(), msisdn, alPattern);
this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsReq: " + msg, uData, Level.DEBUG);
}
return "ProcessUnstructuredSSRequest has been sent";
} catch (MAPException ex) {
return "Exception when sending ProcessUnstructuredSSRequest: " + ex.toString();
}
}
示例7: performUnstructuredResponse
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入方法依赖的package包/类
@Override
public String performUnstructuredResponse(String msg) {
if (!isStarted) {
return "The tester is not started";
}
if (this.sender != null) {
return "The tester is not ion manual mode";
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog == null) {
return "No current dialog exists. Start it previousely";
}
if (invokeId == null) {
return "No pending unstructured request";
}
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
// if (msg == null || msg.equals(""))
// return "USSD message is empty";
USSDString ussdString = null;
if (msg != null && !msg.equals("")) {
try {
ussdString = mapProvider.getMAPParameterFactory().createUSSDString(msg,
new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdClientConfigurationData().getDataCodingScheme()), null);
} catch (MAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
curDialog.addUnstructuredSSResponse(invokeId, new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData()
.getTestUssdClientConfigurationData().getDataCodingScheme()), ussdString);
curDialog.send();
invokeId = null;
currentRequestDef += "Sent unstrSsResp=\"" + msg + "\";";
this.countUnstResp++;
String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), this.testerHost.getConfigurationData()
.getTestUssdClientConfigurationData().getDataCodingScheme(), null, null);
this.testerHost.sendNotif(SOURCE_NAME, "Sent: unstrSsResp: " + msg, uData, Level.DEBUG);
return "UnstructuredSSResponse has been sent";
} catch (MAPException ex) {
return "Exception when sending UnstructuredSSResponse: " + ex.toString();
}
}