Search in sources :

Example 1 with ValidityPeriod

use of org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod in project smscgateway by RestComm.

the class TxSmppServerSbb method createSmsEvent.

// *********
// General Sms creating and processing methods
protected Sms createSmsEvent(BaseSm event, Esme origEsme, TargetAddress ta, PersistenceRAInterface store) throws SmscProcessingException {
    Sms sms = new Sms();
    sms.setDbId(UUID.randomUUID());
    sms.setOriginationType(OriginationType.SMPP);
    // checking parameters first
    if (event.getSourceAddress() == null || event.getSourceAddress().getAddress() == null || event.getSourceAddress().getAddress().isEmpty()) {
        throw new SmscProcessingException("SourceAddress digits are absent", SmppConstants.STATUS_INVSRCADR, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_SRC_ADDR_INVALID);
    }
    sms.setSourceAddr(event.getSourceAddress().getAddress());
    sms.setSourceAddrTon(event.getSourceAddress().getTon());
    sms.setSourceAddrNpi(event.getSourceAddress().getNpi());
    sms.setOrigNetworkId(origEsme.getNetworkId());
    int dcs = event.getDataCoding();
    String err = MessageUtil.checkDataCodingSchemeSupport(dcs);
    if (err != null) {
        throw new SmscProcessingException("TxSmpp DataCoding scheme does not supported: " + dcs + " - " + err, SmppExtraConstants.ESME_RINVDCS, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_DATA_CODING_INVALID);
    }
    // storing additional parameters
    ArrayList<Tlv> optionalParameters = event.getOptionalParameters();
    if (optionalParameters != null && optionalParameters.size() > 0) {
        for (Tlv tlv : optionalParameters) {
            if (tlv.getTag() != SmppConstants.TAG_MESSAGE_PAYLOAD) {
                sms.getTlvSet().addOptionalParameter(tlv);
            }
        }
    }
    DataCodingScheme dataCodingScheme = new DataCodingSchemeImpl(dcs);
    sms.setDataCoding(dcs);
    sms.setOrigSystemId(origEsme.getSystemId());
    sms.setOrigEsmeName(origEsme.getName());
    sms.setSubmitDate(new Timestamp(System.currentTimeMillis()));
    sms.setServiceType(event.getServiceType());
    sms.setEsmClass(event.getEsmClass());
    sms.setProtocolId(event.getProtocolId());
    sms.setPriority(event.getPriority());
    sms.setRegisteredDelivery(event.getRegisteredDelivery());
    sms.setReplaceIfPresent(event.getReplaceIfPresent());
    sms.setDefaultMsgId(event.getDefaultMsgId());
    boolean udhPresent = (event.getEsmClass() & SmppConstants.ESM_CLASS_UDHI_MASK) != 0;
    Tlv sarMsgRefNum = event.getOptionalParameter(SmppConstants.TAG_SAR_MSG_REF_NUM);
    Tlv sarTotalSegments = event.getOptionalParameter(SmppConstants.TAG_SAR_TOTAL_SEGMENTS);
    Tlv sarSegmentSeqnum = event.getOptionalParameter(SmppConstants.TAG_SAR_SEGMENT_SEQNUM);
    boolean segmentTlvFlag = (sarMsgRefNum != null && sarTotalSegments != null && sarSegmentSeqnum != null);
    // short message data
    byte[] data = event.getShortMessage();
    if (event.getShortMessageLength() == 0) {
        // Probably the message_payload Optional Parameter is being used
        Tlv messagePaylod = event.getOptionalParameter(SmppConstants.TAG_MESSAGE_PAYLOAD);
        if (messagePaylod != null) {
            data = messagePaylod.getValue();
        }
    }
    if (data == null) {
        data = new byte[0];
    }
    byte[] udhData;
    byte[] textPart;
    String msg;
    udhData = null;
    textPart = data;
    if (udhPresent && data.length > 2) {
        // UDH exists
        int udhLen = (textPart[0] & 0xFF) + 1;
        if (udhLen <= textPart.length) {
            textPart = new byte[textPart.length - udhLen];
            udhData = new byte[udhLen];
            System.arraycopy(data, udhLen, textPart, 0, textPart.length);
            System.arraycopy(data, 0, udhData, 0, udhLen);
        }
    }
    msg = parseShortMessageText(event);
    sms.setShortMessageText(msg);
    sms.setShortMessageBin(udhData);
    // checking of min / max length
    if (origEsme.getMinMessageLength() >= 0 && msg.length() < origEsme.getMinMessageLength()) {
        SmscProcessingException e = new SmscProcessingException("Message length is less than a min length limit for ESME=" + origEsme.getName() + ", len=" + msg.length(), SmppConstants.STATUS_INVMSGLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_SHORT);
        e.setSkipErrorLogging(true);
        throw e;
    }
    if (origEsme.getMaxMessageLength() >= 0 && msg.length() > origEsme.getMaxMessageLength()) {
        SmscProcessingException e = new SmscProcessingException("Message length is more than a max length limit for ESME=" + origEsme.getName() + ", len=" + msg.length(), SmppConstants.STATUS_INVMSGLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_LONG);
        e.setSkipErrorLogging(true);
        throw e;
    }
    // checking max message length
    if (udhPresent || segmentTlvFlag) {
        // here splitting by SMSC is not supported
        UserDataHeader udh = null;
        int lenSolid = MessageUtil.getMaxSolidMessageBytesLength();
        if (udhPresent) {
            udh = new UserDataHeaderImpl(udhData);
        } else {
            udh = createNationalLanguageUdh(origEsme, dataCodingScheme);
            if (udh != null && udh.getNationalLanguageLockingShift() != null) {
                lenSolid -= 3;
                sms.setNationalLanguageLockingShift(udh.getNationalLanguageLockingShift().getNationalLanguageIdentifier().getCode());
            }
            if (udh != null && udh.getNationalLanguageSingleShift() != null) {
                lenSolid -= 3;
                sms.setNationalLanguageSingleShift(udh.getNationalLanguageSingleShift().getNationalLanguageIdentifier().getCode());
            }
        }
        int messageLen = MessageUtil.getMessageLengthInBytes(dataCodingScheme, msg, udh);
        if (udhData != null)
            lenSolid -= udhData.length;
        if (messageLen > lenSolid) {
            throw new SmscProcessingException("Message length in bytes is too big for solid message: " + messageLen + ">" + lenSolid, SmppConstants.STATUS_INVPARLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_LONG);
        }
    } else {
        // here splitting by SMSC is supported
        int lenSegmented = MessageUtil.getMaxSegmentedMessageBytesLength();
        UserDataHeader udh = createNationalLanguageUdh(origEsme, dataCodingScheme);
        if (msg.length() * 2 > (lenSegmented - 6) * 255) {
            // firstly draft length check
            int messageLen = MessageUtil.getMessageLengthInBytes(dataCodingScheme, msg, udh);
            if (udh != null) {
                if (udh.getNationalLanguageLockingShift() != null) {
                    lenSegmented -= 3;
                    sms.setNationalLanguageLockingShift(udh.getNationalLanguageLockingShift().getNationalLanguageIdentifier().getCode());
                }
                if (udh.getNationalLanguageSingleShift() != null) {
                    lenSegmented -= 3;
                    sms.setNationalLanguageSingleShift(udh.getNationalLanguageSingleShift().getNationalLanguageIdentifier().getCode());
                }
            }
            if (messageLen > lenSegmented * 255) {
                throw new SmscProcessingException("Message length in bytes is too big for segmented message: " + messageLen + ">" + lenSegmented, SmppConstants.STATUS_INVPARLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_LONG);
            }
        } else {
            if (udh != null) {
                if (udh.getNationalLanguageLockingShift() != null) {
                    sms.setNationalLanguageLockingShift(udh.getNationalLanguageLockingShift().getNationalLanguageIdentifier().getCode());
                }
                if (udh.getNationalLanguageSingleShift() != null) {
                    sms.setNationalLanguageSingleShift(udh.getNationalLanguageSingleShift().getNationalLanguageIdentifier().getCode());
                }
            }
        }
    }
    // ValidityPeriod processing
    Tlv tlvQosTimeToLive = event.getOptionalParameter(SmppConstants.TAG_QOS_TIME_TO_LIVE);
    Date validityPeriod;
    if (tlvQosTimeToLive != null) {
        long valTime;
        try {
            valTime = (new Date()).getTime() + tlvQosTimeToLive.getValueAsInt();
        } catch (TlvConvertException e) {
            throw new SmscProcessingException("TlvConvertException when getting TAG_QOS_TIME_TO_LIVE tlv field: " + e.getMessage(), SmppConstants.STATUS_INVOPTPARAMVAL, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_VALIDITY_PERIOD_PARSING);
        }
        validityPeriod = new Date(valTime);
    } else {
        try {
            validityPeriod = MessageUtil.parseSmppDate(event.getValidityPeriod());
        } catch (ParseException e) {
            throw new SmscProcessingException("ParseException when parsing ValidityPeriod field: " + e.getMessage(), SmppConstants.STATUS_INVEXPIRY, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_VALIDITY_PERIOD_PARSING);
        }
    }
    MessageUtil.applyValidityPeriod(sms, validityPeriod, true, smscPropertiesManagement.getMaxValidityPeriodHours(), smscPropertiesManagement.getDefaultValidityPeriodHours());
    // ScheduleDeliveryTime processing
    Date scheduleDeliveryTime;
    try {
        scheduleDeliveryTime = MessageUtil.parseSmppDate(event.getScheduleDeliveryTime());
    } catch (ParseException e) {
        throw new SmscProcessingException("ParseException when parsing ScheduleDeliveryTime field: " + e.getMessage(), SmppConstants.STATUS_INVSCHED, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_SCHEDULER_DELIVERY_TIME_PARSING);
    }
    MessageUtil.applyScheduleDeliveryTime(sms, scheduleDeliveryTime);
    SmsSet smsSet;
    smsSet = new SmsSet();
    smsSet.setDestAddr(ta.getAddr());
    smsSet.setDestAddrNpi(ta.getAddrNpi());
    smsSet.setDestAddrTon(ta.getAddrTon());
    smsSet.setNetworkId(origEsme.getNetworkId());
    smsSet.addSms(sms);
    sms.setSmsSet(smsSet);
    long messageId = store.c2_getNextMessageId();
    SmscStatProvider.getInstance().setCurrentMessageId(messageId);
    sms.setMessageId(messageId);
    return sms;
}
Also used : DataCodingScheme(org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme) TlvConvertException(com.cloudhopper.smpp.tlv.TlvConvertException) UserDataHeaderImpl(org.mobicents.protocols.ss7.map.smstpdu.UserDataHeaderImpl) DataCodingSchemeImpl(org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl) Timestamp(java.sql.Timestamp) Date(java.util.Date) ParseException(java.text.ParseException) UserDataHeader(org.mobicents.protocols.ss7.map.api.smstpdu.UserDataHeader) Tlv(com.cloudhopper.smpp.tlv.Tlv)

