• Как переопределить переменные окружения, например путь к папке tmp при запуске процесса windows?

    @Yurii84 Автор вопроса
    Ezhyg, можно подробнее про start и set, это имеется ввиду?
    SET TMP=C:\tmp\
    SET TEMP=C:\tmp\
    START PROG.EXE
  • Как переопределить переменные окружения, например путь к папке tmp при запуске процесса windows?

    @Yurii84 Автор вопроса
    Так же пробовал, но не дало эффекта
    SET TMP=C:\tmp\
    SET TEMP=C:\tmp\
  • Как переопределить переменные окружения, например путь к папке tmp при запуске процесса windows?

    @Yurii84 Автор вопроса
    т.е. у каждого пользователя изменить переменную к tmp? хотелось бы у приложения поменять, с каждым пользователем много работы, проще их на латинице заводить
  • Как вернуть родной web интерфейс на elastix?

    @Yurii84 Автор вопроса
    РЕШЕНИЕ
    заменить файл /var/www/html/index.php
    <?php 
    /* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
      Codificación: UTF-8
      +----------------------------------------------------------------------+
      | Elastix version 0.5                                                  |
      | http://www.elastix.org                                               |
      +----------------------------------------------------------------------+
      | Copyright (c) 2006 Palosanto Solutions S. A.                         |
      +----------------------------------------------------------------------+
      | Cdla. Nueva Kennedy Calle E 222 y 9na. Este                          |
      | Telfs. 2283-268, 2294-440, 2284-356                                  |
      | Guayaquil - Ecuador                                                  |
      | http://www.palosanto.com                                             |
      +----------------------------------------------------------------------+
      | The contents of this file are subject to the General Public License  |
      | (GPL) Version 2 (the "License"); you may not use this file except in |
      | compliance with the License. You may obtain a copy of the License at |
      | http://www.opensource.org/licenses/gpl-license.php                   |
      |                                                                      |
      | Software distributed under the License is distributed on an "AS IS"  |
      | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See  |
      | the License for the specific language governing rights and           |
      | limitations under the License.                                       |
      +----------------------------------------------------------------------+
      | The Original Code is: Elastix Open Source.                           |
      | The Initial Developer of the Original Code is PaloSanto Solutions    |
      +----------------------------------------------------------------------+
      $Id: index.php,v 1.3 2007/07/17 00:03:42 gcarrillo Exp $ */
    
    function spl_elastix_class_autoload($sNombreClase)
    {
        if (!preg_match('/^\w+$/', $sNombreClase)) return;
    
        $sNombreBase = $sNombreClase.'.class.php';
        foreach (explode(':', ini_get('include_path')) as $sDirInclude) {
            if (file_exists($sDirInclude.'/'.$sNombreBase)) {
                require_once($sNombreBase);
                return;
            }
        }
    }
    spl_autoload_register('spl_elastix_class_autoload');
    
    // Agregar directorio libs de script a la lista de rutas a buscar para require()
    ini_set('include_path', dirname($_SERVER['SCRIPT_FILENAME'])."/libs:".ini_get('include_path'));
    
    include_once("libs/misc.lib.php");
    include_once "configs/default.conf.php";
    include_once "libs/paloSantoDB.class.php";
    include_once "libs/paloSantoMenu.class.php";
    include_once("libs/paloSantoACL.class.php");// Don activate unless you know what you are doing. Too risky!
    
    load_default_timezone();
    
    session_name("elastixSession");
    session_start();
    
    if(isset($_GET['logout']) && $_GET['logout']=='yes') {
        $user = isset($_SESSION['elastix_user'])?$_SESSION['elastix_user']:"unknown";
        writeLOG("audit.log", "LOGOUT $user: Web Interface logout successful. Accepted logout for $user from $_SERVER[REMOTE_ADDR].");
        session_destroy();
        session_name("elastixSession");
        session_start();
        header("Location: index.php");
        exit;
    }
    
    //cargar el archivo de idioma
    load_language();
    $lang = get_language();
    if(file_exists("langmenus/$lang.lang")){
        include_once "langmenus/$lang.lang";
        global $arrLangMenu;
        global $arrLang;
        $arrLang = array_merge($arrLang,$arrLangMenu);
    }
    
    $pdbACL = new paloDB($arrConf['elastix_dsn']['acl']);
    $pACL = new paloACL($pdbACL);
    
    if(!empty($pACL->errMsg)) {
        echo "ERROR DE DB: $pACL->errMsg <br>";
    }
    
    // Load smarty
    $smarty = getSmarty($arrConf['mainTheme']);
    
    //- 1) SUBMIT. Si se hizo submit en el formulario de ingreso
    //-            autentico al usuario y lo ingreso a la sesion
    
    if(isset($_POST['submit_login']) and !empty($_POST['input_user'])) {
        $pass_md5 = md5($_POST['input_pass']);
        if($pACL->authenticateUser($_POST['input_user'], $pass_md5)) {
            session_regenerate_id(TRUE);
    
            $_SESSION['elastix_user'] = $_POST['input_user'];
            $_SESSION['elastix_pass'] = $pass_md5;
            header("Location: index.php");
            writeLOG("audit.log", "LOGIN $_POST[input_user]: Web Interface login successful. Accepted password for $_POST[input_user] from $_SERVER[REMOTE_ADDR].");
            exit;
        } else {
            $user = urlencode(substr($_POST['input_user'],0,20));
            if(!$pACL->getIdUser($_POST['input_user'])) // not exists user?
                writeLOG("audit.log", "LOGIN $user: Authentication Failure to Web Interface login. Invalid user $user from $_SERVER[REMOTE_ADDR].");
            else
                writeLOG("audit.log", "LOGIN $user: Authentication Failure to Web Interface login. Failed password for $user from $_SERVER[REMOTE_ADDR].");
            // Debo hacer algo aquí?
        }
    }
    
    // 2) Autentico usuario
    if (isset($_SESSION['elastix_user']) && 
        isset($_SESSION['elastix_pass']) && 
        $pACL->authenticateUser($_SESSION['elastix_user'], $_SESSION['elastix_pass'])) {
        
        $idUser = $pACL->getIdUser($_SESSION['elastix_user']);
        $pMenu = new paloMenu($arrConf['elastix_dsn']['menu']);
        $arrMenuFiltered = $pMenu->filterAuthorizedMenus($idUser);
    
        verifyTemplate_vm_email(); // para cambiar el template del email ue se envia al recibir un voicemail
    
        //traducir el menu al idioma correspondiente
        foreach($arrMenuFiltered as $idMenu=>$arrMenuItem) {
            $arrMenuFiltered[$idMenu]['Name'] = _tr($arrMenuItem['Name']);
        }
    
        $smarty->assign("THEMENAME", $arrConf['mainTheme']);
    
        /*agregado para register*/
        
        $smarty->assign("Register", _tr("Register"));
        $smarty->assign("lblRegisterCm", _tr("Register"));
        $smarty->assign("lblRegisteredCm", _tr("Registered"));
        if(!is_file("/etc/elastix.key")){
            $smarty->assign("Registered", _tr("Register"));
        	$smarty->assign("ColorRegister", "#FF0000"); 
        } else {
            $smarty->assign("Registered", _tr("Registered"));
        	$smarty->assign("ColorRegister", "#008800");
        }
    
        $smarty->assign("md_message_title", _tr('md_message_title'));
        $sCurYear = date('Y');
        if ($sCurYear < '2013') $sCurYear = '2013';
        $smarty->assign("currentyear", $sCurYear);
        $smarty->assign("ABOUT_ELASTIX_CONTENT", _tr('About Elastix Content'));
        $smarty->assign("ABOUT_CLOSED", _tr('About Elastix Closed'));
        $smarty->assign("LOGOUT", _tr('Logout'));
        $smarty->assign("VersionDetails", _tr('VersionDetails'));
        $smarty->assign("VersionPackage", _tr('VersionPackage'));
    	$smarty->assign("textMode", _tr('textMode'));
        $smarty->assign("htmlMode", _tr('htmlMode'));
    	$smarty->assign("AMOUNT_CHARACTERS", _tr("characters left"));
    	$smarty->assign("SAVE_NOTE", _tr("Save Note"));
    	$smarty->assign("MSG_SAVE_NOTE", _tr("Saving Note"));
    	$smarty->assign("MSG_GET_NOTE", _tr("Loading Note"));
    	$smarty->assign("LBL_NO_STICKY", _tr("Click here to leave a note."));
        $smarty->assign("ABOUT_ELASTIX", _tr('About Elastix')." ".$arrConf['elastix_version']);
    
        $selectedMenu = getParameter('menu');
    
        /* El módulo _elastixutils sirve para contener las utilidades json que
         * atienden requerimientos de varios widgets de la interfaz Elastix. Todo
         * requerimiento nuevo que no sea un módulo debe de agregarse aquí */
        // TODO: agregar manera de rutear _elastixutils a través de paloSantoNavigation
        if (!is_null($selectedMenu) && $selectedMenu == '_elastixutils' && 
            file_exists('modules/_elastixutils/index.php')) {
            
            // Cargar las configuraciones para el módulo elegido
            if (file_exists('modules/_elastixutils/configs/default.conf.php')) {
                require_once 'modules/_elastixutils/configs/default.conf.php';
    
                global $arrConf;
                global $arrConfModule;
                $arrConf = array_merge($arrConf, $arrConfModule);
            }
            
            // Cargar las traducciones para el módulo elegido
            load_language_module($selectedMenu);
            
            require_once 'modules/_elastixutils/index.php';
            echo _moduleContent($smarty, $selectedMenu);
            return;
        }
    
        /* El módulo pbxadmin que integra a FreePBX no construye enlaces con 
         * parámetros menu, ni con config.php en todos los casos. Por lo tanto, los
         * usos sucesivos de enlaces en FreePBX embebido requiren recordar que se
         * sirven a través de pbxadmin. */
        if (empty($selectedMenu) && !empty($_SESSION['menu']))
            $selectedMenu = $_SESSION['menu'];
    
        // Inicializa el objeto palosanto navigation
        $oPn = new paloSantoNavigation($arrMenuFiltered, $smarty, $selectedMenu);
        $selectedMenu = $oPn->getSelectedModule();
        $_SESSION['menu'] = $selectedMenu;
    
        // Guardar historial de la navegación
        // TODO: también para rawmode=yes ?
        putMenuAsHistory($pdbACL, $pACL, $idUser, $selectedMenu);
    
        // Obtener contenido del módulo, si usuario está autorizado a él
        $bModuleAuthorized = $pACL->isUserAuthorizedById($idUser, "access", $selectedMenu);
        $sModuleContent = ($bModuleAuthorized) ? $oPn->showContent() : '';    
        
        // rawmode es un modo de operacion que pasa directamente a la pantalla la salida
        // del modulo. Esto es util en ciertos casos.
        $rawmode = getParameter("rawmode");
        if(isset($rawmode) && $rawmode=='yes') {
            echo $sModuleContent;
        } else {
            $oPn->renderMenuTemplates();
    
            if (file_exists('themes/'.$arrConf['mainTheme'].'/themesetup.php')) {
            	require_once('themes/'.$arrConf['mainTheme'].'/themesetup.php');
                themeSetup($smarty, $selectedMenu, $pdbACL, $pACL, $idUser);
            }
    
            // Autorizacion
            if ($bModuleAuthorized) {
                $smarty->assign("CONTENT", $sModuleContent);
                $smarty->assign('MENU', (count($arrMenuFiltered) > 0) 
                    ? $smarty->fetch("_common/_menu.tpl") 
                    : _tr('No modules'));
            }
            $smarty->display("_common/index.tpl");
        }
    } else {
    	$rawmode = getParameter("rawmode");
        if(isset($rawmode) && $rawmode=='yes'){
            include_once "libs/paloSantoJSON.class.php";
            $jsonObject = new PaloSantoJSON();
            $jsonObject->set_status("ERROR_SESSION");
            $jsonObject->set_error(_tr("Your session has expired. If you want to do a login please press the button 'Accept'."));
            $jsonObject->set_message(null);
            Header('Content-Type: application/json');
            echo $jsonObject->createJSON();
        }
        else{
            $oPn = new paloSantoNavigation(array(), $smarty);
    		$oPn->putHEAD_JQUERY_HTML();
    		$smarty->assign("THEMENAME", $arrConf['mainTheme']);
    		$smarty->assign("currentyear",date("Y"));
    		$smarty->assign("PAGE_NAME", _tr('Login page'));
    		$smarty->assign("WELCOME", _tr('Welcome to Elastix'));
    		$smarty->assign("ENTER_USER_PASSWORD", _tr('Please enter your username and password'));
    		$smarty->assign("USERNAME", _tr('Username'));
    		$smarty->assign("PASSWORD", _tr('Password'));
    		$smarty->assign("SUBMIT", _tr('Submit'));
    
    		$smarty->display("_common/login.tpl");
    	}
    }
    ?>
  • Как убрать перенаправление вызова в Elastix?

    @Yurii84 Автор вопроса
    Очень вам признателен, редко задаю вопросы пытаюсь сам разобраться, но здесь без вашей помощи бы не справился или очень много времени бы потратил!
  • Как убрать перенаправление вызова в Elastix?

    @Yurii84 Автор вопроса
    Спасибо за помощь, уже подсказали откуда этот номер брался
  • Как убрать перенаправление вызова в Elastix?

    @Yurii84 Автор вопроса
    Владимир: Благодарю, вы правы! Не понимаю как он туда попал, кроме него еще второй свой телефон там (database show) обнаружил /CALLTRACE/101 и /CALLTRACE/102. Подскажите, что почитать, что бы как вы научиться читать логи.
  • Как убрать перенаправление вызова в Elastix?

    @Yurii84 Автор вопроса
    [ Context 'macro-exten-vm' created by 'pbx_config' ]
    'docfu' => 1. ExecIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG3}"="1")]?StackPop()) [pbx_config]
    2. GotoIf($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="-1"|("${ARG1}"="novm"&"${ARG3}"="1")]?from-internal,${DB(CFU/${EXTTOCALL})},1) [pbx_config]
    3. Set(RTCF=${IF($["${DB(AMPUSER/${EXTTOCALL}/cfringtimer)}"="0"]?${RT}:${DB(AMPUSER/${EXTTOCALL}/cfringtimer)})}) [pbx_config]
    4. Dial(Local/${DB(CFU/${EXTTOCALL})}@from-internal/n,${RTCF},${DIAL_OPTIONS}) [pbx_config]
    5. Return() [pbx_config]

    Судя по всему это сама процедура а в нее уже передается параметром мой номер телефона, но откуда он передается, уже поиском по содержимому весь диск прошел, не где нет такой комбинации
  • Как убрать перенаправление вызова в Elastix?

    @Yurii84 Автор вопроса
    =========================================================================
    Connected to Asterisk 11.15.0 currently running on Elastix (pid = 2468)
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Executing [103@from-internal:1] Set("SIP/102-00000016", "__RINGTIMER=15") in new stack
    -- Executing [103@from-internal:2] Macro("SIP/102-00000016", "exten-vm,novm,103,1,0,1") in new stack
    -- Executing [s@macro-exten-vm:1] Macro("SIP/102-00000016", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/102-00000016", "TOUCH_MONITOR=1428311852.48") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/102-00000016", "AMPUSER=102") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("SIP/102-00000016", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("SIP/102-00000016", "1?Set(REALCALLERIDNUM=102)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/102-00000016", "AMPUSER=102") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/102-00000016", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/102-00000016", "AMPUSERCIDNAME=Yura Computer") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("SIP/102-00000016", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/102-00000016", "AMPUSERCID=102") in new stack
    -- Executing [s@macro-user-callerid:10] Set("SIP/102-00000016", "__DIAL_OPTIONS=tr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("SIP/102-00000016", "CALLERID(all)="Yura Computer" <102>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("SIP/102-00000016", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("SIP/102-00000016", "0?Set(GROUP(concurrency_limit)=102)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("SIP/102-00000016", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("SIP/102-00000016", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:16] Set("SIP/102-00000016", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:17] GotoIf("SIP/102-00000016", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] Set("SIP/102-00000016", "CALLERID(number)=102") in new stack
    -- Executing [s@macro-user-callerid:29] Set("SIP/102-00000016", "CALLERID(name)=Yura Computer") in new stack
    -- Executing [s@macro-user-callerid:30] Set("SIP/102-00000016", "CDR(cnum)=102") in new stack
    -- Executing [s@macro-user-callerid:31] Set("SIP/102-00000016", "CDR(cnam)=Yura Computer") in new stack
    -- Executing [s@macro-user-callerid:32] Set("SIP/102-00000016", "CHANNEL(language)=ru") in new stack
    -- Executing [s@macro-exten-vm:2] Set("SIP/102-00000016", "RingGroupMethod=none") in new stack
    -- Executing [s@macro-exten-vm:3] Set("SIP/102-00000016", "__EXTTOCALL=103") in new stack
    -- Executing [s@macro-exten-vm:4] Set("SIP/102-00000016", "__PICKUPMARK=103") in new stack
    -- Executing [s@macro-exten-vm:5] Set("SIP/102-00000016", "RT=15") in new stack
    -- Executing [s@macro-exten-vm:6] Gosub("SIP/102-00000016", "sub-record-check,s,1(exten,103,)") in new stack
    -- Executing [s@sub-record-check:1] Set("SIP/102-00000016", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:2] GotoIf("SIP/102-00000016", "1?check") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] Set("SIP/102-00000016", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("SIP/102-00000016", "1?next") in new stack
    -- Goto (sub-record-check,s,11)
    -- Executing [s@sub-record-check:11] ExecIf("SIP/102-00000016", "0?Return()") in new stack
    -- Executing [s@sub-record-check:12] ExecIf("SIP/102-00000016", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:13] GotoIf("SIP/102-00000016", "0?exten,1") in new stack
    -- Executing [s@sub-record-check:14] Set("SIP/102-00000016", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:15] Set("SIP/102-00000016", "NOW=1428311852") in new stack
    -- Executing [s@sub-record-check:16] Set("SIP/102-00000016", "__DAY=06") in new stack
    -- Executing [s@sub-record-check:17] Set("SIP/102-00000016", "__MONTH=04") in new stack
    -- Executing [s@sub-record-check:18] Set("SIP/102-00000016", "__YEAR=2015") in new stack
    -- Executing [s@sub-record-check:19] Set("SIP/102-00000016", "__TIMESTR=20150406-141732") in new stack
    -- Executing [s@sub-record-check:20] Set("SIP/102-00000016", "__FROMEXTEN=102") in new stack
    -- Executing [s@sub-record-check:21] Set("SIP/102-00000016", "__CALLFILENAME=exten-103-102-20150406-141732-1428311852.48") in new stack
    -- Executing [s@sub-record-check:22] Goto("SIP/102-00000016", "exten,1") in new stack
    -- Goto (sub-record-check,exten,1)
    -- Executing [exten@sub-record-check:1] GotoIf("SIP/102-00000016", "0?callee") in new stack
    -- Executing [exten@sub-record-check:2] Set("SIP/102-00000016", "__REC_POLICY_MODE=dontcare") in new stack
    -- Executing [exten@sub-record-check:3] GotoIf("SIP/102-00000016", "1?caller") in new stack
    -- Goto (sub-record-check,exten,10)
    -- Executing [exten@sub-record-check:10] Set("SIP/102-00000016", "__REC_POLICY_MODE=dontcare") in new stack
    -- Executing [exten@sub-record-check:11] GosubIf("SIP/102-00000016", "0?record,1(exten,103,102)") in new stack
    -- Executing [exten@sub-record-check:12] Return("SIP/102-00000016", "") in new stack
    -- Executing [s@macro-exten-vm:7] Macro("SIP/102-00000016", "dial-one,15,tr,103") in new stack
    -- Executing [s@macro-dial-one:1] Set("SIP/102-00000016", "DEXTEN=103") in new stack
    -- Executing [s@macro-dial-one:2] Set("SIP/102-00000016", "DIALSTATUS_CW=") in new stack
    -- Executing [s@macro-dial-one:3] GosubIf("SIP/102-00000016", "0?screen,1()") in new stack
    -- Executing [s@macro-dial-one:4] GosubIf("SIP/102-00000016", "0?cf,1()") in new stack
    -- Executing [s@macro-dial-one:5] GotoIf("SIP/102-00000016", "1?skip1") in new stack
    -- Goto (macro-dial-one,s,8)
    -- Executing [s@macro-dial-one:8] GotoIf("SIP/102-00000016", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:9] GotoIf("SIP/102-00000016", "0?continue") in new stack
    -- Executing [s@macro-dial-one:10] Set("SIP/102-00000016", "EXTHASCW=") in new stack
    -- Executing [s@macro-dial-one:11] GotoIf("SIP/102-00000016", "1?next1:cwinusebusy") in new stack
    -- Goto (macro-dial-one,s,12)
    -- Executing [s@macro-dial-one:12] GotoIf("SIP/102-00000016", "1?docfu:skip3") in new stack
    -- Goto (macro-dial-one,s,13)
    -- Executing [s@macro-dial-one:13] Set("SIP/102-00000016", "DEXTEN=") in new stack
    -- Executing [s@macro-dial-one:14] Set("SIP/102-00000016", "DIALSTATUS=NOANSWER") in new stack
    -- Executing [s@macro-dial-one:15] Goto("SIP/102-00000016", "nodial") in new stack
    -- Goto (macro-dial-one,s,48)
    -- Executing [s@macro-dial-one:48] ExecIf("SIP/102-00000016", "0?Set(DIALSTATUS=NOANSWER)") in new stack
    -- Executing [s@macro-dial-one:49] NoOp("SIP/102-00000016", "Returned from dial-one with nothing to call and DIALSTATUS: NOANSWER") in new stack
    -- Executing [s@macro-dial-one:50] MacroExit("SIP/102-00000016", "") in new stack
    -- Executing [s@macro-exten-vm:8] Set("SIP/102-00000016", "SV_DIALSTATUS=NOANSWER") in new stack
    -- Executing [s@macro-exten-vm:9] GosubIf("SIP/102-00000016", "1?docfu,1()") in new stack
    -- Executing [docfu@macro-exten-vm:1] ExecIf("SIP/102-00000016", "1?StackPop()") in new stack
    -- Executing [docfu@macro-exten-vm:2] GotoIf("SIP/102-00000016", "1?from-internal,МОЙМОБ,1") in new stack
    -- Goto (from-internal,МОЙМОБ,1)
    -- Executing [МОЙМОБ@from-internal:1] Macro("SIP/102-00000016", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/102-00000016", "TOUCH_MONITOR=1428311852.48") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/102-00000016", "AMPUSER=102") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("SIP/102-00000016", "13?report") in new stack
    -- Goto (macro-user-callerid,s,15)
    -- Executing [s@macro-user-callerid:15] GotoIf("SIP/102-00000016", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] Set("SIP/102-00000016", "CALLERID(number)=102") in new stack
    -- Executing [s@macro-user-callerid:29] Set("SIP/102-00000016", "CALLERID(name)=Yura Computer") in new stack
    -- Executing [s@macro-user-callerid:30] Set("SIP/102-00000016", "CDR(cnum)=102") in new stack
    -- Executing [s@macro-user-callerid:31] Set("SIP/102-00000016", "CDR(cnam)=Yura Computer") in new stack
    -- Executing [s@macro-user-callerid:32] Set("SIP/102-00000016", "CHANNEL(language)=ru") in new stack
    -- Executing [МОЙМОБ@from-internal:2] Set("SIP/102-00000016", "MOHCLASS=default") in new stack
    -- Executing [МОЙМОБ@from-internal:3] ExecIf("SIP/102-00000016", "1?Set(TRUNKCIDOVERRIDE=МОЙТРАНК)") in new stack
    -- Executing [МОЙМОБ@from-internal:4] Set("SIP/102-00000016", "_NODEST=") in new stack
    -- Executing [МОЙМОБ@from-internal:5] Gosub("SIP/102-00000016", "sub-record-check,s,1(out,МОЙМОБ,)") in new stack
    -- Executing [s@sub-record-check:1] Set("SIP/102-00000016", "REC_POLICY_MODE_SAVE=dontcare") in new stack
    -- Executing [s@sub-record-check:2] GotoIf("SIP/102-00000016", "1?check") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] Set("SIP/102-00000016", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("SIP/102-00000016", "1?next") in new stack
    -- Goto (sub-record-check,s,11)
    -- Executing [s@sub-record-check:11] ExecIf("SIP/102-00000016", "0?Return()") in new stack
    -- Executing [s@sub-record-check:12] ExecIf("SIP/102-00000016", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:13] GotoIf("SIP/102-00000016", "1?out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] ExecIf("SIP/102-00000016", "0?Set(__REC_POLICY_MODE=dontcare)") in new stack
    -- Executing [out@sub-record-check:2] GosubIf("SIP/102-00000016", "0?record,1(exten,МОЙМОБ,102)") in new stack
    -- Executing [out@sub-record-check:3] Return("SIP/102-00000016", "") in new stack
    -- Executing [МОЙМОБ@from-internal:6] Macro("SIP/102-00000016", "dialout-trunk,3,МОЙМОБ,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/102-00000016", "DIAL_TRUNK=3") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/102-00000016", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/102-00000016", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/102-00000016", "DIAL_NUMBER=МОЙМОБ") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/102-00000016", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/102-00000016", "OUTBOUND_GROUP=OUT_3") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/102-00000016", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/102-00000016", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/102-00000016", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/102-00000016", "outbound-callerid,3") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/102-00000016", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/102-00000016", "0?Set(REALCALLERIDNUM=102)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/102-00000016", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/102-00000016", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/102-00000016", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/102-00000016", "TRUNKOUTCID=73452МОЙТРАНК") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/102-00000016", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/102-00000016", "1?Set(CALLERID(all)=73452МОЙТРАНК)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/102-00000016", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/102-00000016", "1?Set(CALLERID(all)=МОЙТРАНК)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("SIP/102-00000016", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:18] Set("SIP/102-00000016", "CDR(outbound_cnum)=МОЙТРАНК") in new stack
    -- Executing [s@macro-outbound-callerid:19] Set("SIP/102-00000016", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/102-00000016", "0?sub-flp-3,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/102-00000016", "OUTNUM=МОЙМОБ") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/102-00000016", "custom=SIP/peer_МОЙТРАНК") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/102-00000016", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/102-00000016", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("SIP/102-00000016", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/102-00000016", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/102-00000016", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/102-00000016", "1?Set(CONNECTEDLINE(num,i)=МОЙМОБ)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/102-00000016", "1?Set(CONNECTEDLINE(name,i)=CID:МОЙТРАНК)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/102-00000016", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("SIP/102-00000016", "SIP/peer_МОЙТРАНК/МОЙМОБ,300,") in new stack
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    -- Called SIP/peer_МОЙТРАНК/МОЙМОБ
    -- SIP/peer_МОЙТРАНК-00000017 is making progress passing it to SIP/102-00000016
    > 0x2acb7c02f290 -- Probation passed - setting RTP source address to 192.168.1.100:5062
    > 0x2acb7c02f290 -- Switching RTP source address to 192.168.1.100:5060
    > 0x1d8fc00 -- Probation passed - setting RTP source address to 217.116.48.15:22482
    [2015-04-06 14:17:42] WARNING[4143][C-00000007]: app_dial.c:1546 wait_for_answer: Unable to write frametype: 2
    == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'SIP/102-00000016' in macro 'dialout-trunk'
    == Spawn extension (from-internal, МОЙМОБ, 6) exited non-zero on 'SIP/102-00000016' in macro 'exten-vm'
    == Spawn extension (from-internal, МОЙМОБ, 6) exited non-zero on 'SIP/102-00000016'
    -- Executing [h@from-internal:1] Hangup("SIP/102-00000016", "") in new stack
    == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/102-00000016'
    Elastix*CLI>
    Disconnected from Asterisk server
    Asterisk cleanly ending (0).
    Executing last minute cleanups