add getTakenCalls
[GitHub/Stricted/speedport-hybrid-php-api.git] / speedport.class.php
index fe2b8aebc6a70956273680a978d7187769728899..6facff61ed6f354621f698eec1e9f4866adb8d6b 100644 (file)
@@ -219,6 +219,24 @@ class speedport {
                return explode("\n", $data['body']);
        }
        
+       /**
+        * get the Taken Calls from router
+        * 
+        * @return      array
+        */
+       public function getTakenCalls() {
+               $path = 'data/Syslog.json';
+               $fields = array('exporttype' => '2');
+               $cookie = 'challengev='.$this->challenge.'; '.$this->session;
+               $data = $this->sentRequest($path, $fields, $cookie);
+               
+               if (empty($data['body'])) {
+                       throw new Exception('unable to get syslog data');
+               }
+               
+               return explode("\n", $data['body']);
+       }
+       
        /**
         * sends the request to router
         *