Example 2 with ValidityPeriod

use of org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod in project smscgateway by RestComm.

the class RxSipServerSbb method sendMessage.

// *********
// Main service methods
/**
 * Sending of a SIP message after initial message or when all sent messages was sent
 *
 * @param smsSet
 * @throws SmscProcessingException
 */
private void sendMessage(SmsSet smsSet) throws SmscProcessingException {
    smscStatAggregator.updateMsgOutTryAll();
    smscStatAggregator.updateMsgOutTrySip();
    Sms sms = this.obtainNextMessage(ProcessingType.SIP);
    if (sms == null) {
        this.markDeliveringIsEnded(true);
        return;
    }
    try {
        // TODO: let make here a special check if SIP is in a good state
        // if not - skip sending and set temporary error
        String fromAddressStr = sms.getSourceAddr();
        String toAddressStr = smsSet.getDestAddr();
        Sip sip = sipManagement.getSipByName(SipManagement.SIP_NAME);
        ListeningPoint listeningPoint = sipRA.getListeningPoints()[0];
        SipURI fromAddressUri = addressFactory.createSipURI(fromAddressStr, listeningPoint.getIPAddress() + ":" + listeningPoint.getPort());
        javax.sip.address.Address fromAddress = addressFactory.createAddress(fromAddressUri);
        FromHeader fromHeader = headerFactory.createFromHeader(fromAddress, null);
        SipURI toAddressUri = addressFactory.createSipURI(toAddressStr, sip.getSipAddress());
        javax.sip.address.Address toAddress = addressFactory.createAddress(toAddressUri);
        ToHeader toHeader = headerFactory.createToHeader(toAddress, null);
        List<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(1);
        ViaHeader viaHeader = headerFactory.createViaHeader(listeningPoint.getIPAddress(), listeningPoint.getPort(), listeningPoint.getTransport(), null);
        viaHeaders.add(viaHeader);
        ContentTypeHeader contentTypeHeader = headerFactory.createContentTypeHeader("text", "plain");
        CSeqHeader cSeqHeader = headerFactory.createCSeqHeader(2L, Request.MESSAGE);
        MaxForwardsHeader maxForwardsHeader = headerFactory.createMaxForwardsHeader(70);
        CallIdHeader callId = this.sipRA.getNewCallId();
        String msgStr = sms.getShortMessageText();
        byte[] msgUdh = sms.getShortMessageBin();
        byte[] msg;
        msg = recodeShortMessage(sms.getDataCoding(), msgStr, msgUdh);
        // create request
        Request request = messageFactory.createRequest(toAddressUri, Request.MESSAGE, callId, cSeqHeader, fromHeader, toHeader, viaHeaders, maxForwardsHeader, contentTypeHeader, msg);
        // Custom X Headers
        // SMSC-ID
        String originEsmeName = sms.getOrigEsmeName();
        if (originEsmeName != null) {
            Header smsIdHeader = headerFactory.createHeader(SipXHeaders.XSmscId, originEsmeName);
            request.addHeader(smsIdHeader);
        }
        // data-coding
        DataCodingScheme dataCodingScheme = new DataCodingSchemeImpl(sms.getDataCoding());
        Header smsIdHeader = headerFactory.createHeader(SipXHeaders.XSmsCoding, Integer.toString(dataCodingScheme.getCharacterSet().getCode()));
        request.addHeader(smsIdHeader);
        // TODO X header message class
        // X header delivery time, use SUBMIT_DATE
        Date submitDate = sms.getSubmitDate();
        if (submitDate != null) {
            String submitDateStr = MessageUtil.formatDate(submitDate);
            Header submitDateHeader = headerFactory.createHeader(SipXHeaders.XDeliveryTime, submitDateStr);
            request.addHeader(submitDateHeader);
        }
        // Validity Period
        Date validityPeriod = sms.getValidityPeriod();
        if (validityPeriod != null) {
            String validityPeriodStr = MessageUtil.formatDate(validityPeriod);
            Header validityHeader = headerFactory.createHeader(SipXHeaders.XSmsValidty, validityPeriodStr);
            request.addHeader(validityHeader);
        }
        // X header UDH
        if (msgUdh != null) {
            String udhString = hexStringToByteArray(msgUdh);
            Header udhHeader = headerFactory.createHeader(SipXHeaders.XSmsUdh, udhString);
            request.addHeader(udhHeader);
        }
        // create client transaction and send request
        ClientTransaction clientTransaction = sipRA.getNewClientTransaction(request);
        ActivityContextInterface sipClientTxaci = this.sipACIFactory.getActivityContextInterface(clientTransaction);
        sipClientTxaci.attach(this.sbbContext.getSbbLocalObject());
        clientTransaction.sendRequest();
    } catch (Exception e) {
        throw new SmscProcessingException("RxSipServerSbb.sendMessage(): Exception while trying to send SIP Message =" + e.getMessage() + "\nMessage: " + sms, 0, 0, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e);
    }
}
Also used : MaxForwardsHeader(javax.sip.header.MaxForwardsHeader) DataCodingScheme(org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme) SmscProcessingException(org.mobicents.smsc.library.SmscProcessingException) ArrayList(java.util.ArrayList) SipURI(javax.sip.address.SipURI) DataCodingSchemeImpl(org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl) ToHeader(javax.sip.header.ToHeader) CallIdHeader(javax.sip.header.CallIdHeader) ActivityContextInterface(javax.slee.ActivityContextInterface) FromHeader(javax.sip.header.FromHeader) ContentTypeHeader(javax.sip.header.ContentTypeHeader) ClientTransaction(javax.sip.ClientTransaction) Request(javax.sip.message.Request) Date(java.util.Date) SmscProcessingException(org.mobicents.smsc.library.SmscProcessingException) CharacterCodingException(java.nio.charset.CharacterCodingException) CSeqHeader(javax.sip.header.CSeqHeader) ViaHeader(javax.sip.header.ViaHeader) CallIdHeader(javax.sip.header.CallIdHeader) Header(javax.sip.header.Header) CSeqHeader(javax.sip.header.CSeqHeader) ContentTypeHeader(javax.sip.header.ContentTypeHeader) MaxForwardsHeader(javax.sip.header.MaxForwardsHeader) ToHeader(javax.sip.header.ToHeader) FromHeader(javax.sip.header.FromHeader) ViaHeader(javax.sip.header.ViaHeader) Sms(org.mobicents.smsc.library.Sms) ListeningPoint(javax.sip.ListeningPoint) Sip(org.mobicents.smsc.domain.Sip)

