} break; case 'recording': if (isset($_REQUEST['testing'])) { // ?? what is this? break; } $dialer->add_voice_message(); break; default: // rolling through users, populate dial list from state #$class = $dialer->state['type']; // state tells us wether its a DialList or DialListUser object #$dial_list = $class::load($dialer->state); // more verbose to be compatible with older versions of PHP if ($dialer->state['type'] == 'DialList') { $dial_list = DialList::load($dialer->state); } else { $dial_list = DialListUser::load($dialer->state); } // get the next valid user $dialed = false; do { $to_dial = $dial_list->next(); if ($to_dial instanceof VBX_User || $to_dial instanceof VBX_Device) { $dialed = $dialer->dial($to_dial); if ($dialed) { $dialer->state = $dial_list->get_state(); } } } while (!$dialed && ($to_dial instanceof VBX_User || $to_dial instanceof VBX_Device)); if (!$dialed) {