private CSTAConnectionID selectConnectionIdForAddParty() {
		synchronized (this.connections) {
			for (int i = 0; i < this.connections.size(); i++) {
				CSTAConnectionID connID = ((TSConnection) this.connections
						.elementAt(i)).getConnID();

				if (connID != null) {
					if (connID.getDevIDType() == 0) {
						return connID;
					}

					if (connID.getDevIDType() == 1) {
						String deviceID = connID.getDeviceID();
						if (deviceID.regionMatches(true, 0, "T", 0, 1)) {
							return connID;
						}
					}

				}

			}

			if (this.connections.size() > 0) {
				return ((TSConnection) this.connections.elementAt(0))
						.getConnID();
			}

			return null;
		}
	}