Example 3 with ValidityPeriod

use of org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod in project smscgateway by RestComm.

the class TxSmppServerSbb method createSmsEventMulti.

protected SubmitMultiParseResult createSmsEventMulti(SubmitMulti event, Esme origEsme, PersistenceRAInterface store, int networkId) throws SmscProcessingException {
    List<Address> addrList = event.getDestAddresses();
    if (addrList == null || addrList.size() == 0) {
        throw new SmscProcessingException("For received SubmitMulti no DestAddresses found: ", SmppConstants.STATUS_INVDLNAME, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_DST_ADDR_INVALID);
    }
    if (event.getSourceAddress() == null || event.getSourceAddress().getAddress() == null || event.getSourceAddress().getAddress().isEmpty()) {
        throw new SmscProcessingException("SourceAddress digits are absent", SmppConstants.STATUS_INVSRCADR, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_SRC_ADDR_INVALID);
    }
    // checking parameters first
    String sourceAddr = event.getSourceAddress().getAddress();
    int sourceAddrTon = event.getSourceAddress().getTon();
    int sourceAddrNpi = event.getSourceAddress().getNpi();
    int dcs = event.getDataCoding();
    String err = MessageUtil.checkDataCodingSchemeSupport(dcs);
    if (err != null) {
        throw new SmscProcessingException("TxSmpp DataCoding scheme does not supported: " + dcs + " - " + err, SmppExtraConstants.ESME_RINVDCS, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_DATA_CODING_INVALID);
    }
    DataCodingScheme dataCodingScheme = new DataCodingSchemeImpl(dcs);
    boolean udhPresent = (event.getEsmClass() & SmppConstants.ESM_CLASS_UDHI_MASK) != 0;
    Tlv sarMsgRefNum = event.getOptionalParameter(SmppConstants.TAG_SAR_MSG_REF_NUM);
    Tlv sarTotalSegments = event.getOptionalParameter(SmppConstants.TAG_SAR_TOTAL_SEGMENTS);
    Tlv sarSegmentSeqnum = event.getOptionalParameter(SmppConstants.TAG_SAR_SEGMENT_SEQNUM);
    boolean segmentTlvFlag = (sarMsgRefNum != null && sarTotalSegments != null && sarSegmentSeqnum != null);
    // short message data
    byte[] data = event.getShortMessage();
    if (event.getShortMessageLength() == 0) {
        // Probably the message_payload Optional Parameter is being used
        Tlv messagePaylod = event.getOptionalParameter(SmppConstants.TAG_MESSAGE_PAYLOAD);
        if (messagePaylod != null) {
            data = messagePaylod.getValue();
        }
    }
    if (data == null) {
        data = new byte[0];
    }
    byte[] udhData;
    byte[] textPart;
    String msg;
    udhData = null;
    textPart = data;
    if (udhPresent && data.length > 2) {
        // UDH exists
        int udhLen = (textPart[0] & 0xFF) + 1;
        if (udhLen <= textPart.length) {
            textPart = new byte[textPart.length - udhLen];
            udhData = new byte[udhLen];
            System.arraycopy(data, udhLen, textPart, 0, textPart.length);
            System.arraycopy(data, 0, udhData, 0, udhLen);
        }
    }
    msg = parseShortMessageText(event);
    // checking max message length
    int nationalLanguageLockingShift = 0;
    int nationalLanguageSingleShift = 0;
    if (udhPresent || segmentTlvFlag) {
        // here splitting by SMSC is not supported
        UserDataHeader udh = null;
        int lenSolid = MessageUtil.getMaxSolidMessageBytesLength();
        if (udhPresent)
            udh = new UserDataHeaderImpl(udhData);
        else {
            udh = createNationalLanguageUdh(origEsme, dataCodingScheme);
            if (udh != null && udh.getNationalLanguageLockingShift() != null) {
                lenSolid -= 3;
                nationalLanguageLockingShift = udh.getNationalLanguageLockingShift().getNationalLanguageIdentifier().getCode();
            }
            if (udh != null && udh.getNationalLanguageSingleShift() != null) {
                lenSolid -= 3;
                nationalLanguageSingleShift = udh.getNationalLanguageSingleShift().getNationalLanguageIdentifier().getCode();
            }
        }
        int messageLen = MessageUtil.getMessageLengthInBytes(dataCodingScheme, msg, udh);
        if (udhData != null)
            messageLen += udhData.length;
        if (messageLen > lenSolid) {
            throw new SmscProcessingException("Message length in bytes is too big for solid message: " + messageLen + ">" + lenSolid, SmppConstants.STATUS_INVPARLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_LONG);
        }
    } else {
        // here splitting by SMSC is supported
        int lenSegmented = MessageUtil.getMaxSegmentedMessageBytesLength();
        if (msg.length() * 2 > (lenSegmented - 6) * 255) {
            // firstly draft length check
            UserDataHeader udh = createNationalLanguageUdh(origEsme, dataCodingScheme);
            int messageLen = MessageUtil.getMessageLengthInBytes(dataCodingScheme, msg, udh);
            if (udh != null && udh.getNationalLanguageLockingShift() != null) {
                lenSegmented -= 3;
                nationalLanguageLockingShift = udh.getNationalLanguageLockingShift().getNationalLanguageIdentifier().getCode();
            }
            if (udh != null && udh.getNationalLanguageSingleShift() != null) {
                lenSegmented -= 3;
                nationalLanguageSingleShift = udh.getNationalLanguageSingleShift().getNationalLanguageIdentifier().getCode();
            }
            if (messageLen > lenSegmented * 255) {
                throw new SmscProcessingException("Message length in bytes is too big for segmented message: " + messageLen + ">" + lenSegmented, SmppConstants.STATUS_INVPARLEN, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, SmscProcessingException.INTERNAL_ERROR_MISC_MSG_TOO_LONG);
            }
        }
    }
    // ValidityPeriod processing
    Tlv tlvQosTimeToLive = event.getOptionalParameter(SmppConstants.TAG_QOS_TIME_TO_LIVE);
    Date validityPeriod;
    if (tlvQosTimeToLive != null) {
        long valTime;
        try {
            valTime = (new Date()).getTime() + tlvQosTimeToLive.getValueAsInt();
        } catch (TlvConvertException e) {
            throw new SmscProcessingException("TlvConvertException when getting TAG_QOS_TIME_TO_LIVE tlv field: " + e.getMessage(), SmppConstants.STATUS_INVOPTPARAMVAL, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_VALIDITY_PERIOD_PARSING);
        }
        validityPeriod = new Date(valTime);
    } else {
        try {
            validityPeriod = MessageUtil.parseSmppDate(event.getValidityPeriod());
        } catch (ParseException e) {
            throw new SmscProcessingException("ParseException when parsing ValidityPeriod field: " + e.getMessage(), SmppConstants.STATUS_INVEXPIRY, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_VALIDITY_PERIOD_PARSING);
        }
    }
    // ScheduleDeliveryTime processing
    Date scheduleDeliveryTime;
    try {
        scheduleDeliveryTime = MessageUtil.parseSmppDate(event.getScheduleDeliveryTime());
    } catch (ParseException e) {
        throw new SmscProcessingException("ParseException when parsing ScheduleDeliveryTime field: " + e.getMessage(), SmppConstants.STATUS_INVSCHED, MAPErrorCode.systemFailure, SmscProcessingException.HTTP_ERROR_CODE_NOT_SET, null, e, SmscProcessingException.INTERNAL_ERROR_MISC_SCHEDULER_DELIVERY_TIME_PARSING);
    }
    long messageId = store.c2_getNextMessageId();
    SmscStatProvider.getInstance().setCurrentMessageId(messageId);
    ArrayList<Sms> msgList = new ArrayList<Sms>(addrList.size());
    ArrayList<UnsucessfulSME> badAddresses = new ArrayList<UnsucessfulSME>(addrList.size());
    for (Address address : addrList) {
        boolean succAddr = false;
        TargetAddress ta = null;
        try {
            ta = createDestTargetAddress(address, networkId);
            succAddr = true;
        } catch (SmscProcessingException e) {
            Address addr = (Address) e.getExtraErrorData();
            if (addr != null) {
                UnsucessfulSME asme = new UnsucessfulSME(e.getSmppErrorCode(), addr);
                badAddresses.add(asme);
            }
        }
        if (succAddr) {
            Sms sms = new Sms();
            sms.setDbId(UUID.randomUUID());
            sms.setOriginationType(OriginationType.SMPP);
            sms.setSourceAddr(sourceAddr);
            sms.setSourceAddrTon(sourceAddrTon);
            sms.setSourceAddrNpi(sourceAddrNpi);
            sms.setOrigNetworkId(networkId);
            sms.setDataCoding(dcs);
            sms.setNationalLanguageLockingShift(nationalLanguageLockingShift);
            sms.setNationalLanguageSingleShift(nationalLanguageSingleShift);
            sms.setOrigSystemId(origEsme.getSystemId());
            sms.setOrigEsmeName(origEsme.getName());
            sms.setSubmitDate(new Timestamp(System.currentTimeMillis()));
            sms.setServiceType(event.getServiceType());
            sms.setEsmClass(event.getEsmClass());
            sms.setProtocolId(event.getProtocolId());
            sms.setPriority(event.getPriority());
            sms.setRegisteredDelivery(event.getRegisteredDelivery());
            sms.setReplaceIfPresent(event.getReplaceIfPresent());
            sms.setDefaultMsgId(event.getDefaultMsgId());
            sms.setShortMessageText(msg);
            sms.setShortMessageBin(udhData);
            MessageUtil.applyValidityPeriod(sms, validityPeriod, true, smscPropertiesManagement.getMaxValidityPeriodHours(), smscPropertiesManagement.getDefaultValidityPeriodHours());
            MessageUtil.applyScheduleDeliveryTime(sms, scheduleDeliveryTime);
            // storing additional parameters
            ArrayList<Tlv> optionalParameters = event.getOptionalParameters();
            if (optionalParameters != null && optionalParameters.size() > 0) {
                for (Tlv tlv : optionalParameters) {
                    if (tlv.getTag() != SmppConstants.TAG_MESSAGE_PAYLOAD) {
                        sms.getTlvSet().addOptionalParameter(tlv);
                    }
                }
            }
            SmsSet smsSet;
            smsSet = new SmsSet();
            smsSet.setDestAddr(ta.getAddr());
            smsSet.setDestAddrNpi(ta.getAddrNpi());
            smsSet.setDestAddrTon(ta.getAddrTon());
            smsSet.setNetworkId(origEsme.getNetworkId());
            smsSet.addSms(sms);
            sms.setSmsSet(smsSet);
            sms.setMessageId(messageId);
            msgList.add(sms);
        }
    }
    return new SubmitMultiParseResult(msgList, badAddresses);
}
Also used : DataCodingScheme(org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme) UserDataHeaderImpl(org.mobicents.protocols.ss7.map.smstpdu.UserDataHeaderImpl) Address(com.cloudhopper.smpp.type.Address) UnsucessfulSME(com.cloudhopper.smpp.type.UnsucessfulSME) ArrayList(java.util.ArrayList) DataCodingSchemeImpl(org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl) Timestamp(java.sql.Timestamp) UserDataHeader(org.mobicents.protocols.ss7.map.api.smstpdu.UserDataHeader) Tlv(com.cloudhopper.smpp.tlv.Tlv) TlvConvertException(com.cloudhopper.smpp.tlv.TlvConvertException) Date(java.util.Date) ParseException(java.text.ParseException)

