jueves, 28 de octubre de 2010

verificar numero telefonico con telmex

marcando desde un telefono interno 714, nos dice la operadora el numero telefonico que tenemos en nuestra linea,

cron para a2billing

editar archivo /var/spool/cron/asterisk  este procedimiento dió mejor resultado


1 0 1 * * php /var/lib/asterisk/agi-bin/libs_a2billing/crontjob/a2billing_autorefill.php


reiniciar servicios y listo...

miércoles, 27 de octubre de 2010

instalar codec g729


Digium G.729 Software Codec for Asterisk README for Version 3.1.x modules
==============================================================================

  Digium offers a software implementation of G.729 that is compatible with
  Asterisk and is properly licensed from the intellectual property rights and
  patent holders. Please visit the following web address to read more about
  this product and to purchase license keys:

  http://store.digium.com/productview.php?product_code=G729CODEC

  Follow the instructions below to download and install the Digium G.729
  Software Codec for Asterisk.



==[ Installation Overview ]===================================================

  Once you have a G.729 license key, there are four primary tasks to perform
  in order to install the G.729 software codec.

      1)  Download and execute the 'register' utility to generate a valid
          license.

      2)  Download and execute the 'benchg729' utility to determine the
          optimum build.

      3)  Use the 'G.729 Selector' web utility to determine the recommended
          G.729 codec binary download package.

      4)  Download and install the 'codec_g729' binary that is built for your
          platform.

  The steps to complete these tasks are described in the Installation
  Procedure section.

  The register utility may be downloaded from:
  http://downloads.digium.com/pub/register

  The benchg729 utility may be downloaded from:
  http://downloads.digium.com/pub/telephony/codec_g729/benchg729

  The G.729 Selector may be viewed from:
  http://www.digium.com/en/docs/G729/g729-download.php

  The G.729 codec binary may be downloaded from:
  http://downloads.digium.com/pub/telephony/codec_g729

  Notes:

  - Supported software builds are provided for 32-bit and 64-bit x86
    platforms, and are optimized for a variety of processor types. Choose the
    directory that closest matches your Asterisk version and processor
    type. Each of these directories contains codec TAR files which include
    the G.729 codec binary for each type of supported processor.

  - The register utility and G.729 codec binaries for additional processor
    types and operating systems may be found in the unsupported directory.



==[ Installation Procedure ]==================================================

1)  Download and execute the register utility to generate a valid license.

1.1)  Download the register utility to the root home directory of your
      Asterisk server. First, log in as the user "root".

      Command-line Example for 32-bit Linux:

        # cd /root
        # wget http://downloads.digium.com/pub/register/x86-32/register

1.2)  Change the permissions of the /root/register file to r-x------.

      Command-line Example:

        # chmod 500 /root/register

1.3)  Run the register utility and follow the interactive instructions. The
      registration utility will prompt you for your G.729 license key.

      Command-line Example:

        # /root/register

      Notes:

      - Internet access is required from your Asterisk server in order to
        register your G.729 key for licensed use. Outgoing network traffic to
        TCP port 443 (SSL) must be allowed in order for the register utility
        to successfully communicate with Digium's license server and complete
        the registration process.


2)  Download and execute the benchg729 utility to determine the optimum build.

    There are various optimized versions of the G.729 codec binary available
    for different CPU types in both x86-32 and x86-64 architectures. To
    determine which build of the module performs best on your system, the
    benchg729 utility will run a series of tests, and report which codec
    module will maximize encoding performance on your system.

2.1)  Download the benchg729 utility to the root home directory of your
      Asterisk server.

      Command-line Example for 32-bit Linux:

        # cd /root
        # wget http://downloads.digium.com/pub/telephony/codec_g729/\
          benchg729/x86-32/benchg729-1.0.7-x86_32 -O benchg729

2.2)  Change the permissions of the /root/benchg729 file to r-x------.

      Command-line Example:

        # chmod 500 /root/benchg729

2.3)  Run the benchg729 utility and record the build that it recommends should
      be used for your platform.

      Command-line Example:

        # /root/benchg729


3)  Use the 'G.729 Selector' web utility to determine the recommended G.729
    codec binary download package.

    Depending upon your version of Asterisk and processor architecture,
    different G.729 codec binaries are recommended for the use of G.729.
    Digium provides a G.729 Selector web utility in order to assist with
    choosing the correct G.729 codec binary. The G.729 Selector web utility
    should be viewed with a standard web browser and may be accessed via the
    following URL:

    http://www.digium.com/en/docs/G729/g729-download.php

    The file that the G.729 Selector web utility informs you is recommended
    for your platform should be the file that you use in place of the examples
    provided in step 4 of this section.


