About Elastix 1.1-7+FreePBX 2.3.1.5+Aastra 51i +

Discussion in 'IP Phones' started by BAANG, Jul 29, 2008.

  1. BAANG

    Joined:
    Jul 28, 2008
    Messages:
    1
    Likes Received:
    0
    Hello,

    i have problems with the Integration my Aastra 51i phone´s in Elastix/FreePBX.
    I have fold your related Instructions but the Phone doesn´t work.
    In your post you sayed i must edit the File paloSantoFileEndPoint.class.php

    I post here this File: maybe you can help me:

    case 'Aastra':
    $contentFileAastra =PrincipalFileAastra($ArrayData['data']['DisplayName'], $ArrayData['data']['id_device'], $ArrayData['data']['secret'],$this->ipAdressServer);
    if($this->createFileConf($this->directory, $ArrayData['data']['filename'].".cfg", $contentFileAastra))
    return true;
    else return false;
    break;

    function createFileConf($tftpBootPath, $nameFileConf, $contentConf)
    {
    global $arrLang;

    /* $nameFileConf = strtolower($nameFileConf);
    */
    if($this->createFileConf($this->directory, strtoupper($ArrayData['data']['filename']).".cfg", $contentFileAastra))
    $fd = fopen ($tftpBootPath.$nameFileConf, "w");
    if ($fd){
    fputs($fd,$contentConf,strlen($contentConf)); // write config file
    fclose ($fd);
    return true;
    }
    $this->errMsg = $arrLang['Unable write the file'].": $nameFileConf";
    return false;
    }

    function deleteFileConf($tftpBootPath, $nameFileConf)
    {
    global $arrLang;

    /* $nameFileConf = strtolower($nameFileConf);
    */
    if($this->createFileConf($this->directory, strtoupper($ArrayData['data']['filename'].".cfg", $contentFileAastra))
    if (file_exists($tftpBootPath.$nameFileConf)) {
    if(!unlink($tftpBootPath.$nameFileConf)){
    $this->errMsg = $arrLang['Unable delete the file'].": $nameFileConf";
    return false;
    }
    return true;
    }
    }

    case 'Aastra':
    //Creando archivos de ejemplo.
    $contentFileAatra = templatesFileAastra($this->ipAdressServer);
    $this->createFileConf($this->directory, "aastra.cfg", $contentFileAatra);
    return true; //no es tan importante la necesidad de estos archivos solo son de ejemplo.
    break;

    The freePBX Endconfiguration-Link ar not runnig after
    edit this File.

    If you have a Idea?

    Thank´s
     

Share This Page