protected BaseBindResp createBindResponse(BaseBind bindRequest, int statusCode) {
    BaseBindResp bindResponse = (BaseBindResp) bindRequest.createResponse();
    bindResponse.setCommandStatus(statusCode);
    bindResponse.setSystemId(configuration.getSystemId());

    // if the server supports an SMPP server version >= 3.4 AND the bind request
    // included an interface version >= 3.4, include an optional parameter with configured
    // sc_interface_version TLV
    if (configuration.getInterfaceVersion() >= SmppConstants.VERSION_3_4
        && bindRequest.getInterfaceVersion() >= SmppConstants.VERSION_3_4) {
      Tlv scInterfaceVersion =
          new Tlv(
              SmppConstants.TAG_SC_INTERFACE_VERSION,
              new byte[] {configuration.getInterfaceVersion()});
      bindResponse.addOptionalParameter(scInterfaceVersion);
    }

    return bindResponse;
  }