Example 4 with ValidityPeriod

use of org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod in project smscgateway by RestComm.

the class MoSbbTest method testMo3_Usc2.

@Test(groups = { "Mo" })
public void testMo3_Usc2() throws Exception {
    if (!this.cassandraDbInited)
        return;
    // this.clearDatabase();
    // SmppSessionsProxy smppServerSessions = new SmppSessionsProxy();
    // this.sbb.setSmppServerSessions(smppServerSessions);
    AddressString serviceCentreAddressDA = new AddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, "1111");
    SM_RP_DA sm_RP_DA = new SM_RP_DAImpl(serviceCentreAddressDA);
    ISDNAddressString msisdn = new ISDNAddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, "4444");
    SM_RP_OAImpl sm_RP_OA = new SM_RP_OAImpl();
    sm_RP_OA.setMsisdn(msisdn);
    AddressField destinationAddress = new AddressFieldImpl(TypeOfNumber.InternationalNumber, NumberingPlanIdentification.ISDNTelephoneNumberingPlan, "5555");
    ProtocolIdentifier protocolIdentifier = new ProtocolIdentifierImpl(12);
    DataCodingScheme dataCodingScheme = new DataCodingSchemeImpl(8);
    UserData userData = new UserDataImpl(new String("������"), dataCodingScheme, null, null);
    // String decodedMessage, DataCodingScheme dataCodingScheme, UserDataHeader decodedUserDataHeader, Charset gsm8Charset
    SmsTpdu tpdu = new SmsSubmitTpduImpl(false, false, false, 150, destinationAddress, protocolIdentifier, null, userData);
    // boolean rejectDuplicates, boolean replyPathExists, boolean statusReportRequest, int messageReference,
    // AddressField destinationAddress, ProtocolIdentifier protocolIdentifier, ValidityPeriod validityPeriod, UserData userData
    // tpdu.encodeData();
    SmsSignalInfo sm_RP_UI = new SmsSignalInfoImpl(tpdu, null);
    ForwardShortMessageRequest event = new ForwardShortMessageRequestImpl(sm_RP_DA, sm_RP_OA, sm_RP_UI, false);
    // ActivityContextInterface aci = new SmppTransactionProxy(esme);
    // Date curDate = new Date();
    // this.fillSm(event, curDate, true);
    // event.setShortMessage(msg);
    long dueSlot = this.pers.c2_getDueSlotForTime(new Date());
    PreparedStatementCollection psc = this.pers.getStatementCollection(new Date());
    int b1 = this.pers.checkSmsExists(dueSlot, ta1.getTargetId());
    long b2 = this.pers.c2_getDueSlotForTargetId(psc, ta1.getTargetId());
    assertEquals(b1, 0);
    assertEquals(b2, 0L);
    MAPProviderProxy proxy = new MAPProviderProxy();
    MAPDialogSmsProxy dialog = new MAPDialogSmsProxy(new MAPServiceSmsProxy(proxy), null, null, null);
    event.setMAPDialog(dialog);
    Date curDate = new Date();
    MAPApplicationContext act = MAPApplicationContext.getInstance(MAPApplicationContextName.shortMsgMORelayContext, MAPApplicationContextVersion.version2);
    dialog.setApplicationContext(act);
    this.sbb.onForwardShortMessageRequest(event, null);
    b2 = this.pers.c2_getDueSlotForTargetId(psc, ta1.getTargetId());
    dueSlot = b2;
    b1 = this.pers.checkSmsExists(dueSlot, ta1.getTargetId());
    assertEquals(b1, 1);
    assertEquals(b2, dueSlot);
    assertEquals(dialog.getResponseCount(), 1);
    assertEquals(dialog.getErrorList().size(), 0);
    SmsSet smsSet = this.pers.c2_getRecordListForTargeId(dueSlot, ta1.getTargetId());
    assertEquals(smsSet.getDestAddr(), "5555");
    assertEquals(smsSet.getDestAddrTon(), SmppConstants.TON_INTERNATIONAL);
    assertEquals(smsSet.getDestAddrNpi(), SmppConstants.NPI_E164);
    assertEquals(smsSet.getInSystem(), 0);
    assertEquals(smsSet.getDueDelay(), 0);
    assertNull(smsSet.getStatus());
    assertFalse(smsSet.isAlertingSupported());
    Sms sms = smsSet.getSms(0);
    assertNotNull(sms);
    assertEquals(sms.getSourceAddr(), "4444");
    assertEquals(sms.getSourceAddrTon(), SmppConstants.TON_INTERNATIONAL);
    assertEquals(sms.getSourceAddrNpi(), SmppConstants.NPI_E164);
    assertEquals(sms.getMessageId(), DBOperations.MESSAGE_ID_LAG + 1);
    assertEquals(sms.getMoMessageRef(), 150);
    assertEquals(sms.getDataCoding(), 8);
    assertNull(sms.getOrigEsmeName());
    assertNull(sms.getOrigSystemId());
    assertNull(sms.getServiceType());
    assertEquals(sms.getEsmClass() & 0xFF, 3);
    assertEquals(sms.getRegisteredDelivery(), 0);
    assertEquals(sms.getProtocolId(), 12);
    assertEquals(sms.getPriority(), 0);
    assertEquals(sms.getReplaceIfPresent(), 0);
    assertEquals(sms.getDefaultMsgId(), 0);
    assertEquals(sms.getTlvSet().getOptionalParameterCount(), 0);
    assertNull(sms.getScheduleDeliveryTime());
    assertDateEq(sms.getValidityPeriod(), MessageUtil.addHours(curDate, 24 * 3));
    assertEquals(sms.getDeliveryCount(), 0);
    // assertDateEq(smsSet.getDueDate(), new Date(curDate.getTime() + 1 * 60 * 1000));
    // Charset ucs2Charset = Charset.forName("UTF-16BE");
    // ByteBuffer bb = ByteBuffer.wrap(sms.getShortMessage());
    // CharBuffer bf = ucs2Charset.decode(bb);
    // String s = bf.toString();
    // assertEquals(s, "������");
    assertEquals(sms.getShortMessageText(), "������");
    assertNull(sms.getShortMessageBin());
}
Also used : DataCodingScheme(org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme) MAPServiceSmsProxy(org.mobicents.smsc.slee.resources.persistence.MAPServiceSmsProxy) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) AddressString(org.mobicents.protocols.ss7.map.api.primitives.AddressString) UserData(org.mobicents.protocols.ss7.map.api.smstpdu.UserData) SmsTpdu(org.mobicents.protocols.ss7.map.api.smstpdu.SmsTpdu) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) SmsSignalInfoImpl(org.mobicents.protocols.ss7.map.service.sms.SmsSignalInfoImpl) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) AddressString(org.mobicents.protocols.ss7.map.api.primitives.AddressString) DataCodingSchemeImpl(org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl) ProtocolIdentifierImpl(org.mobicents.protocols.ss7.map.smstpdu.ProtocolIdentifierImpl) SmsSignalInfo(org.mobicents.protocols.ss7.map.api.service.sms.SmsSignalInfo) UserDataImpl(org.mobicents.protocols.ss7.map.smstpdu.UserDataImpl) MAPProviderProxy(org.mobicents.smsc.slee.resources.persistence.MAPProviderProxy) ProtocolIdentifier(org.mobicents.protocols.ss7.map.api.smstpdu.ProtocolIdentifier) ISDNAddressStringImpl(org.mobicents.protocols.ss7.map.primitives.ISDNAddressStringImpl) AddressStringImpl(org.mobicents.protocols.ss7.map.primitives.AddressStringImpl) AddressField(org.mobicents.protocols.ss7.map.api.smstpdu.AddressField) MoForwardShortMessageRequestImpl(org.mobicents.protocols.ss7.map.service.sms.MoForwardShortMessageRequestImpl) ForwardShortMessageRequestImpl(org.mobicents.protocols.ss7.map.service.sms.ForwardShortMessageRequestImpl) SM_RP_DAImpl(org.mobicents.protocols.ss7.map.service.sms.SM_RP_DAImpl) AddressFieldImpl(org.mobicents.protocols.ss7.map.smstpdu.AddressFieldImpl) MoForwardShortMessageRequest(org.mobicents.protocols.ss7.map.api.service.sms.MoForwardShortMessageRequest) ForwardShortMessageRequest(org.mobicents.protocols.ss7.map.api.service.sms.ForwardShortMessageRequest) SM_RP_OAImpl(org.mobicents.protocols.ss7.map.service.sms.SM_RP_OAImpl) Date(java.util.Date) PreparedStatementCollection(org.mobicents.smsc.cassandra.PreparedStatementCollection) MAPDialogSmsProxy(org.mobicents.smsc.slee.resources.persistence.MAPDialogSmsProxy) ISDNAddressStringImpl(org.mobicents.protocols.ss7.map.primitives.ISDNAddressStringImpl) Sms(org.mobicents.smsc.library.Sms) SM_RP_DA(org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA) MAPApplicationContext(org.mobicents.protocols.ss7.map.api.MAPApplicationContext) SmsSet(org.mobicents.smsc.library.SmsSet) SmsSubmitTpduImpl(org.mobicents.protocols.ss7.map.smstpdu.SmsSubmitTpduImpl) Test(org.testng.annotations.Test)

