218,221c218,219 < if($this->autodisc) { < addtimer(time() + AUTODISCTIME, "if(\$procs[$this->procid]) \$procs[$this->procid]->autodisconnect();"); < debug("[$this->type$this->num] Recorder will disconnect in ".AUTODISCTIME."sec"); < } --- > addtimer(time() + AUTODISCTIME, "if(\$procs[$this->procid]) \$procs[$this->procid]->pausetimeout();"); > debug("[$this->type$this->num] Recorder will stop in ".AUTODISCTIME."sec"); 236,239c234,243 < function autodisconnect() { < if($this->autodisc && $this->pausedat != 0 && $this->pausedat <= time() - AUTODISCTIME) { < debug("[$this->type$this->num] No action for ".AUTODISCTIME."sec - shutting down\n"); < $this->shutdown(); --- > function pausetimeout() { > if($this->pausedat != 0 && $this->pausedat <= time() - AUTODISCTIME) { > if($this->autodisc) { > debug("[$this->type$this->num] No action for ".AUTODISCTIME."sec - shutting down\n"); > $this->shutdown(); > } > else { > debug("[$this->type$this->num] No action for ".AUTODISCTIME."sec - Recording stopped\n"); > $this->stoprecord(); > }