• 22Mar

    Make sure that the local firewall on the machine will allow the NRPE daemon to be accessed from remote servers.
    To do this, run the following iptables command. Note that the RH-Firewall-1-INPUT chain name is Fedora-specific, so it will be different on other Linux distributions.

    # iptables -I RH-Firewall-1-INPUT -p tcp -m tcp –dport 5666 -j ACCEPT

    Save the new iptables rule so it will survive machine reboots.

    # service iptables save

    Tags: , , ,

  • 03Dec
    1. Logged in as root, check which timezone your machine is currently using by executing `date`. You’ll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone.
    2. Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the “America” directory.
    3. If you wish, backup the previous timezone configuration by copying it to a different location. Such as
      mv /etc/localtime  /etc/localtime-old
    4. Create a symbolic link from the appropiate timezone to /etc/localtime. Example:
      ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
    5. If you have the utility rdate, update the current system time by executing
      /usr/bin/rdate -s time.nist.gov
    6. Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. “America/Los_Angeles”)
    7. Set the hardware clock by executing:
      /sbin/hwclock --systohc

    Tags: , ,

  • 06Nov

    On *nix systems, there is a limit set in the kernel on how many open file descriptors are allowed on the system. This may be compiled in, or it may be tunable on the fly. In Linux, the value of this parameter can be read from and written to the proc filesystem.

    [root@smbsrv090 proc]# cat /proc/sys/fs/file-max
    52427

    On this system 52,427 open file descriptors are permitted. We are unlikely to run out. If we wanted to change it, we’d do something like this:

    [root@smbsrv090 proc]# echo "104854" > /proc/sys/fs/file-max
    [root@smbsrv090 proc]# cat /proc/sys/fs/file-max
    104854

    (Warning, change kernel parameters on the fly only with great caution and good cause)

    But how do we know how many file descriptors are being used?

    [root@smbsrv090 proc]# cat /proc/sys/fs/file-nr
    3391    969     52427
    |	 |       |
    |	 |       |
    |        |       maximum open file descriptors
    |        |
    |        total free allocated file descriptors
    |
    total allocated file descriptors
    (the number of file descriptors allocated since boot)

    Tags: , ,

  • 06Nov

    Al parecer cuando se le instala un SugarCRM a un servidor donde esta corriendo un trixbox, este desconfigura el trixbox totalmente, ya que el SugarCRM instala en el php un nueva forma de capturar las secciones y donde las almacenas, causando esto un deshabilitamiento del trixbox en varias partes.

    Solución

    A continuación explico los pasos para rehabilitar el trixbox.

    1. Acceder a la consola como root.
    2. Luego se debe acceder al folder donde estan los custom modules extensions de php (en el caso de un trixbox es /etc/php.d/)  “cd /etc/php.d
    3. Luego se debe eliminar o mover el archivo memcache.ini de este folder (Preferiblemente moverlo) “mv memcache.ini /root/
    4. Luego se debe reiniciar el servicio de apache “service httpd restart

    De esta manera el trixbox recuperara su funcionamiento total.

    Tags: , , ,

  • 31Oct

    How to Boot a virtual machine automatically.

    1. Once you have created a virtual machine in Workstation, you will probably want to run it through the VMWare Player. In this case, we want to run it on boot.
      Go to System–>Preferences–>Sessions
      Add the following job to load on boot:
      vmplayer /path/to/machine/machine-name.vmx
    2. For security purposes, we want to lock the desktop after an auto-login. In Sessions, add another entry with the following:
      gnome-screensaver-command –lock
    3. Finally, we need an auto-login, because for security purposes you cannot generate an X-environment without one. If this is a problem, you will need to use VMWare Server - and at the time of this message, you will need to forget about 8.04 unless you are a very advanced linux user. There is a lot of hacking involved (trust me, I just did it) and a lot more that can go wrong.
      Go to: System–>Administration–>Login Window
      Click on the “Security” tab
      Select “Enable Auto-Login”
      Choose the appropriate user (the one with the jobs on boot)
      Go to: System–>Preferences–>Screensaver
      Ensure that “Lock screen when screensaver is active” is checked

    Reboot your computer. It should auto-login and immediately lock the desktop into your default screensaver.

    Wait 40 seconds or so, just for fun, then enter your password. Your VMware Workstation should be booted.

    As a final note, if you prefer VMWare Workstation to the VMWare Player, the launch command would be:
    vmrun start /path/to/machine/machine-name.vmx

    Tags: , ,

  • 28Oct

    Vamos a plantear el siguiente escenario:

    Necesitamos que los servidores asterisk de un call center esten sincronizados pero estos tienen diferentes accesos a internet y las conecciones no son estables.

    Vamos a tomar dos servidores como ejemplo y los llamaremos MASTER:192.168.0.1 y SLAVE:192.168.0.2.

    En MASTER:

    • Nos aseguramos que el ntpd este apagado y confirmamos que podemos accesar los servidores en internet uasando el comando ntpdate

    >service ntpd stop
    >ntpdate -u server 0.centos.pool.ntp.org

    • configuraremos el cliente de ntp para que se alimente de un servidor externo, en este caso usaremos los de centos.org.

    [/etc/ntp.conf]
    server 0.centos.pool.ntp.org
    server 1.centos.pool.ntp.org
    server 2.centos.pool.ntp.org

    • Autorizamos a localhost con acceso completo al ntpd y a las demas maquinas de la red interna a consultar el ntpd

    [/etc/ntp.conf]
    restrict 127.0.0.1
    restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap

    • Configuramos ntpd para que inicie con la maquina.

    >chkconfig ntpd on

    En SLAVE:

    • Igual que en SERVER, apagamos el servicio

    > service ntpd stop

    • Configuraremos el cliente de ntp para que se alimente de MASTER.

    [/etc/ntp.conf]
    server 192.168.0.1

    [/etc/ntp/step-tickers]
    192.168.0.1

    • Verificamos que se puede actualizar del server con ntpdate y arrancamos el servicio ntpd. Puede que el ntp server MASTER no este listo para actualizar a SLAVE. Esperamos unos minutos y reintentamos.

    >ntpdate -u 192.168.0.1
    > service ntpd start

    • Configuramos ntpd para que inicie con la maquina.

    >chkconfig ntpd on

    • 23Oct

      VICIDIAL - LOAD BALANCING setup. (Original

      This document is meant to summarize the capabilities and setup of VICIDIAL in a multi-server environment.

      Why Load Balance?

      The primary reason to do load balancing, or clustering of multiple VICIDIAL servers, is to spread the calls taken in or the answered calls on an outbound campaign across all of the agents that are logged into a campaign no matter what server they are on. For instance, on an outbound campaign, you have 2 servers, server one has 20 agents logged in on a campaign and the other server(two) has 5 agents logged in on the same campaign. Lets say that the campaign is set to a dial_level of 3.0 so there are 60 active calls being placed on server one and 15 active calls being placed on server two. Then 23 of the calls on server one answer meaning that there are three calls too many for the agents available on that server. Under a load-balancing-overflow setup those three calls can travel over an IAX2 trunk directly to the agents on that server that are still available. This increased efficiency in both inbound and outbound environments as well as reducing on-hold times for customers and equalizing wait times for agents across all servers for a campaign.

      Another reason for load balancing is the ability to use cheaper hardware on the server side. It is much cheaper and more fault-tolerant to buy four P4 2.0GHz 1U servers for $800 a piece than it is to buy a single 4U quad Xeon 3.2GHz server. The four 1U servers will have more total capacity, can be easily scaled and if one fails you’ve only lost 25% of capacity instead of everything. This philosophy has serverd our call center very well over the last two years.

      How do I set up load balancing on my two server VICIDIAL setup?

      These steps are taken directly from the SCRATCH_INSTALL document, but they are all put together here to give a better idea of what is needed all in one place. It is assumed that you already have VICIDIAL up and running on both servers.

      NOTE: In a multi-server setup you may want to have your database and web server on a separate machine from your Asterisk/VICIDIAL servers. Simply copy the web page directories to your new database/web server and set the AST_SERVER_conf.pl files on your VICIDIAL servers to point to that new database server. You can also have several web servers(or even load-balancing web servers) if you have more than 70 seats in one installation you may want to do that. For the web pages you just need to make sure the dbconnect.php files are configured for your database server. We have had 9 VICIDIAL servers and 2 web servers using a single database server with no problems.

      1. The VICIDIAL/Asterisk servers need to have all of the perl scripts and cron jobs installed on them, except these which only need to be on one of the servers:
      - AST_VDhopper.pl
      - AST_cleanup_agent_log.pl
      - ADMIN_adjust_GMTnow_on_leads.pl
      - AST_DB_optimize.pl

      2. The two servers need to be registered to each other as IAX2 friends:
      SERVER ONE(ASTtest1-10.10.10.15)
      iax.conf:
      register => ASTtest1:test@10.10.10.16

      [ASTtest2]
      type=friend
      accountcode=IAXtrunk2
      context=default
      auth=plaintext
      host=dynamic
      permit=0.0.0.0/0.0.0.0
      secret=test
      qualify=yes

      SERVER TWO(ASTtest2-10.10.10.16)
      iax.conf:
      register => ASTtest2:test@10.10.10.15

      [ASTtest1]
      type=friend
      accountcode=IAXtrunk1
      context=default
      auth=plaintext
      host=dynamic
      permit=0.0.0.0/0.0.0.0
      secret=test
      qualify=yes

      3. The two servers need to have wildcard extensions assigned to the other server in the dialplan:
      SERVER ONE(ASTtest1-10.10.10.15)
      extensions.conf:
      [globals]
      TRUNKIAX2=IAX2/ASTtest1:test@10.10.10.16

      [default]
      exten => _010*010*010*016*8600XXX,1,Dial(${TRUNKIAX2}/${EXTEN:16},55,o)
      exten => _010*010*010*016*8600XXX,2,Hangup

      SERVER TWO(ASTtest2-10.10.10.16)
      extensions.conf:
      [globals]
      TRUNKIAX1=IAX2/ASTtest2:test@10.10.10.15

      [default]
      exten => _010*010*010*015*8600XXX,1,Dial(${TRUNKIAX1}/${EXTEN:16},55,o)
      exten => _010*010*010*015*8600XXX,2,Hangup

      4. For BOTH servers the VDAD extens need to be setup there as well for the Load-Balance and Load-Balance-Overflow AGI scripts, as well as setting up the closer and inbound extens if needed:

      ; VICIDIAL_auto_dialer transfer script Load Balance Overflow:
      exten => 8367,1,AGI(call_log.agi,${EXTEN})
      exten => 8367,2,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
      exten => 8367,3,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
      exten => 8367,4,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
      exten => 8367,5,Hangup

      ; VICIDIAL_auto_dialer transfer script Load Balanced:
      exten => 8368,1,AGI(call_log.agi,${EXTEN})
      exten => 8368,2,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
      exten => 8368,3,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
      exten => 8368,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
      exten => 8368,5,Hangup

      ; parameters for agi-VDAD_LB_closer.agi (2 fields separated by five dashes “—–”):
      ; 1. the full extension formatted by VICIDIAL for internal transfers * separated
      ; 2. the word START to denote the beginning of the acceptance of the transfer
      ; inbound VICIDIAL transfer calls [INTERNAL TRANSFER]
      exten => _90009.,1,Answer ; Answer the line
      exten => _90009.,2,AGI(agi-VDAD_LB_closer.agi,${EXTEN}—–START)
      exten => _90009.,3,Hangup

      ; parameters for agi-VDAD_LO_closer.agi (2 fields separated by five dashes “—–”):
      ; 1. the full extension formatted by VICIDIAL for internal transfers * separated
      ; 2. the word START to denote the beginning of the acceptance of the transfer
      ; inbound VICIDIAL transfer calls [LOCAL TRANSFER]
      exten => _990009.,1,Answer ; Answer the line
      exten => _990009.,2,AGI(agi-VDAD_LO_closer.agi,${EXTEN}—–START)
      exten => _990009.,3,Hangup

      ; inbound VICIDIAL call with prompt for 4-digit fronter code
      exten => 1234,1,Answer ; Answer the line
      exten => 1234,2,AGI(agi-VDAD_LO_closer_inbound.agi,CL_GALLERIA—–7275555134—–Closer—–park———-999—–1)
      exten => 1234,3,Hangup

      5. Reload both Asterisk servers and for outbound change the VDAD exten to 8367 or 8368 and kill the AST_VDauto_dial.pl scripts on both servers so they can restart and you can now look at the AST_timeonVDADall.php page(per campaign time-on-VDAD available from the STATS and REPORTS link on the vicidial admin screen) that will allo you to see the server_ip of the agent and the server_ip of the call per campaign across all campaigns.

      If you have any questions or problems please post to the astguiclient-users list(link available on the project website)

      6. For multi-server VICIDIAL/astGUIclient installations these cron scripts only need to be set up and run on one of the servers:
      - AST_VDhopper.pl
      - AST_cleanup_agent_log.pl
      - ADMIN_adjust_GMTnow_on_leads.pl
      - AST_DB_optimize.pl

      Tags: ,

    • 22Oct

      Para poder responder a la doble linea (CW) en troncos análogos digitando *9 se agrega un feature a la central de la siguiente forma:

      1- Se registra la variable global “DYNAMIC_FEATURES”

      extensions.conf
      [globals]
      DYNAMIC_FEATURES=>apps
      (En caso de tener otras aplicaciones, estas se separan por #. Ejm: DYNAMIC_FEATURES=>features#apps)

      2- Se agrega la aplicación Flash() con su código (*9).

      features.conf
      [applicationmap]
      apps => *9,callee,Flash,

      * Notas.

      - Es bueno revisar que el tiempo del flash no sea muy corto o la CO no lo detectará.

      zapata.conf
      [channels]
      flash=500

      - En trixbox se usan los siguientes archivos de conf:

      globals_custom.conf
      features_applicationmap_custom.conf

      Tags: , ,

    • 18Oct

      Para que cada agente del cc accese a su habiente de trabajo cambiamos la pagina de inicio del navegador por la direccion de nuestro servidor de vicidial, pero luego tiene que insertar el usuario y contraseña del tefelono(paso que saltaremos) luego es usuario y contraseña del agente.

      Al cambiar la pagina de inicio del navegador  ej: http://google.com  por

      http://XXX.XXX.XXXX.XXX/agc/vicidial.php esto seria lo normal pero lo haremos de la siguiente forma cambiaremos por

      http://XXX.XXX.XXX.XXX/agc/vicidial.php?pl=cc111&pp=vt111

      cambiando cc111 por la extencion y vt111 por la contraseña que vallan a utilizar esto hara que el agente solo tenga que insertar su usuario y contraseña del agente.

      Ralf_z3

    • 16Oct

      edit the file /usr/share/astguiclient/mysql_tables.sh with your favorite editor

      paste this:

      Code:
      #!/bin/sh

      # this shell script finds all the tables for a database and run a command against it
      # @usage “mysql_tables.sh –optimize MyDatabaseABC”
      # @date 6/14/2006
      # @version 1.1 - 1/28/2007 - add repair
      # @version 1.0 - 6/14/2006 - first release
      # @author Son Nguyen

      DBNAME=$2

      printUsage() {
      echo “Usage: $0″
      echo ” –optimize <dbname>”
      echo ” –repair <dbname>”
      return
      }

      doAllTables() {
      # get the table names
      TABLENAMES=`mysql -D $DBNAME -e “SHOW TABLES\G;”|grep ‘Tables_in_’|sed -n ’s/.*Tables_in_.*: \([_0-9A-Za-z]*\).*/\1/p’`

      # loop through the tables and optimize them
      for TABLENAME in $TABLENAMES
      do
      mysql -D $DBNAME -e “$DBCMD TABLE $TABLENAME;”
      done
      }

      if [ $# -eq 0 ] ; then
      printUsage
      exit 1
      fi

      case $1 in
      –optimize) DBCMD=OPTIMIZE; doAllTables;;
      –repair) DBCMD=REPAIR; doAllTables;;
      –help) printUsage; exit 1;;
      *) printUsage; exit 1;;
      esac

      do the following commands:

      • chmod 755 /usr/share/astguiclient/mysql_tables.sh
      • /usr/share/astguiclient/mysql_tables.sh –repair asterisk
      • /usr/share/astguiclient/mysql_tables.sh –optimize asterisk

      Tags: , , ,

    « Previous Entries