TSConnection findHeldTermConnection(TSDevice matchDevice) {
		TSConnection conn = null;
		TSConnection termConn = null;

		synchronized (this.connections) {
			for (int i = 0; i < this.connections.size(); i++) {
				conn = (TSConnection) this.connections.elementAt(i);
				Vector<?> termConns = conn.getTermConns();
				if (termConns != null) {
					synchronized (termConns) {
						for (int j = 0; j < termConns.size(); j++) {
							termConn = (TSConnection) termConns.elementAt(j);
							if (((termConn.getCallControlTermConnState() == 99) || (termConn
									.getCallControlTermConnState() == 103))
									&& (termConn.getTSDevice() == matchDevice)) {
								return termConn;
							}
						}
					}
				}
			}
		}

		return null;
	}