Example 5 with ValidityPeriod

use of org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod in project smscgateway by RestComm.

the class MoSbbTest method testMo1_Gsm7.

@Test(groups = { "Mo" })
public void testMo1_Gsm7() throws Exception {
    if (!this.cassandraDbInited)
        return;
    // this.clearDatabase();
    // SmppSessionsProxy smppServerSessions = new SmppSessionsProxy();
    // this.sbb.setSmppServerSessions(smppServerSessions);
    AddressString serviceCentreAddressDA = new AddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, "1111");
    SM_RP_DA sm_RP_DA = new SM_RP_DAImpl(serviceCentreAddressDA);
    ISDNAddressString msisdn = new ISDNAddressStringImpl(AddressNature.international_number, NumberingPlan.ISDN, "4444");
    SM_RP_OAImpl sm_RP_OA = new SM_RP_OAImpl();
    sm_RP_OA.setMsisdn(msisdn);
    AddressField destinationAddress = new AddressFieldImpl(TypeOfNumber.InternationalNumber, NumberingPlanIdentification.ISDNTelephoneNumberingPlan, "5555");
    ProtocolIdentifier protocolIdentifier = new ProtocolIdentifierImpl(12);
    // 11==60min
    ValidityPeriod validityPeriod = new ValidityPeriodImpl(11);
    DataCodingScheme dataCodingScheme = new DataCodingSchemeImpl(0);
    UserDataHeader decodedUserDataHeader = new UserDataHeaderImpl();
    UserDataHeaderElement informationElement = new ConcatenatedShortMessagesIdentifierImpl(false, 55, 3, 1);
    decodedUserDataHeader.addInformationElement(informationElement);
    UserData userData = new UserDataImpl(new String("0123456789"), dataCodingScheme, decodedUserDataHeader, null);
    // userData.encode();
    // String decodedMessage, DataCodingScheme dataCodingScheme, UserDataHeader decodedUserDataHeader, Charset gsm8Charset
    SmsTpdu tpdu = new SmsSubmitTpduImpl(false, true, false, 150, destinationAddress, protocolIdentifier, validityPeriod, userData);
    // boolean rejectDuplicates, boolean replyPathExists, boolean statusReportRequest, int messageReference,
    // AddressField destinationAddress, ProtocolIdentifier protocolIdentifier, ValidityPeriod validityPeriod, UserData userData
    // tpdu.encodeData();
    SmsSignalInfo sm_RP_UI = new SmsSignalInfoImpl(tpdu, null);
    MoForwardShortMessageRequest event = new MoForwardShortMessageRequestImpl(sm_RP_DA, sm_RP_OA, sm_RP_UI, null, null);
    // ActivityContextInterface aci = new SmppTransactionProxy(esme);
    // Date curDate = new Date();
    // this.fillSm(event, curDate, true);
    // event.setShortMessage(msg);
    long dueSlot = this.pers.c2_getDueSlotForTime(new Date());
    PreparedStatementCollection psc = this.pers.getStatementCollection(new Date());
    int b1 = this.pers.checkSmsExists(dueSlot, ta1.getTargetId());
    long b2 = this.pers.c2_getDueSlotForTargetId(psc, ta1.getTargetId());
    assertEquals(b1, 0);
    assertEquals(b2, 0L);
    MAPProviderProxy proxy = new MAPProviderProxy();
    MAPDialogSmsProxy dialog = new MAPDialogSmsProxy(new MAPServiceSmsProxy(proxy), null, null, null);
    event.setMAPDialog(dialog);
    Date curDate = new Date();
    this.sbb.onMoForwardShortMessageRequest(event, null);
    b2 = this.pers.c2_getDueSlotForTargetId(psc, ta1.getTargetId());
    dueSlot = b2;
    b1 = this.pers.checkSmsExists(dueSlot, ta1.getTargetId());
    assertEquals(b1, 1);
    assertEquals(b2, dueSlot);
    assertEquals(dialog.getResponseCount(), 1);
    assertEquals(dialog.getErrorList().size(), 0);
    SmsSet smsSet = this.pers.c2_getRecordListForTargeId(dueSlot, ta1.getTargetId());
    assertEquals(smsSet.getDestAddr(), "5555");
    assertEquals(smsSet.getDestAddrTon(), SmppConstants.TON_INTERNATIONAL);
    assertEquals(smsSet.getDestAddrNpi(), SmppConstants.NPI_E164);
    assertEquals(smsSet.getInSystem(), 0);
    assertEquals(smsSet.getDueDelay(), 0);
    assertNull(smsSet.getStatus());
    assertFalse(smsSet.isAlertingSupported());
    Sms sms = smsSet.getSms(0);
    assertNotNull(sms);
    assertEquals(sms.getSourceAddr(), "4444");
    assertEquals(sms.getSourceAddrTon(), SmppConstants.TON_INTERNATIONAL);
    assertEquals(sms.getSourceAddrNpi(), SmppConstants.NPI_E164);
    assertEquals(sms.getMessageId(), DBOperations.MESSAGE_ID_LAG + 1);
    assertEquals(sms.getMoMessageRef(), 150);
    assertEquals(sms.getDataCoding(), 0);
    assertNull(sms.getOrigEsmeName());
    assertNull(sms.getOrigSystemId());
    assertNull(sms.getServiceType());
    assertEquals(sms.getEsmClass() & 0xFF, 195);
    assertEquals(sms.getRegisteredDelivery(), 0);
    assertEquals(sms.getProtocolId(), 12);
    assertEquals(sms.getPriority(), 0);
    assertEquals(sms.getReplaceIfPresent(), 0);
    assertEquals(sms.getDefaultMsgId(), 0);
    assertEquals(sms.getTlvSet().getOptionalParameterCount(), 0);
    assertNull(sms.getScheduleDeliveryTime());
    assertDateEq(sms.getValidityPeriod(), MessageUtil.addHours(curDate, 1));
    assertEquals(sms.getDeliveryCount(), 0);
    // assertDateEq(smsSet.getDueDate(), new Date(curDate.getTime() + 1 * 60 * 1000));
    assertEquals(sms.getShortMessageText(), "0123456789");
    assertEquals(sms.getShortMessageBin(), decodedUserDataHeader.getEncodedData());
}
Also used : DataCodingScheme(org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme) UserDataHeaderImpl(org.mobicents.protocols.ss7.map.smstpdu.UserDataHeaderImpl) MAPServiceSmsProxy(org.mobicents.smsc.slee.resources.persistence.MAPServiceSmsProxy) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) AddressString(org.mobicents.protocols.ss7.map.api.primitives.AddressString) UserData(org.mobicents.protocols.ss7.map.api.smstpdu.UserData) SmsTpdu(org.mobicents.protocols.ss7.map.api.smstpdu.SmsTpdu) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) SmsSignalInfoImpl(org.mobicents.protocols.ss7.map.service.sms.SmsSignalInfoImpl) ISDNAddressString(org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString) AddressString(org.mobicents.protocols.ss7.map.api.primitives.AddressString) DataCodingSchemeImpl(org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl) MoForwardShortMessageRequestImpl(org.mobicents.protocols.ss7.map.service.sms.MoForwardShortMessageRequestImpl) ProtocolIdentifierImpl(org.mobicents.protocols.ss7.map.smstpdu.ProtocolIdentifierImpl) SmsSignalInfo(org.mobicents.protocols.ss7.map.api.service.sms.SmsSignalInfo) UserDataHeaderElement(org.mobicents.protocols.ss7.map.api.smstpdu.UserDataHeaderElement) UserDataImpl(org.mobicents.protocols.ss7.map.smstpdu.UserDataImpl) MAPProviderProxy(org.mobicents.smsc.slee.resources.persistence.MAPProviderProxy) ProtocolIdentifier(org.mobicents.protocols.ss7.map.api.smstpdu.ProtocolIdentifier) MoForwardShortMessageRequest(org.mobicents.protocols.ss7.map.api.service.sms.MoForwardShortMessageRequest) UserDataHeader(org.mobicents.protocols.ss7.map.api.smstpdu.UserDataHeader) ISDNAddressStringImpl(org.mobicents.protocols.ss7.map.primitives.ISDNAddressStringImpl) AddressStringImpl(org.mobicents.protocols.ss7.map.primitives.AddressStringImpl) AddressField(org.mobicents.protocols.ss7.map.api.smstpdu.AddressField) ConcatenatedShortMessagesIdentifierImpl(org.mobicents.protocols.ss7.map.smstpdu.ConcatenatedShortMessagesIdentifierImpl) SM_RP_DAImpl(org.mobicents.protocols.ss7.map.service.sms.SM_RP_DAImpl) AddressFieldImpl(org.mobicents.protocols.ss7.map.smstpdu.AddressFieldImpl) ValidityPeriodImpl(org.mobicents.protocols.ss7.map.smstpdu.ValidityPeriodImpl) SM_RP_OAImpl(org.mobicents.protocols.ss7.map.service.sms.SM_RP_OAImpl) Date(java.util.Date) PreparedStatementCollection(org.mobicents.smsc.cassandra.PreparedStatementCollection) MAPDialogSmsProxy(org.mobicents.smsc.slee.resources.persistence.MAPDialogSmsProxy) ISDNAddressStringImpl(org.mobicents.protocols.ss7.map.primitives.ISDNAddressStringImpl) Sms(org.mobicents.smsc.library.Sms) ValidityPeriod(org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod) SM_RP_DA(org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA) SmsSet(org.mobicents.smsc.library.SmsSet) SmsSubmitTpduImpl(org.mobicents.protocols.ss7.map.smstpdu.SmsSubmitTpduImpl) Test(org.testng.annotations.Test)

