Пример #1
0
     Aastra_save_session('vmail', '600', $array, $ext);
     # Return empty object
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->addEntry('');
     $object->output(True);
     # Launch the call
     $vmail_options = Aastra_get_user_context($ext, 'vmail-options');
     if ($vmail_options['auto_answer'] == '') {
         $vmail_options['auto_answer'] = '1';
         Aastra_save_user_context($ext, 'vmail-options', $vmail_options);
     }
     if ($vmail_options['auto_answer'] == '1') {
         Aastra_originate_Asterisk('SIP/' . Aastra_get_userdevice_Asterisk($ext), 's', $context, 1, '', 'VoiceMail <9999>', array('_USER='******'__SIPADDHEADER=Alert-Info: \\;info=alert-autoanswer'));
     } else {
         Aastra_originate_Asterisk('SIP/' . Aastra_get_userdevice_Asterisk($ext), 's', $context, 1, '', 'VoiceMail <9999>', '_USER='******'disp_greetings':
     # Greeting label
     switch ($msg) {
         case 'name':
             $greeting = Aastra_get_label('Name', $language);
             break;
         case 'unavail':
             $greeting = Aastra_get_label('Unavailable Greeting', $language);
             break;
         case 'busy':
             $greeting = Aastra_get_label('Busy Greeting', $language);
Пример #2
0
function Aastra_dial_number_Asterisk($user, $dial)
{
    if ($dial) {
        # Retrieve true user
        $user = Aastra_get_userdevice_Asterisk($user);
        $user_details = Aastra_get_user_info_Asterisk($user);
        # Launch the call
        Aastra_originate_Asterisk('Local/*80' . $user . '@from-internal', '9999', 'default', 1, '', $user_details[cidname] . ' <' . $user_details[cidnum] . '>', '', '', 'Dial', 'Local/' . $dial . '@from-internal');
    }
}
Пример #3
0
     if ($away['action'][$away['status']] == AA_PRESENCE_ACT_CFWD or $cfwd != '') {
         if ($cfwd == '') {
             $cfwd = $away['act_param'][$away['status']];
         }
         Aastra_manage_cf_Asterisk($user, 'cancel', '');
     }
     # Launch the call
     $vmail_options = Aastra_get_user_context($user, 'vmail-options');
     if ($vmail_options['auto_answer'] == '') {
         $vmail_options['auto_answer'] = '1';
         Aastra_save_user_context($ext, 'vmail-options', $vmail_options);
     }
     if ($vmail_options['auto_answer'] == '1') {
         Aastra_originate_Asterisk('Local/' . Aastra_get_userdevice_Asterisk($user) . '@from-internal', 's', 'record-temp-vm', 1, '', Aastra_get_label('RecordTemporary', $language) . ' <0>', array('_USER='******'_ALERT_INFO=info=alert-autoanswer'));
     } else {
         Aastra_originate_Asterisk('Local/' . Aastra_get_userdevice_Asterisk($user) . '@from-internal', 's', 'record-temp-vm', 1, '', Aastra_get_label('RecordTemporary', $language) . ' <0>', array('_USER='******'enable');
     }
     if ($follow == 1) {
         Aastra_manage_followme_Asterisk($user, 'enable');
     }
     if ($cfwd != '') {
         Aastra_manage_cf_Asterisk($user, 'set', $cfwd);
     }
 } else {
     # Save session
     $array = array('uri_onhook' => $XML_SERVER, 'user' => $user, 'type' => 'temp', 'action' => 'record');
     Aastra_save_session('vmail', '600', $array, $user);