4)  Download and install the codec_g729 binary that is built for your
    platform.

    There are different versions of the G.729 codec binary for various
    Asterisk releases; there is a single version for all Asterisk 1.4.x
    releases, and there is a version for each Asterisk 1.6.x point release
    (e.g. 1.6.0, 1.6.1). Take note that these modules are *not* loadable in
    prior releases of Asterisk, and will only load in the specific version for
    which they are designed. Be sure that you download the correct version of
    the G.729 codec binary for your Asterisk version, as recommended by the
    G.729 Selector web utility in step 3.

    In addition, updated builds of the G.729 codec binary are frequently
    released. Each build has a 'version number'. This version number is part
    of the filename, and is also included in the copyright/license message
    that is displayed when the module is loaded into Asterisk. In this
    document, build number '3.1.2' has been used as an example. Keep in mind
    that the current build number may be newer when you read this document.

4.1)  Download G.729 to the root home directory of your Asterisk server,
      replacing 'pentium4m' in the example with the recommended build and
      '_32' in the example with your CPU architecture.

      Command-line Example for 32-bit Linux:

        # cd /root
        # wget http://downloads.digium.com/pub/telephony/codec_g729/\
          asterisk-1.6.0/x86-32/codec_g729a-1.6.0_3.1.2-pentium4m_32.tar.gz

4.2)  Expand the codec_g729 archive and copy the codec_g729a.so file to the 
      /usr/lib/asterisk/modules directory.

      Command-line Example for 32-bit Linux:

        # tar xzvf codec_g729a-1.6.0_3.1.2-pentium4m_32.tar.gz
        # cp /root/codec_g729a-1.6.0_3.1.2-pentium4m/codec_g729a.so /usr/lib\
          /asterisk/modules

4.3)  The G.729 codec binary must be loaded in order to initialize your new
      G.729 licensed channels. (See General Notes to use multiple licenses on
      one server.)

      Command-line Example:

        # asterisk -rx "module load codec_g729a.so"

4.4)  Verify that the number of G.729 licensed channels available to Asterisk
      matches the number of G.729 licensed channels that you purchased. This
      can be verified by issuing "g729 show licenses" in the Asterisk CLI.
      Take into consideration any previous G.729 licensed channels that you
      had already registered to your Asterisk server before verifying this
      number.

      Command-line Example:

        # asterisk -rvvv
        *CLI> g729 show licenses
        0/0 encoders/decoders of 26 licensed channels are currently in use

        Licenses Found:
        Key: G729-EXAMPLE1 -- Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:
        am:pl:e0:ex:am:pl:e0 -- Channels: 2 (Expires: 2026-09-26) (OK)
        Key: G729-EXAMPLE2 -- Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:
        am:pl:e0:ex:am:pl:e0 -- Channels: 24 (Expires: 2026-09-26) (OK)


5)  Copy the generated license files to a safe place as described in the
    Backup Procedure section.



==[ Backup Procedure ]========================================================

  It is extremely important that you backup all of the files located in the
  /var/lib/asterisk/licenses directory. This directory contains the Host-ID
  specific license files for your system. These license files are tied to the
  MAC address of all the ethernet devices installed in your system. Creating a
  backup of this directory will allow you to restore your G.729 license file
  in case you need to reinstall your operating system. This will help prevent
  the need to contact Digium to request authorization to increment your G.729
  key and from needing to purchase a new G.729 key if you exceed the maximum
  number of G.729 key increments allowed.



==[ General Notes ]===========================================================

  -  Multiple G.729 keys may be registered to the same Asterisk server. This
     will allow you to increase the total number of available G.729 licensed
     channels on your Asterisk server. New G.729 keys may be registered to
     your Asterisk server using the same instructions provided in the
     Installation Procedure section. There will be an additional G.729 license
     file generated in the /var/lib/asterisk/licenses directory for each G.729
     key that is successfully registered to your Asterisk server. It is
     extremely important that you follow the instructions provided in Backup
     Procedure section whenever a new G.729 key is successfully registered to
     your Asterisk server.

  -  A G.729 key must be re-registered if any of the Ethernet devices in your
     Asterisk server are changed, added, or removed. The unique G.729 license
     file which is located in your /var/lib/asterisk/licenses directory is
     tied to the MAC address of all the Ethernet devices installed in your
     system. A G.729 key can only be re-registered once without authorization
     from Digium. Digium must be contacted by phone in order to request
     authorization to have your G.729 key incremented. Digium reserves the
     right to deny authorization for having a G.729 key incremented.

  -  The silence suppression feature is not available using the codec_g729a.so
     file. Asterisk will generate output similar to "Dropping extra frame of
     G.729 since we already have a VAD frame at the end" if the remote end is
     attempting to use silence suppression with G.729. Consult with the remote
     end to ensure that silence suppression is not being used. You may have
     problems using G.729 if the remote end attempts to use silence
     suppression.

  -  It is not required or suggested to specify a load line in the
     /etc/asterisk/modules.conf for the codec_g729a.so file. Asterisk will
     automatically load it using the autoload option. The autoload option is
     set on by default.



