Example #1
0
function initUser()
{
    global $vm_base;
    global $dir;
    global $mailbox;
    global $files;
    vmInitMessageDir($mailbox);
    vmGetMessageFiles($mailbox, $files);
    $dir = "{$vm_base}/{$mailbox}";
    Yate::Output("found " . count($files) . " file entries for mailbox {$mailbox}");
    setState("prompt");
}
Example #2
0
function initUser()
{
    global $dir;
    global $mailbox;
    global $files;
    vmInitMessageDir($mailbox);
    vmGetMessageFiles($mailbox, $files);
    $all_files = $files;
    // this array contains both .mp3 and .slin files
    $files = array();
    for ($i = 0; $i < count($all_files); $i++) {
        if (substr($all_files[$i], -5) == ".slin") {
            $files[] = $all_files[$i];
        }
    }
    $dir = vmGetVoicemailDir($mailbox);
    debug("found " . count($files) . " file entries for mailbox {$mailbox}");
    setState("prompt");
}