From 8e42bcadf70dffd3e6cdf52c5582ce7fd0dce868 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 2 Aug 2012 07:39:00 +0200 Subject: add incoming/outgoing type to calls --- src/callnotifier/CallMonitor.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/callnotifier/CallMonitor.php') diff --git a/src/callnotifier/CallMonitor.php b/src/callnotifier/CallMonitor.php index af72e0a..29ee5a2 100644 --- a/src/callnotifier/CallMonitor.php +++ b/src/callnotifier/CallMonitor.php @@ -43,6 +43,12 @@ class CallMonitor { $call = $this->currentCalls[$callId]; $call->start = time(); + if ($msg->tei == 127) { + $call->type = CallMonitor_Call::INCOMING; + } else { + $call->type = CallMonitor_Call::OUTGOING; + } + $this->handleParams($call, $msg); } @@ -56,7 +62,7 @@ class CallMonitor $this->handleParams($call, $msg); break; case EDSS1_Message::CALL_PROCEEDING: - $this->log->log('incomingCall', array('call' => $call)); + $this->log->log('startingCall', array('call' => $call)); break; case EDSS1_Message::RELEASE: -- cgit v1.2.3