setState(BOUND);
// Read the version of the protocol supported at the SMSC.
Number n = (Number) resp.getOptionalParameter(Tag.SC_INTERFACE_VERSION);
if (n != null) {
SMPPVersion smscVersion = SMPPVersion.getVersion(n.intValue());
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("SMSC reports its supported SMPP version as "
+ smscVersion.toString());
}
// Downgrade this connection's version if the SMSC's version is
// lower.
if (smscVersion.isOlder(this.interfaceVersion)) {
LOGGER.info("Downgrading this connection's SMPP version to "
+ smscVersion.toString());
setInterfaceVersion(smscVersion);
}
} else {
// Spec requires us to assume the SMSC does not support optional
// parameters