==[ Asterisk CLI Commands ]===================================================

  The G.729 codec binary provides the following Asterisk CLI commands:

  "g729 show hostid"
  "g729 show licenses"
  "g729 show version"

  These are explained in greater detail below.
  
  -  Issuing "g729 show hostid" on the Asterisk CLI will display the system's
     Host-ID.

     Command-line Example:

       # asterisk -rvvv
       *CLI> g729 show hostid
       Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0

  -  Issuing "g729 show licenses" on the Asterisk CLI will display all G.729
     licenses and their utilization.

     Command-line Example:

       # asterisk -rvvv
       *CLI> g729 show licenses
       0/0 encoders/decoders of 26 licensed channels are currently in use

       Licenses Found:
       Key: G729-EXAMPLE1 -- Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:a
       m:pl:e0:ex:am:pl:e0 -- Channels: 2 (Expires: 2026-09-26) (OK)
       Key: G729-EXAMPLE2 -- Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:a
       m:pl:e0:ex:am:pl:e0 -- Channels: 24 (Expires: 2026-09-26) (OK)

  -  Issuing "g729 show version" on the Asterisk CLI will display the G.729
     codec binary version.

     Command-line Example:

       # asterisk -rvvv
       *CLI> g729 show version
       Digium G.729A Module Version 1.6.0_3.1.2 (optimized for pentium4m_32)



==[ AMI Actions ]=============================================================

  The G.729 codec binary provides the following AMI actions:

  "G729LicenseList"
  "G729LicenseStatus"

  These are explained in greater detail below.

  -  Issuing the "G729LicenseList" AMI action will display all G.729 licenses
     and their loading status.

     AMI Example:

       Action: G729LicenseList

       Response: Success
       Message: License list will follow

       Event: G729License
       Key: G729-EXAMPLE1
       Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0
       Channels: 2
       ExpDate: 2026-09-26
       Status: OK

       Event: G729License
       Key: G729-EXAMPLE2
       Host-ID: ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0:ex:am:pl:e0
       Channels: 24
       ExpDate: 2026-09-26
       Status: OK

       Event: G729LicenseList complete

  -  Issuing the "G729LicenseStatus" AMI action will display G.729 license
     utilization.

     AMI Example:

       Action: G729LicenseStatus

       Response: Success
       ChannelsLicensed: 26
       EncodersInUse: 0
       DecodersInUse: 0



==[ Technical Support ]=======================================================

For more help, please visit the G.729 category of the Digium Knowledgebase:
http://kb.digium.com/?CategoryID=30

If you have any questions or concerns, contact Digium Technical Support by
phone, either toll-free within the US at 1.877.DIGIUM.1(1.877.344.4861) or
directly at +1.256.428.6000.  You may also contact Digium Technical Support by
visiting http://www.digium.com/support.

==============================================================================

DID con E1

que tal mira mi E1 esta con telmex y los digitos que telmex me envia son 4 por lo que mi numero piloto es el 38022000 y de ahi mis consecutivos son las terminaciones 2001,2002 y asi hasta el 2029 entonces en mi unicall.conf ponemos la variante como max,10,4 el 10 son los digitos que mi pbx envia y el 4 son los que telmex envia 


entonecs en freepbx inbound routes en opcion de DID pongo la terminacion ejemplo: 2000 y la mando al ivr 





en pocas palabras hay que crear las rutas de entrada con los ultimos 4 digitos como DID number y su destinos...


probado !!!

martes, 26 de octubre de 2010

instalacion de esx i 4.0

Instalar VMware ESXi 4 paso a paso

