/**
* Process call
*
* @param Call $call
* @throws \Exception
*/
public function processCall(Call $call)
{
if ($call->getRegistration() !== null) {
throw new \Exception("Registration already set when asked to process call");
}
$call->setRegistration($this);
$this->calls[] = $call;
$this->session->incPendingCallCount();
$callCount = count($this->calls);
if ($callCount == 1) {
// we just became busy
$this->busyStart = microtime(true);
}
if ($callCount > $this->maxSimultaneousCalls) {
$this->maxSimultaneousCalls = $callCount;
}
$this->invocationCount++;
$this->lastCallStartedAt = new \DateTime();
$this->getSession()->sendMessage($call->getInvocationMessage());
}