private boolean isRedirectAnswer(Avp avpResCode, IMessage answer) { try { return (answer.getFlags() & 0x20) != 0 && avpResCode != null && avpResCode.getInteger32() == ResultCode.REDIRECT_INDICATION; } catch (AvpDataException e) { return false; } }
@Override public int getRequestedActionAVPValue() { Avp requestedActionAvp = super.message.getAvps().getAvp(REQUESTED_ACTION_AVP_CODE); if (requestedActionAvp != null) { try { return requestedActionAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Requested-Action AVP value", e); } } return -1; }
@Override public int getRequestTypeAVPValue() { Avp requestTypeAvp = super.message.getAvps().getAvp(CC_REQUEST_TYPE_AVP_CODE); if (requestTypeAvp != null) { try { return requestTypeAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain CC-Request-Type AVP value", e); } } return -1; }
@Override public int getCredidControlFailureHandlingAVPValue() { Avp credidControlFailureHandlingAvp = super.message.getAvps().getAvp(CREDIT_CONTROL_FAILURE_HANDLING_AVP_CODE); if (credidControlFailureHandlingAvp != null) { try { return credidControlFailureHandlingAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Credit-Control-Failure-Handling AVP value", e); } } return -1; }
@Override public int getRequestedActionAVPValue() { Avp requestedActionAvp = super.message.getAvps().getAvp(REQUESTED_ACTION_AVP_CODE); if (requestedActionAvp != null) { try { return requestedActionAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Requested-Action AVP value", e); } } return -1; }
public int getRequestedActionAVPValue() { Avp requestedActionAvp = super.message.getAvps().getAvp(REQUESTED_ACTION_AVP_CODE); if (requestedActionAvp != null) { try { return requestedActionAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Requested-Action AVP value", e); } } return -1; } }
public int getRequestedActionAVPValue() { Avp requestedActionAvp = super.message.getAvps().getAvp(REQUESTED_ACTION_AVP_CODE); if (requestedActionAvp != null) { try { return requestedActionAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Requested-Action AVP value", e); } } return -1; }
public int getRequestedActionAVPValue() { Avp requestedActionAvp = super.message.getAvps().getAvp(REQUESTED_ACTION_AVP_CODE); if (requestedActionAvp != null) { try { return requestedActionAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Requested-Action AVP value", e); } } return -1; }
@Override public int getCredidControlFailureHandlingAVPValue() { Avp credidControlFailureHandlingAvp = super.message.getAvps().getAvp(CREDIT_CONTROL_FAILURE_HANDLING_AVP_CODE); if (credidControlFailureHandlingAvp != null) { try { return credidControlFailureHandlingAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Credit-Control-Failure-Handling AVP value", e); } } return -1; }
@Override public int getDirectDebitingFailureHandlingAVPValue() { Avp directDebitingFailureHandlingAvp = super.message.getAvps().getAvp(DIRECT_DEBITING_FAILURE_HANDLING_AVP_CODE); if (directDebitingFailureHandlingAvp != null) { try { return directDebitingFailureHandlingAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Direct-Debiting-Failure-Handling AVP value", e); } } return -1; }
@Override public int getRequestTypeAVPValue() { Avp requestTypeAvp = super.message.getAvps().getAvp(CC_REQUEST_TYPE_AVP_CODE); if (requestTypeAvp != null) { try { return requestTypeAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain CC-Request-Type AVP value", e); } } return -1; }
@Override public int getDirectDebitingFailureHandlingAVPValue() { Avp directDebitingFailureHandlingAvp = super.message.getAvps().getAvp(DIRECT_DEBITING_FAILURE_HANDLING_AVP_CODE); if (directDebitingFailureHandlingAvp != null) { try { return directDebitingFailureHandlingAvp.getInteger32(); } catch (AvpDataException e) { logger.debug("Failure trying to obtain Direct-Debiting-Failure-Handling AVP value", e); } } return -1; }
@Override public int getReAuthRequestType() throws AvpDataException { Avp reAuthRequestTypeAvp = message.getAvps().getAvp(RE_AUTH_REQUEST_TYPE); if (reAuthRequestTypeAvp != null) { return reAuthRequestTypeAvp.getInteger32(); } else { throw new AvpDataException("Avp RE_AUTH_REQUEST_TYPE not found"); } } }
@Override public int getAccountingRecordType() throws AvpDataException { Avp accRecordTypeAvp = message.getAvps().getAvp(Avp.ACC_RECORD_TYPE); if (accRecordTypeAvp != null) { return accRecordTypeAvp.getInteger32(); } else { throw new AvpDataException("Avp ACC_RECORD_TYPE not found"); } }
@Override public int getAccountingRecordType() throws AvpDataException { Avp accRecordTypeAvp = message.getAvps().getAvp(Avp.ACC_RECORD_TYPE); if (accRecordTypeAvp != null) { return accRecordTypeAvp.getInteger32(); } else { throw new AvpDataException("Avp ACC_RECORD_TYPE not found"); } }
Event(RfAccountingAnswer accountAnswer) throws Exception { int resCode = ResultCode.SUCCESS; try { resCode = accountAnswer.getMessage().getAvps().getAvp(Avp.RESULT_CODE).getInteger32(); } catch (Exception exc) { } type = (resCode == ResultCode.SUCCESS || (resCode / 1000 == 4)) ? Type.RECEIVED_RECORD : Type.FAILED_RECEIVE_RECORD; data = accountAnswer; }
@Override public int getAccountingRecordType() throws AvpDataException { Avp accRecordTypeAvp = message.getAvps().getAvp(Avp.ACC_RECORD_TYPE); if (accRecordTypeAvp != null) { return accRecordTypeAvp.getInteger32(); } else { throw new AvpDataException("Avp ACC_RECORD_TYPE not found"); } }
@Override public int getTerminationCause() throws AvpDataException { Avp terminationCauseAvp = message.getAvps().getAvp(TERMINATION_CAUSE); if (terminationCauseAvp != null) { return terminationCauseAvp.getInteger32(); } else { throw new AvpDataException("Avp TERMINATION_CAUSE not found"); } } }
@Override public int getAccountingRecordType() throws AvpDataException { Avp accRecordTypeAvp = message.getAvps().getAvp(Avp.ACC_RECORD_TYPE); if (accRecordTypeAvp != null) { return accRecordTypeAvp.getInteger32(); } else { throw new AvpDataException("Avp ACC_RECORD_TYPE not found"); } }
Event(AccountAnswer accountAnswer) throws Exception { int resCode = ResultCode.SUCCESS; try { resCode = accountAnswer.getMessage().getAvps().getAvp(Avp.RESULT_CODE).getInteger32(); } catch (Exception exc) { } type = (resCode == ResultCode.SUCCESS || (resCode / 1000 == 4)) ? Type.RECEIVED_RECORD : Type.FAILED_RECEIVE_RECORD; data = accountAnswer; }