本文整理汇总了Java中org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary类的典型用法代码示例。如果您正苦于以下问题:Java MAPDialogSupplementary类的具体用法?Java MAPDialogSupplementary怎么用?Java MAPDialogSupplementary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MAPDialogSupplementary类属于org.mobicents.protocols.ss7.map.api.service.supplementary包,在下文中一共展示了MAPDialogSupplementary类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getState
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public String getState() {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(SOURCE_NAME);
sb.append(": CurDialog=");
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null)
sb.append(curDialog.getLocalDialogId());
else
sb.append("No");
sb.append(", Pending dialogs=");
sb.append(this.currentDialogQuere.size());
sb.append("<br>Count: processUnstructuredSSRequest-");
sb.append(countProcUnstReq);
sb.append(", processUnstructuredSSResponse-");
sb.append(countProcUnstResp);
sb.append("<br>unstructuredSSRequest-");
sb.append(countUnstReq);
sb.append(", unstructuredSSResponse-");
sb.append(countUnstResp);
sb.append(", unstructuredSSNotify-");
sb.append(countUnstNotifReq);
sb.append("</html>");
return sb.toString();
}
示例3: closeCurrentDialog
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public String closeCurrentDialog() {
if (isStarted) {
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null) {
try {
curDialog.close(false);
this.doRemoveDialog();
return "The current dialog has been closed";
} catch (MAPException e) {
this.doRemoveDialog();
return "Exception when closing the current dialog: " + e.toString();
}
} else {
return "No current dialog";
}
} else {
return "The tester is not started";
}
}
示例4: onDialogRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public void onDialogRequest(MAPDialog mapDialog, AddressString destReference, AddressString origReference,
MAPExtensionContainer extensionContainer) {
synchronized (this) {
if (mapDialog instanceof MAPDialogSupplementary) {
MAPDialogSupplementary dlg = (MAPDialogSupplementary) mapDialog;
if (this.getProcessSsRequestAction().intValue() == ProcessSsRequestAction.VAL_MANUAL_RESPONSE) {
MAPDialogSupplementary curDialog = this.currentDialog;
if (curDialog == null) {
this.currentDialog = dlg;
} else {
this.currentDialogQuere.add(dlg);
}
}
}
}
}
示例5: closeCurrentDialog
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public String closeCurrentDialog() {
if (!isStarted) {
return "The tester is not started";
}
if (this.sender != null) {
return "The tester is not in a manual mode";
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null) {
try {
MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl();
choice.setUserSpecificReason();
curDialog.abort(choice);
this.doRemoveDialog();
return "The current dialog has been closed";
} catch (MAPException e) {
this.doRemoveDialog();
return "Exception when closing the current dialog: " + e.toString();
}
} else {
return "No current dialog";
}
}
示例6: performProcessUnstructuredRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public String performProcessUnstructuredRequest(String msg) {
if (!isStarted) {
return "The tester is not started";
}
if (this.sender != null) {
return "The tester is not in manual mode";
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null) {
return "The current dialog exists. Finish it previousely";
}
if (msg == null || msg.equals("")) {
return "USSD message is empty";
}
currentRequestDef = "";
return this.doPerformProcessUnstructuredRequest(msg, true);
}
示例7: createNewDialog
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的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;
}
示例8: 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();
}
}
示例9: getState
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public String getState() {
StringBuilder sb = new StringBuilder();
sb.append("<html>");
sb.append(SOURCE_NAME);
sb.append(": CurDialog=");
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != null) {
sb.append(curDialog.getLocalDialogId());
} else {
sb.append("No");
}
sb.append("<br>Count: processUnstructuredSSRequest-");
sb.append(countProcUnstReq);
sb.append(", processUnstructuredSSResponse-");
sb.append(countProcUnstResp);
sb.append("<br>unstructuredSSRequest-");
sb.append(countUnstReq);
sb.append(", unstructuredSSResponse-");
sb.append(countUnstResp);
sb.append(", unstructuredSSNotify-");
sb.append(countUnstNotifReq);
sb.append(", countSriReq-");
sb.append(countSriReq);
sb.append(", countSriResp-");
sb.append(countSriResp);
sb.append(", countErrSent-");
sb.append(countErrSent);
sb.append("</html>");
return sb.toString();
}
示例10: onUnstructuredSSRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public void onUnstructuredSSRequest(UnstructuredSSRequest ind) {
if (!isStarted) {
return;
}
if (currentDialog == null) {
currentDialog = ind.getMAPDialog();
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != ind.getMAPDialog()) {
return;
}
ussdEmptyDialogBeginFlag = 2;
invokeId = ind.getInvokeId();
try {
currentRequestDef += "Rcvd: unstrSsReq=\"" + ind.getUSSDString().getString(null) + "\";";
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
this.countUnstReq++;
String uData = this
.createUssdMessageData(curDialog.getLocalDialogId(), ind.getDataCodingScheme().getCode(), null, null);
try {
this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: unstrSsReq: " + ind.getUSSDString().getString(null), uData,
Level.DEBUG);
} catch (MAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
示例11: onUnstructuredSSNotifyRequest
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
@Override
public void onUnstructuredSSNotifyRequest(UnstructuredSSNotifyRequest ind) {
if (!isStarted) {
return;
}
if (currentDialog == null) {
currentDialog = ind.getMAPDialog();
}
MAPDialogSupplementary curDialog = currentDialog;
if (curDialog != ind.getMAPDialog()) {
return;
}
ussdEmptyDialogBeginFlag = 2;
invokeId = ind.getInvokeId();
this.countUnstNotifReq++;
String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), ind.getDataCodingScheme().getCode(), null, null);
try {
this.testerHost.sendNotif(SOURCE_NAME, "Rcvd: unstrSsNotify: " + ind.getUSSDString().getString(null), uData,
Level.DEBUG);
} catch (MAPException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
curDialog.addUnstructuredSSNotifyResponse(invokeId);
this.testerHost.sendNotif(SOURCE_NAME, "Sent: unstrSsNotifyResp", "-", Level.DEBUG);
// this.needSendClose = true;
this.needSendSend = true;
} catch (MAPException e) {
this.testerHost.sendNotif(SOURCE_NAME,
"Exception when invoking addUnstructuredSSNotifyResponse() : " + e.getMessage(), e, Level.ERROR);
}
}
示例12: 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();
}
示例13: 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();
}
示例14: getMAPDialog
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
public MAPDialogSupplementary getMAPDialog() {
return (MAPDialogSupplementary) super.getMAPDialog();
}
示例15: sendProcessUnstructuredResponse
import org.mobicents.protocols.ss7.map.api.service.supplementary.MAPDialogSupplementary; //导入依赖的package包/类
public String sendProcessUnstructuredResponse(MAPDialogSupplementary curDialog, String msg, long invokeId) {
MAPProvider mapProvider = this.mapMan.getMAPStack().getMAPProvider();
USSDString ussdString = null;
try {
ussdString = mapProvider.getMAPParameterFactory().createUSSDString(
msg,
new CBSDataCodingSchemeImpl(this.testerHost.getConfigurationData().getTestUssdServerConfigurationData()
.getDataCodingScheme()), null);
} catch (MAPException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
curDialog.addProcessUnstructuredSSResponse(invokeId, new CBSDataCodingSchemeImpl(this.testerHost
.getConfigurationData().getTestUssdServerConfigurationData().getDataCodingScheme()), ussdString);
} catch (MAPException e) {
this.testerHost.sendNotif(SOURCE_NAME,
"Exception when invoking addProcessUnstructuredSSResponse() : " + e.getMessage(), e, Level.ERROR);
return "Exception when sending ProcessUnstructuredSSResponse: " + e.toString();
}
currentRequestDef += "procUnstrSsResp=\"" + msg + "\";";
DialogData dd = (DialogData) curDialog.getUserObject();
if (dd != null) {
dd.currentRequestDef = currentRequestDef;
}
this.countProcUnstResp++;
if (this.testerHost.getConfigurationData().getTestUssdServerConfigurationData().isOneNotificationFor100Dialogs()) {
int i1 = countProcUnstResp / 100;
if (countProcUnstRespNot < i1) {
countProcUnstRespNot = i1;
this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsResp: " + (countProcUnstRespNot * 100)
+ " messages sent", "", Level.DEBUG);
}
} else {
String uData = this.createUssdMessageData(curDialog.getLocalDialogId(), this.testerHost.getConfigurationData()
.getTestUssdServerConfigurationData().getDataCodingScheme(), null, null);
this.testerHost.sendNotif(SOURCE_NAME, "Sent: procUnstrSsResp: " + msg, uData, Level.DEBUG);
}
return "ProcessUnstructuredSSResponse has been sent";
}