Aggregations

Date (java.util.Date)8 DataCodingScheme (org.mobicents.protocols.ss7.map.api.smstpdu.DataCodingScheme)8 DataCodingSchemeImpl (org.mobicents.protocols.ss7.map.smstpdu.DataCodingSchemeImpl)7 ISDNAddressString (org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString)6 Sms (org.mobicents.smsc.library.Sms)6 AddressString (org.mobicents.protocols.ss7.map.api.primitives.AddressString)5 UserData (org.mobicents.protocols.ss7.map.api.smstpdu.UserData)5 UserDataHeader (org.mobicents.protocols.ss7.map.api.smstpdu.UserDataHeader)5 Timestamp (java.sql.Timestamp)4 AddressField (org.mobicents.protocols.ss7.map.api.smstpdu.AddressField)4 ParseException (java.text.ParseException)3 ArrayList (java.util.ArrayList)3 MoForwardShortMessageRequest (org.mobicents.protocols.ss7.map.api.service.sms.MoForwardShortMessageRequest)3 SM_RP_DA (org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA)3 SmsSignalInfo (org.mobicents.protocols.ss7.map.api.service.sms.SmsSignalInfo)3 ProtocolIdentifier (org.mobicents.protocols.ss7.map.api.smstpdu.ProtocolIdentifier)3 SmsTpdu (org.mobicents.protocols.ss7.map.api.smstpdu.SmsTpdu)3 ValidityPeriod (org.mobicents.protocols.ss7.map.api.smstpdu.ValidityPeriod)3 AddressStringImpl (org.mobicents.protocols.ss7.map.primitives.AddressStringImpl)3 ISDNAddressStringImpl (org.mobicents.protocols.ss7.map.primitives.ISDNAddressStringImpl)3