Connect to MSSQL problem

Discussion in 'General' started by eric8850, Jan 25, 2010.

  1. eric8850

    Joined:
    Jan 21, 2010
    Messages:
    3
    Likes Received:
    0
    Hi everyone,
    I am going to use elastix call center to do a inbound call center
    What I've done is update the "contact" table in database and it works well
    the next stage, I want elastix can collect to my MSSQL in other server to get the data

    I've tried to edit two file
    one is default.conf.php:
    $arrConfig['module_name'] = 'agent_console';
    $arrConfig['templates_dir'] = 'themes';
    $arrConfig['astman_dir'] = '/var/lib/asterisk/agi-bin';
    $tipo_equipos = 'SIP|IAX|ZAP|H323|OH323';
    $prefijo_objeto["prefijo"] = "form_agent_console_";
    $cadena_dsn = "mysql://asterisk:asterisk@localhost/call_center";
    $cadena_dsn2 = "mssql://sa:asdfasdf@XXX.XXX.X.XX/TEST";


    one is paloSantoAgentConsole.class.php:
    the first thing i do is create a getDB_52 function:
    function getDB_52() {
    global $arrConf;
    $pDB = new paloDB($arrConf["cadena_dsn2"]);
    return $pDB;
    }

    the second thing is in line 1110:
    function consultar_registro_contacto($id_contact, &$contacto) {
    global $arrLan;
    $pDB = getDB_52();
    $sQuery = "
    SELECT cedula_ruc, name, apellido, origen FROM testing where id='$id_contact'";
    $contacto = $pDB->getFirstRowQuery($sQuery, true);


    But it doesnt work.

    How can I do?
    Thanks.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I don't believe the Elastix distribution has the necessary drivers for MSSQL, you will need to install and configure the unixODBC and freetds stuff first.

    maybe try:

    http://www.unixodbc.org/doc/FreeTDS2.html

    to start.
     
  3. eric8850

    Joined:
    Jan 21, 2010
    Messages:
    3
    Likes Received:
    0
    Thanks for your reply.
    I install FreeTDS and I can connect to my MSSQL server in linux.
    But I am not able to do the next step as I am new in linux, I am not quite understand how I can configure linux.
    Is that I need to install PHP again? I try to find some document in internet and follow but I cannot find the path that PHP should installed in my linux. Also is that I need to install MSSQL driver? I've got so many problem....

    What should I do to connect MSSQL server in my call center now?
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0

Share This Page