vmware_logoHace ya algún tiempo que salió VMware ESXi 4, un software de virtualizaciónbaremetal completamente gratuito. Y, aunque en un artículo anterior ya vimos como instalar la versión 3.5, voy a actualizar aquel tutorial con esta nueva versión.
Si bien la instalación es muy sencilla y no presenta ninguna dificultad, en este tutorial vamos a ver cómo realizarla paso a paso con el único fin de que no temas instalarlo. Además se incluyen los pasos para instalar el cliente y añadir el código de licencia.
Pero mejor nos dejamos de palabrería y vamos al lío ¿no?
Los pasos para instalar VMware ESXi 4 son los siguientes:
  1. Primero verificamos en la guía de compatibilidad de hardware de VMware ESXi (HCL) que el hardware de nuestro servidor está soportado por VMware ESXi 4. Si bien es un paso importante, no hay que olvidar que es posible instalar VMware ESXi 4 en más servidores de los que se indican en esta guía. Hasta se puede instalar en VirtualBox. Eso sí, necesitaremos inevitablemente un procesador de 64 bits y 2 GB de RAM como mínimo.
  2. Descargamos la imagen ISO de VMware ESXi Hypervisor desde aquí y la grabamos en un CD. Para hacer esto primero tendremos que estar registrados en la web de VMware.
  3. Arrancamos el servidor en el que vayamos a instalar el ESXi con el CD grabado en el paso anterior y nos aparecerá el menú de arranque:
    Menú de arranque de VMware ESXi 4
    Menú de arranque de VMware ESXi 4
  4. De forma automática comienza el arranque del instalador.
  5. A continuación se nos pregunta por la operación que queremos realizar: cancelar (ESC), reparar (R) o instalar (Enter). Pulsando la tecla Introseleccionamos instalar.
    Pulsamos Intro para instalar el ESXi 4
    Pulsamos Intro para instalar el ESXi 4
  6. El siguiente paso consiste en aceptar el EULA (End User License Agreement) después de leerlo detenidamente. Para aceptarlo pulsamos la tecla F11.
    Presionamos la tecla F11 para aceptar el EULA
    Presionamos la tecla F11 para aceptar el EULA
  7. Después tenemos que seleccionar el disco duro donde se instalará el sistema. Como en mi caso sólo dispongo de uno, no tengo que elegir. Así que pulsamos Intro para continuar.
    Seleccionamos el disco duro
    Seleccionamos el disco duro y pulsamos Intro
  8. Como en el disco duro que voy a utilizar tenía instalado otro sistema, me pide confirmación porque se eliminará todo el contenido del disco. Si tu disco duro no tiene nada instalado, no te aparecerá este mensaje. Pulsamos Intro para continuar.
    Confirmamos que
    Confirmamos la elección del disco duro presionando Intro
  9. Y ahora confirmamos que vamos a instalar VMware ESXi 4 en el disco que habíamos seleccionado. Lo hacemos pulsando F11.
    Confirmamos la instalación de ESXi 4
    Confirmamos la instalación de ESXi 4 pulsando F11
  10. La instalación se hace en muy poco tiempo y antes de darnos cuenta nos encontraremos con el mensaje de que se ha instalado correctamente y tenemos que reiniciar. Extraemos el CD y pulsamos Intro para reiniciar.
    Pulsamos Intro para reiniciar
    Pulsamos Intro para reiniciar
  11. Al reiniciar el sistema nos encontramos con la pantalla de inicio de VMware ESXi y, antes de empezar a trabajar con él, deberemos configurarlo pulsando la tecla F2.
    jhkjh
    Pulsamos la tecla F2 para configurar el servidor
  12. La pantalla de configuración llama la atención porque es bastante simple y tiene pocas opciones.
    Lo primero que debemos hacer es establecer una contraseña para el usuario root que, por defecto, no la tiene. Para esto nos situamos sobreConfigure Root Password y pulsamos Intro.
    sdsdsds
    Configuramos la contraseña de root
  13. Escribimos la nueva contraseña para el usuario root y pulsamos Intro.
    Escribimos la contraseña de root
    Escribimos la contraseña de root
  14. Aparecemos en la pantalla de configuración de nuevo y ahora podemos pasar a cambiar la configuración de red. En principio, como en mi red hay un servidor DHCP, el ESXi tiene asignada ya una IP. Sin embargo, es conveniente que la IP del VMware ESXi sea fija (como debe ocurrir con cualquier servidor).
    Por lo tanto, nos situamos sobre Configure Management Network y pulsamos Intro.
    Accedemos
    Accedemos a Configure Management Network
  15. En la siguiente pantalla bajamos hasta la opción IP Configuration y pulsamos Intro.
    Kkjkdjd
    Bajamos hasta IP Configuration
  16. A continuación seleccionamos Set static IP address and network configuration con la barra espaciadora y escribimos la dirección IP, la máscara y la puerta de enlace. Para terminar pulsamos Intro.
    dfddfdf
    Establecemos la nueva configuración
    Ya tenemos configurado nuestro VMware ESXi, apagamos el monitor de este equipo y nos situamos en cualquier otro equipo de la red con Windows (lamentablemente todavía no existe el cliente de vSphere para Linux).
  17. Abrimos un navegador en el equipo con Windows y escribimos la dirección IP que hemos configurado en el servidor VMware ESXi. Con Firefox nos encontraremos con el siguiente fallo de seguridad y tendremos que hacer clic en O puede añadir una excepción…
    Fallo de seguridad
    Fallo de seguridad al acceder a la IP del ESXi 4
  18. Ahora hacemos clic en el botón Añadir excepción…
    Añadimos una excepción de seguridad
    Añadimos una excepción de seguridad
  19. Por último, hacemos clic sobre el botón Obtener certificado y, a continuación, sobre Confirmar excepción de seguridad.
    Obtenemos el certificado y confirmamos la excepción
    Obtenemos el certificado y confirmamos la excepción
  20. Así llegamos a la página de bienvenida del servidor VMware ESXi 4. Desde esta página vamos a obtener el programa que nos va a permitir la administración completa del servidor de forma remota. Hacemos clic enDownload vSphere Client.
    Acce
    Página de bienvenida del ESXi 4
  21. El siguiente paso consiste en guardar el archivo.
    Guardamos el
    Guardamos el archivo
    Y lo ejecutamos una vez descargado.
  22. Para instalar VMware vSphere Client sólo tenemos que seleccionar el idioma. Como no está disponible el español, he elegido inglés.
    Elegimos el idioma de la instalación
    Elegimos el idioma de la instalación
    Después bastará con ir haciendo clic sobre Next.
  23. Una vez instalado ejecutamos VMware vSphere Client y nos aparece la ventana para establecer la conexión y en la que deberemos introducir la IP del servidor ESXi, el nombre de usuario y la contraseña. En principio, sólo existe el usuario root con la contraseña que establecimos anteriormente.
    vSphere Client
    Introducimos los datos de conexión en el vSphere Client
  24. Al intentar conectar nos aparece un aviso de seguridad por culpa, otra vez, del certificado SSL. Para salir del paso hacemos clic sobre el botón Ignore. Si queremos solucionar el problema, deberemos hacer clic en View Certificate e instalar el certificado.
    Agrgr
    Ignoramos la advertencia de seguridad
  25. Lo primero que veremos al entrar al vSphere Client será un mensaje recordándonos el número de días del periodo de prueba que nos quedan. Sí, VMware ESXi 4 es gratis pero necesita de un número de licencia.
    sdsdsdf
    Número de días de prueba que nos quedan
  26. Por fin, ya nos encontramos con el VMware vSphere Client que nos va a permitir administrar nuestro servidor de forma muy sencilla. Pero antes de que nos pongamos a trastear con el servidor vamos a introducir el código de licencia y así nos desperocupamos el período de prueba. Con este fin en mente hacemos clic sobre Inventory.
    jhdjshd
    Hacemos clic en Inventory
  27. En el panel de la izquierda de Inventory veremos la IP de nuestro servidor y a la derecha un conjunto bastante amplio de pestañas. Hacemos clic sobre la pestaña Configuration.
    lalala
    Hacemos clic sobre la pestaña Configuration
  28. Después hacemos clic sobre Licensed Features en la sección de Software y, a continuación, hacemos clic en el Edit… (arriba a la derecha) que  está a la altura de License Source.
    Licensed
    Hacemos clic en Licensed Features
  29. Nos aparecerá la siguiente ventana en la que seleccionamos Assign a new license key to this host y hacemos clic sobre Enter Key…
    Hacemos clic en
    Hacemos clic sobre Enter Key
  30. Escribimos el código de licencia que nos ha proporcionado VMware y hacemos clic en OK.
    Escribimos el código de licencia
    Escribimos el código de licencia
  31. Vemos características de la licencia introducida y hacemos clic sobre OK.
    lkjlkdsjlkd
    Vemos las características de la licencia
  32. Y podemos ver en la imagen como se ha añadido correctamente la licencia.
    Comprobamos que hemos introducido la licencia correctamente
    Comprobamos que hemos introducido la licencia correctamente
Si has seguido estos pasos, ya puedes empezar a crear máquinas virtuales a través del VMware vSphere Client o importar máquinas que ya tuvieses creadas o virtualizar máquinas físicas con el VMware vCenter Converter Standalone 4.0.
¡A disfrutar!