Support archive of phone calls
[infodrom/phone] / phone.php
index c8f7381..9258c9f 100644 (file)
--- a/phone.php
+++ b/phone.php
@@ -54,11 +54,11 @@ function message_info($dir,$fname)
   return $info;
 }
 
-function get_incoming()
+function read_directory($directory)
 {
   $result = array();
 
-  if ($dir = opendir(SPOOL_DIR . '/incoming')) {
+  if ($dir = opendir(SPOOL_DIR . '/' . $directory)) {
     while (($filename = readdir($dir)) !== false) {
       if (($pos = strpos($filename, '.vmsg')) !== false) {
        $fname = substr($filename,0,$pos);