Endpoint Manager overwriting global config files

Discussion in 'IP Phones' started by Dvoid, Jan 27, 2010.

  1. Dvoid

    Joined:
    Jan 26, 2010
    Messages:
    1
    Likes Received:
    0
    Just tried Elastix 1.6-12 for the first time, and digging it. Although I think I found my first bug. I am using Polycom phones and of course the default configuration on these guys have horrible dial plans and other settings that make them unusable. After much pain of editing my global config values in the sip.cfg and getting the right settings in there I was very happy.

    Then I updated an endpoint, (like changing an extension on the phone), and to my belief all of my painstaking work editing the sip.cfg file was totally wiped out. It turns out whenever the endpoint manager runs it overwrite the master config files for the polycoms in addition to the endpoint configs. Frustrating.

    Naturally, most people will want to add phones without resetting their global configurations all the time. Unfortunately, I couldn't find the master files it is writing the sip.cfg and server.cfg files from, so I had to go into:

    /var/www/html/modules/endpoint_configuration/libs/paloSantoFileEndPoint.class.php

    And comment out the following lines.

    Code:
                        //PASO 2: Creo el archivo server.cfg
    //                    if($this->createFileConf($this->directory, "server.cfg", $contentFilePolycom)){
    //                        $contentFilePolycom = sipFilePolycom($this->ipAdressServer);
    
                            //PASO 3: Creo el archivo sip.cfg
    //                        return $this->createFileConf($this->directory, "sip.cfg", $contentFilePolycom);
    //                    } else return false;
    
    Now I'm happy, but the correct behavior is if these files exist, don't create them.

    Thanks for the hard work.
     
  2. hinzinho

    Joined:
    Sep 18, 2009
    Messages:
    461
    Likes Received:
    0
    I know the feeling. It happened to me too! I now put my custom sip.cfg under another directory and modified the php to point to this directory on each mac.cfg.
     
  3. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Or you can more easily make the file not writable:-

    chmod -w /tftpboot/sip.cfg
     
  4. chito

    Joined:
    Jan 14, 2010
    Messages:
    26
    Likes Received:
    0
    Make all you changes in the server.cfg file never in de sip.cfg file, sip.cfg file will be overwritten when you upgrade the polycom files.
     
  5. mstroven

    Joined:
    Oct 5, 2011
    Messages:
    4
    Likes Received:
    0
    even after chown'ing server.cfg to root, and chmod'ing it 444, it still get's blown away everytime I try and configure an endpoint. It is being loaded with the wrong server IP (I am multi-homed.) Any suggestions?
     
  6. ivan@netvision

    Joined:
    Feb 14, 2008
    Messages:
    1
    Likes Received:
    0
    If you put your changes in the files located in /var/www/html/modules/endpoint_configurator/libs/vendors
    the sip config will be overwritten with the correct changes. But the best way to go is to make the changes in the server.cfg so you know what changes you make.
     

Share This Page