use of org.mobicents.protocols.ss7.indicator.NatureOfAddress in project smscgateway by RestComm.
the class MessageUtil method getSccpAddress.
public static SccpAddress getSccpAddress(ParameterFactory sccpParameterFact, String address, int ton, int npi, int ssn, GlobalTitleIndicator gti, int translationType) {
NumberingPlan np = MessageUtil.getSccpNumberingPlan(npi);
NatureOfAddress na = MessageUtil.getSccpNatureOfAddress(ton);
GlobalTitle gt;
switch(gti) {
case GLOBAL_TITLE_INCLUDES_TRANSLATION_TYPE_NUMBERING_PLAN_ENCODING_SCHEME_AND_NATURE_OF_ADDRESS:
gt = sccpParameterFact.createGlobalTitle(address, translationType, np, null, na);
break;
case GLOBAL_TITLE_INCLUDES_TRANSLATION_TYPE_NUMBERING_PLAN_AND_ENCODING_SCHEME:
gt = sccpParameterFact.createGlobalTitle(address, translationType, np, null);
break;
case GLOBAL_TITLE_INCLUDES_NATURE_OF_ADDRESS_INDICATOR_ONLY:
gt = sccpParameterFact.createGlobalTitle(address, na);
break;
case GLOBAL_TITLE_INCLUDES_TRANSLATION_TYPE_ONLY:
gt = sccpParameterFact.createGlobalTitle(address, translationType);
break;
default:
gt = sccpParameterFact.createGlobalTitle(address, translationType, np, null, na);
break;
}
return sccpParameterFact.createSccpAddress(RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE, gt, 0, ssn);
}
Aggregations