CC 1.3.1 Inbound CC agentcackbacklogin(solved)

Discussion in 'General' started by Marcelo, Nov 12, 2008.

  1. Marcelo

    Joined:
    Oct 7, 2008
    Messages:
    17
    Likes Received:
    0
    Hallo, i find a solution for changing login "with musik" to ringback

    1. Change in extensions_custom.conf
    exten => _*8888.,n,AgentLogin(${AGENTNUMBER})
    to
    exten => _*8888.,n,AgentcallbackLogin(${AGENTNUMBER})
    2. Change in /var/www/html/modules/agent_console/libs/paloSantoAgentConsole.class.php
    in the function estaAgenteConectado: (as i have no idea of php there is surely
    a shoter solution)

    ereg("(($hardware)/([[:digit:]]{2,}))", $line, $arrReg2);
    // si la condicion es verdadera quiere decir que el agente con la extension seleccionada ya esta conectado
    if($extn == $arrReg2[1])

    to

    --------------------------------------
    $dw1array=explode("/", $line);
    $result = explode("-", $dw1array[1]);
    $arrReg8 = $result[0] ;
    $dw2array=explode("/", $line);
    $result = explode("@", $dw2array[1]);
    $arrReg9 = $result[0] ;
    $dw3array=explode("at", $line);
    ereg("([[:digit:]]{2,})", $dw3array[1],$result1);
    $arrReg10 = $result1[0] ;
    $dw=$extn;
    $dwarray = explode("/",$dw);
    if(($dwarray[1] == $arrReg8) |($dwarray[1] == $arrReg9) | ($dwarray[1] == $arrReg10))
    ------------------------------------------

    Now agent can login in the console and are not longer with music "online" and the phone
    rings when a call arrives to the queue.

    br
     
  2. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    Thanks a lot Marcelo I would report this to devels so we can have the two options: music on hold and call back

    Saludos de Ecuador,

    rafael
     
  3. A.G.A.

    Joined:
    Jul 20, 2008
    Messages:
    33
    Likes Received:
    0
    Hi, Marcelo.
    after edited files Agent Console always says to me "Number Agent already connected with extension".

    can you send me whole edited file "paloSantoAgentConsole.class.php"?
    my email is - deicide_v AT mail.ru

    thanks.
     
  4. Marcelo

    Joined:
    Oct 7, 2008
    Messages:
    17
    Likes Received:
    0
    function estaAgenteConectado($numAgente,$extn, & $mensaje, &$no_queue, $cont_veces=0)
    {
    global $arrLang;
    global $arrLan;

    // datos para la conexión al asterisk
    $ip_asterisk = $_SESSION["ip_asterisk"];
    $user_asterisk = $_SESSION["user_asterisk"];
    $pass_asterisk = $_SESSION["pass_asterisk"];
    $hardware = $_SESSION["hardware"];

    $mensaje = "";
    //$hardware = "SIP|IAX|ZAP|H323|OH323";
    //global $tipo_equipos; echo $tipo_equipos;
    $astman = new AGI_AsteriskManager();
    save_log_prueba("Conectando en estaAgenteConectado");
    if (!$astman->connect($ip_asterisk, $user_asterisk, $pass_asterisk)) {
    save_log_prueba("Error al conectar en estaAgenteConectado");
    $mensaje = $arrLan["Error when connecting to Asterisk Manager"];
    } else {
    $strAgentShow = $astman->Command("agent show online");
    save_log_prueba("Desconecta en estaAgenteConectado\n");
    $astman->disconnect();
    if ($strAgentShow["Response"] != "Error") {
    $arrAgentShow = split("\n", $strAgentShow['data']);
    if (is_array($arrAgentShow) && count($arrAgentShow)>0) {
    foreach($arrAgentShow as $line) {
    if(ereg("^[[:space:]]*([[:digit:]]{2,})", $line, $arrReg1)) {
    // si la condicion es verdadera, quiere decir que el agente que llego como parametro ya esta conectado
    if($numAgente == $arrReg1[1]) {
    $dw1array=explode("/", $line);
    $result = explode("-", $dw1array[1]);
    $arrReg8 = $result[0] ;
    $dw2array=explode("/", $line);
    $result = explode("@", $dw2array[1]);
    $arrReg9 = $result[0] ;
    $dw3array=explode("at", $line);
    ereg("([[:digit:]]{2,})", $dw3array[2],$result);
    $arrReg10 = $result[0] ;
    ereg("([[:digit:]]{2,})", $dw3array[1],$result);
    $arrReg11 = $result[0] ;
    //ereg("'([[:digit:]]{3,})", $line, $arrReg2);
    // si la condicion es verdadera quiere decir que el agente con la extension seleccionada ya esta conectado
    $dw=$extn;
    $dwarray = explode("/",$dw);
    if(($dwarray[1] == $arrReg8) |($dwarray[1] == $arrReg9) | ($dwarray[1] == $arrReg10)| ($dwarray[1] == $arrReg11)) {
    {
    return true;
    } else {
    $mensaje = $arrLan["Number Agent already connected with extension"]."$dw1array[1]" ;
    return false;
    }
    }
    }
    }
    $no_queue = true;
    //$mensaje = $arrLan["Agent isn't in Queue Asterisk"]."\n".$strAgentShow['data'];
    $mensaje = "";
    } else {
    $mensaje = $arrLan["Error when consulting Agent in Asterisk Manager"];
    }
    } else {
    $mensaje = $strAgentShow["Message"];
    }
    }
    return false;
    }
     
  5. Marcelo

    Joined:
    Oct 7, 2008
    Messages:
    17
    Likes Received:
    0
    yes there was a mistake. now it works for me for extesion 3 digits and agent 3 digits
     
  6. fracapu

    Joined:
    Nov 27, 2008
    Messages:
    16
    Likes Received:
    0
    Hi,
    this is wat I was looking for!!!!
    Thank you very much.

    Just one help...
    I know asterisk quite well, but I'm a newbite in PHP...
    I'm having a problem when I try to "patch" the file paloSantoAgentConsole.class.php .
    I removed the three lines

    ereg("(($hardware)/([:digit:]]{2,}))", $line, $arrReg2);
    // si la condicion es verdadera quiere decir que el agente con la extension seleccionada ya esta conectado
    if($extn == $arrReg2[1])


    and then I added in the same place

    $dw1array=explode("/", $line);
    $result = explode("-", $dw1array[1]);
    $arrReg8 = $result[0] ;
    $dw2array=explode("/", $line);
    $result = explode("@", $dw2array[1]);
    $arrReg9 = $result[0] ;
    $dw3array=explode("at", $line);
    ereg("([:digit:]]{2,})", $dw3array[1],$result1);
    $arrReg10 = $result1[0] ;
    $dw=$extn;
    $dwarray = explode("/",$dw);
    if(($dwarray[1] == $arrReg8) |($dwarray[1] == $arrReg9) | ($dwarray[1] == $arrReg10))


    The problem is that I obtain only a white screen whe I go on thecallcenter webpage or the eror message "Number Agent already connected with extension SIP/257" (but there wasn't any agent connected before ).

    I've attached my modified paloSantoAgentConsole.class.php can you check what is wrong or attach me you file?
    Thank you very much and sorry for the waste of time
    Francesco
    http://forum.elastix.org/old_files/paloSantoAgentConsole.txt
     
  7. syvox

    Joined:
    Nov 26, 2008
    Messages:
    6
    Likes Received:
    0
    Hi!

    First of all - great work - very great!
    .....
    But I have the same problem as above mentioned - I get the error message - that this agent is already logged in - and a white side if I click to the agent-Tab to proove the error message..

    Would be nice if you upload your file, because I have some emoticons inside the source code - in your message (or can the be disabled).

    Thanks - and thanks and thanks ;-) The Music on Hold Call Center was a little bit annoying...
     
  8. Marcelo

    Joined:
    Oct 7, 2008
    Messages:
    17
    Likes Received:
    0
    I am sorry for the long time without answer.
    I was 3 weeks on journey and then very busy
    You can find attach the file
     
  9. fracapu

    Joined:
    Nov 27, 2008
    Messages:
    16
    Likes Received:
    0
    Hi Marcelo,
    I'm sorry, but there isn't the attached file...
    Francesco
     
  10. vloose

    Joined:
    Dec 2, 2008
    Messages:
    64
    Likes Received:
    0
    Thank you for this post. This got me 90% where I need to be.

    Problem is I log agents in and they receive incoming calls from the queue, but when I look under the Agents tab, the agents show "off line" and the reports are not showing then online. Any one have any suggestions for fixing this?
     
  11. telecomtechnician

    Joined:
    Jan 8, 2008
    Messages:
    422
    Likes Received:
    0
    Hi there

    Double and triple check that the elastix dialer is running. It is in configuration tab of the call center module.

    Maybe you have to stop and start it again, remember the login and password by default admin/elastix456


    David Medina
     
  12. vloose

    Joined:
    Dec 2, 2008
    Messages:
    64
    Likes Received:
    0
    Thanks David for the suggestion.

    I did what you said and checked that the elastix dialer is running. I changed the password to a bogus password and stopped and started it while tailing /var/log/asterisk/full. With the bogus password, I see this in the log:

    [Dec 19 08:33:31] NOTICE[6460] manager.c: 127.0.0.1 failed to authenticate as 'admin'
    [Dec 19 08:33:32] VERBOSE[6460] logger.c: == Connect attempt from '127.0.0.1' unable to authenticate

    With the correct password entered I see this in the log:

    [Dec 19 08:33:39] VERBOSE[6502] logger.c: == Manager 'admin' logged on from 127.0.0.1

    So I believe it is running. I actually made a simlink to /etc/init.d/elastixdialer in my rc3.d directory in centOS so it would start at boot up because I kept forgetting to start it if I rebooted the server.

    Other suggestions are welcome.

    --Vaughn
     
  13. nicmac

    Joined:
    Jan 14, 2009
    Messages:
    34
    Likes Received:
    0
    Ok, so, I copied Marcelo's paloSantoAgentConsole.class.php file into notepad++, saved it as a php file, winscp'd it to my server, replacing the other file, and I get the same error everyone in that thread was initially getting...

    "Number Agent already connected with extensiona 999b SIP/999c e '001' (musiconhold is 'default')"

    Not only that, but I am getting constant calls to my soft phone from my asterisk trunk number. There is silence and then it hangs up. This does not stop. And it happens if I'm logged in with a different extension than 999. I replaced the file with my backup and it is still happening!

    Here is the file I copied from marcelo's, renamed to txt. Any ideas? http://forum.elastix.org/old_files/paloSantoAgentConsole-8ca92d3ed4088bf3a4d20c9dd2489c26.txt
     
  14. telecomtechnician

    Joined:
    Jan 8, 2008
    Messages:
    422
    Likes Received:
    0
    Hi there

    The result of using this new file, is for deleting the music on hold that the agents hear when they are logged in the queue.

    It worked for me when I installed it the first time, but of course I did the test on a test box, once I was sure it was working, I replicated this functionality in the production box and everything went fine.

    Please try to do everything again, do it slowly, pay attention in the way you replace the file. Then reboot your server.

    Waiting for your comments

    David Medina
     
  15. vloose

    Joined:
    Dec 2, 2008
    Messages:
    64
    Likes Received:
    0
    I found most everything I was trying to get working worked much better with About Elastix 1.4-1 beta.

    Also, be sure when you enter your username and password under "Call Center" - "Configuration" CLICK SAVE before starting the service. The "save" button is not at a very intuitive place so I poked around quite a bit until I realized my simple error.

    --Vaughn
     
  16. nicmac

    Joined:
    Jan 14, 2009
    Messages:
    34
    Likes Received:
    0
    I am running Elastix 1.4-4 and Call Center 1.3. The setup was working perfectly before trying this fix. I rolled back the php file change by replacing it with a backup I made. I have rebooted since doing that.

    I still get the agent already logged in error message. Any time I try logging in with a different agent, the prompt asks for the password, then asks for a new extension, then it errors out in the console and breaks the agent.

    There seems to have been some sustained change in another config file or something because it is stuffed. Also, any agent that logs in still constantly gets calls from the trunk number and the call hangs up after 10 seconds of silence. The campaign calls are going up, so the autodialer is apparently stuck and still dialing when the service is on. This continued to happen after the reboot.

    Jorge in tech support told me there was a bug where agents got stuck. I think this combined with the config changes I made has caused this problem. I really don't know what to do and I'm scheduled to go live tonight. I'm afraid I'm going to have to reload the call center module and recreate everything.
     
  17. telecomtechnician

    Joined:
    Jan 8, 2008
    Messages:
    422
    Likes Received:
    0
    Hi there

    Two mistakes

    1) My mistake is that I suggest you to do this change but I didn´t realize that you were running elastix version 1.4 beta

    2) Your mistake is to play with a production box in this way, You just can not do that, these type of changes can not be done if you are not 100% sure of what you are doing and aware of the side effects

    Fast Solution
    If you are in a hurry, reinstall everything back when it was working and put it online. Find a text box and start playing with this beta version and figure it out and discover a few things.

    Once again: !DO NOT PLAY WITH A PRODUCTION BOX!

    Good luck

    David Medina
     
  18. nicmac

    Joined:
    Jan 14, 2009
    Messages:
    34
    Likes Received:
    0
    I get where you are coming from on both points. Unfortunately, Call Center works with SIP trunks only on 1.4 beta. Also, I am working with a very demanding client with almost no budget because they have been down for 3 weeks due to a vendor that broke there contract, broke their old system, etc.

    Do you know if it's possible to unload the module and then reload it? That might save some hours.

    Thanks.
     
  19. vloose

    Joined:
    Dec 2, 2008
    Messages:
    64
    Likes Received:
    0
    I ran into this problem when calls were holding in the queue. If the queue was empty, agents could log in and out with no problem.

    Solution for me under queue settings:

    Event When Called: yes
    Member Status: yes
    Skip Busy Agents: no
    Queue Weight: 1
    Autofill: Checked

    I'm not 100% sure what made it work properly for me, but I believe it was checking Autofill.

    --Vaughn
     

Share This Page