lunes, 25 de enero de 2016

GARMIN

GARMIN - Actualizacion mapas G 2689 LMT Podemos descargas mapas alternos : http://mapas.alternativaslibres.es/descargas.php De vez en cuando, Garmin suele actualizar sus productos y con ello también incorporar cambios, uno de ellos fue con algunos de sus nuevos GPS, como el Nuvi 2495 (muy parecido al Nuvi 40) que, además de tener un software/OS más actualizado, también viene con una sorpresa: no es “reconocido” cómo unidad de disco cuando lo conectamos en una PC y por lo tanto, no tiene una letra de unidad asignada, no podemos “verlo” y con ello tampoco cargarle los mapas. SOLUCION: En la pantalla de seteo de volumen (donde está la barra que podemos deslizar con el dedo) hay que presionar la esquina superior derecha por 10 segundos. Va a aparecer una pantalla con seteos para el desarrollador. Bajar con la flechita hasta llegar a la pantalla MTP Settings. Entrar a esa pantalla. Cambiar la opcion de Auto Detect a la opcion Mass Storage Single Session. Presionar Guardar, volver a la pantalla principal del GPS y, sin apagarlo, conectar el GPS a la PC. La razón de porque no se le asigna letra sería porque Garmin modificó el protocolo de transmisión de datos entre la PC y el GPS. Anteriormente usaba Mass Storage (que asigna una letra al GPS en Windows) y ahora usa MTP (Mass Transfer Protocol). que no asigna letra en Windows. Es por eso que hay que modificar este seteo para ver la carpeta. La modificación del seteo se revierte luego de desconectar el GPS de la PC. Si quieren hacer esta modificación permanente hay que elegir, en la carpeta de MTP Setting la opcion de Mass Storage en vez de Mass Storage Single Session." Listo, ahora a actualizar los mapas de este Garmin. Descarga el mapa Directo a GPS, obtendras un archivo gmapsupp.img que debes renombrar a gmapprom1.img xxxxxxxx Aparentemente, y por lo que he experimentado, el Garmin Nuvi puede interpretar 4 mapas con distintos nombres en la Unidad de Memoria y 1 en la SD simultáneamente. De todas maneras, se puede cargar varios mapas en un solo archivo -gmapsupp.img- por medio del MapSource. Ejemplo: Mapear más Brasil. Tengo organizado mis mapas de manera individual, con estos nombres: En la memoria de la Unidad: - gmapbmap.img = Mapa base, que viene con el equipo. - gmapprom.img = Mapa precargado de fabrica (EEUU, Canada) - gmapsupp.img = Mapear V8 - gmapprom1.img = Mapear Nautico V2 En la tarjeta de Memoria SD: - gmapsupp.img = Brasil (Notese que hay dos gmapsupp.img. Uno en cada memoria y ambos funcionan correctamente) Otro nombre que se admitiría es gmapsup2.img, pero a mi no me funcionó. Lo que no se recomienda por traer conflictos, es tener dos versiones de un mismo mapa en el Gps. Ejemplo: Mapear 7.5 en tarjeta SD y Mapear 8 en la Unidad, o viceversa.

viernes, 9 de octubre de 2009

Instalacion de Nagios

Partimos de una instalación limpia de debian etch con apache2. Lo primero que necesitamos es instalar nuestro entorno de compilación. Hay un paquete en debian con todo lo que necesitas para ello.

apt-get install build-essential




El segundo paso es instalar las librerías necesarias para, posteriormente, compilar nagios. Necesitamos las jpeg, png y gd2. Para las dos primeras no tuve ningún problema en instalar las que vienen con la distribución estable:

apt-get install libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev

bajarse las fuentes de gd2 y compilarlos también:
cd /tmp
wget -c http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar xzf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure
make
make install

Lo siguiente es crear los grupos y usuarios necesarios para nagios:

useradd nagios
passwd nagios
groupadd nagios
groupadd nagcmd
usermod -G nagios nagios
usermod -G nagios josemaria
usermod -G nagcmd nagios
usermod -G nagcmd www-data

Ya lo tenemos todo listo. Ahora toca bajarse Nagios, compilarlo e instalarlo. Visita la página oficial para asegurarte de que usas las últimas versiones disponible. Por lo demás, la secuencia usando las versiones actuales es la siguiente:

cd /tmp
wget -c http://tinyurl.com/2jyzao/nagios-3.0a5.tar.gz
wget -c http://tinyurl.com/2mqzzk/nagios-plugins-1.4.9.tar.gz
tar xzf nagios-3.0a5.tar.gz
cd nagios-3.0a5
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cd ..
tar xzf nagios-plugins-1.4.9.tar.gz
cd nagios-plugins-1.4.9
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

Creamos una contraseña para el acceso web del usuario nagiosadmin y reiniciamos apache:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 reload

Y por último arrancamos nagios y, si no presenta ningún error, creamos un enlace para que de ahora en adelante arranque de forma automática al iniciar la máquina:

/etc/init.d/nagios start
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

miércoles, 25 de febrero de 2009

Asterisk-Java

Asterisk-Java

El paquete Asterisk-Java consiste de un set de clases Java que le permiten facilmente construir aplicaciones Java que interactua con servidores PBX Asterisk. Asterisk-Java soporta ambas interfaces que Asterisk provee para este escenario: The FastAGI protocol and the Manager API.

La implementacion FastAGI soporta todos los commands actualmente habiles de Asterisk.

El Manager API implementation soporra recibir eventos del Asterisk server (e.g. call progess, registered peers, channel state) y enviar acciones a Asterisk (e.g. originate call, agent login/logoff, start/stop voice recording).

A complete list of the available events and actions is available in the javadocs.

Asterisk-Java is available under Apache license from http://asterisk-java.org/.

Referencia

Asterisk-Java es usado en varios entornos comerciales y por los siguientes Open Source projects:
  • Asterisk-IM: A plugin for the Jive Messenger XMPP (jabber) server. It provides integrated presence between your IM client and phone, notification of incoming calls by IM and originate calls from supported IM clients.
  • Asterisk Desktop Manager (ADM): A desktop application that will allow for automatic on-call volume reduction, one click dial from clipboard, integrated phonebook and more.

Asterisk manager API

The Asterisk Manager API


The Asterisk Manager allows a client program to connect to an Asterisk instance and issue commands or read PBX events over a TCP/IP stream. Integrators will find this particularly useful when trying to track the state of a telephony client inside Asterisk, and directing that client based on custom (and possibly dynamic) rules.

A simple "key: value" line-based protocol is utilized for communication between the connecting client and the Asterisk PBX. Lines are terminated using CRLF. For the sake of discussion below, we will use the term "packet" to describe a set of "key: value" lines that are terminated by an extra carriage return.

New in Asterisk 1.4: AJAM is a new JavaScript-based technology which allows web browsers or other HTTP enabled applications and web pages to directly access the Asterisk Manager Interface (AMI) via HTTP.


Protocol Behavior


The protocol has the following characteristics:

  • Before issuing commands to Asterisk, you must establish a manager session (see below).
  • Packets may be transmitted in either direction at any time after authentication.
  • The first line of a packet will have a key of "Action" when sent from the client, but "Event" or "Response" when sent from Asterisk to the client.
  • The order of lines within a packet is insignificant, so you may use your favorite programming language's native unordered dictionary type to efficiently store a single packet.
  • CRLF is used to delimit each line and a blank line (two CRLF in a row) indicates the end of the command which Asterisk is now expected to process.

Packet Types

The type of a packet is determined by the existence of one of the following keys:

  • Action: A packet sent by the connected client to Asterisk, requesting a particular Action be performed. There are a finite (but extendable) set of actions available to the client, determined by the modules presently loaded in the Asterisk engine. Only one action may be outstanding at a time. The Action packet contains the name of the operation to be performed as well as all required parameters.
  • Response: the response sent by Asterisk to the last action sent by the client.
  • Event: data pertaining to an event generated from within the Asterisk core or an extension module.
Generalmente el cliente envia un paquete Action al server Asterisk, quien procesa la operacion requerida y retorna el resultado (devuelve solo success o failure) en un paquete Response. Como no hay garantia del orden de respuesta el cliente usualmente incluye un parametro ActionID en cada Action packet que es enviado de vuelta por el Asterisk en el correspondiente paquete Response. De esta manera el cliente puede facilmente hacer match con la Accion y Respuesta mientras envia Actions en la tasa deseada sin tener que esperar por paquetes de respuesta de salida antes de enviar la proxima acción.
cada paquete son usados en 2 diferentes contextos: en el primero informan a clientes acerca del estado de cambios en Asterisk (Como nuevos canales que se inician creados y colgados o agentes que se loguean y desloguean) en la otra manera ellos son usados para transportar el response payload para acciones que devuelven una lista de datos. on the other hand they are used to transport the response payload for actions that return a list of data (actions que generan eventos). Cuando el cliente envia una accion generando eventos, Asterisk envia un paquete respuesta indicando sucesos y conteniendo una linea: "Response: Follows". Entonces se envia zero o mas eventos que contienen el actual payload y finalmente un evento de accion completa conteniendo el ActionID de el Action packet que disparó esto. An example of an event generating action is the Status action that triggers Status events for each active channel. When all Status events have been sent a terminating a StatusComplete event is sent.

Opening a Manager Session and Authenticating as a User


In order to access the Asterisk Manager functionality a user needs to establish a session by opening a TCP/IP connection to the listening port (usually 5038) of the Asterisk instance and logging into the manager using the 'Login' action. This requires a previously established user account on the Asterisk server. User accounts are configured in /etc/asterisk/manager.conf. A user account consists of a set of permitted IP hosts, an authentication secret (password), and a list of granted permissions.

There is a finite set of permissions, each may be granted with either "read", "write", or "read/write" granularity. If a client is granted the ability to read a given class, Asterisk will send it events of that class. If a client is granted the ability to write a given class, it may send actions of that class.

To login and authenticate to the manager, you must send a "Login" action, with your user name and secret (password) as parameters. Here is an example:

Action: login
Username: admin
Secret: god

If you do not need to subscribe to events being generated by Asterisk, you may also include the "Events: off" parameter, which will prevent event packets being sent to your connection. This is the equivalent of calling the "Events" action. Example:

Action: login
Username: admin
Secret: god
Events: off

Action Packets


When sending Asterisk an action, extra keys may be provided to further direct execution, for example, you may wish to specify a number to call, a channel to disconnect. Additionally, if your action causes Asterisk to execute an entry in the dialplan, you may wish to pass variables to the dialplan (available as of bug 1268). This is done exactly the same way you would send keys.

To send Asterisk an action, follow this simple format:

Action: <action type><CRLF>
<Key 1>: <Value 1><CRLF>
<Key 2>: <Value 2><CRLF>
...
Variable: <Variable 1>=<Value 1><CRLF>
Variable: <Variable 2>=<Value 2><CRLF>
...
<CRLF>

Manager Actions


Output from the CLI command show manager commands:
(For Asterisk 1.4 and greater, use manager show commands)




FastAGI


Implementa el Asterisk Gateway Interface (AGI) over TCP sockets. Ayuda a aliviar la carga del CPU del server Asterisk redireccionando recursos a otro server en la Red. Para indicar al server Asterisk a realizar una coneccion de red se deberá indicar el hostname or IP address of the server donde el FastAGI service is hosted and preface it with agi://:
exten => 5551212,1,AGI(agi://192.168.0.2)
Asterisk intenta conectarse al especificado server sobre el port 4573. El port tambien puede ser especificado si se escoge el servicio AGI en otro port :

exten => 5551212,1,AGI(agi://192.168.0.2:8675)

Un request puede tambien ser especificado en la llamada FastAGI , tal que podemos tener multiples AGIs en una unica locacion de red.
This request allows the FastAGI service to differentiate between different locations in the dialplan. For example:

exten => 5551212,1,AGI(agi://192.168.0.2/GetCallerRecord)

and:

exten => 5551212,1,AGI(agi://192.168.0.2/CallerWantsCustomerService)
The request portion of these calls will be received by the FastAGI service as the agi_network_script AGI variable. Asterisk will also include the agi_network AGI variable. For example, the FastAGI in the previous example would receive something like this when called by Asterisk:

agi_network: yes
agi_network_script: /CallerWantsCustomerService

Passing Arguments to FastAGI


Asterisk 1.2 & 1.4

With Asterisk 1.2 through 1.4, when using standard AGI, you can pass variables on the command line to your local scripts. This is not possible with FastAGI, however, but can be simulated using agi_network_script and a query syntax similar to that used by HTTP. For example:

exten => 5551212,1,AGI(agi://192.168.0.2/GetCallerRecord?extension=${EXTEN})

It is the responsibility of your FastAGI framework to parse this information out of the agi_network_script variable. Some FastAGI implementations already do this for you, so be sure to check the documentation for your particular framework.

Error Handling

Asterisk 1.4 & 1.6.x

As of Asterisk 1.4 a new channel variable, AGISTATUS, is set to SUCCESS upon successful execution of an AGI. If there was a problem connecting to the FastAGI service, the channel variable is set to FAILURE, allowing the dialplan to perform alternate steps as not to interrupt the call flow. If the calling channel hangs up during execution of the AGI, AGISTATUS is set to HANGUP.

FastAGI Servers


Java


AGI enhancements

asterisk-agi-audiotx

This is an extension module for the Asterisk Gateway Interface (AGI) that adds commands to allow the transfer of audio files to and from Asterisk via the AGI session. This is useful when using FastAGI from a remote host; sounds recorded by Asterisk may be retrieved by remote FastAGI-providing service, for example, or sound files required by the remote service may be dynamically added to the Asterisk server.
This module adds the following AGI commands:
  • PUT SOUNDFILE
  • GET SOUNDFILE
  • ISEXISTING SOUNDFILE

jueves, 25 de diciembre de 2008

Lanzar llamadas en forma automatica

[1] http://www.voip-info.org/wiki/view/Asterisk+cli+originate
[2] http://www.voip-info.org/wiki/view/Asterisk+manager+API
[3] http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out

En mi caso funcionò :
originate SIP/Sitatel/13582352 extension 1001
se realizò la llamada a mi rpm y luego lo conectò a la extension 1001 (primero timbrò el celular y luego el anexo).
desde linux :
FaJoa:~# asterisk -rx "originate SIP/Sitatel/13582352 extension 1001"

originate SIP/Sitatel/13582352 application Festival " el circuito 22352 esta caido, el circuito 22352 esta caido"
llama al celu y lee los mensajes, pero con un tono robotizado, falta afinar ese tema.

para instalar festival:
http://phylevn.mexrom.net/index.php/Blog/CommentsRSS/id/index.php/blog/show/67.html

http://www.voztovoice.org/?q=node/97

Festival con voces en español:
Las voces las podeis descargar desde aquí:
http://forja.guadalinex.org/repositorio/frs/?group_id=21&release_id=110

jueves, 18 de diciembre de 2008

Troubleshooting SIP Trunks with Cisco CallManager 5.x

El rfc 2833 (DTMF) Media Termination Point (MTP) pasa a travéz caracteristicas de transparente DTMF tonos entre SIP endpoint que requieran o transcoding o el uso de RSVP (Resource Reservation Protocol )

SIP with CallManager 5.x
Introduce mejoras a SIP Trunks y sobrelleva las limitantes de release anteriores como un simple codec soportado, carecer de soporte de video y el obligado soporte MTP Media terminal point para RFC2833 DTMF.
The other enhancements to SIP trunks in Cisco Unified CallManager 5.0 are the support for REFER, header replacement, Subscribe/Notify, message waiting indication (MWI), MTP removal, video support, multiple SIP trunks per inbound port number, SIP Redirection 3XX, transport layer security (TLS), digest authentication, call preservation, and T.38 fax relay.

Media Termination Point for SIP Trunks
Se puede configurar dispositivos SIP en el CallManager (lineas y trunks) a siempre usar MTP, si los parametros seteados no son usar MTP (por default), cisco localiza dinamicamente un MTP si el metodo DTMF para llamadas no son compatibles.
Por ejemplo SCCP phones soportan sólamente out-of-band DTMF.
Telefonos SIP (model 7905, 7912, 7940, 7960) soportan RFC 2833.
Como los metodos DTMF no son los mismos, cisco localiza un MTP.
Si un SCCP phone soporta tanto RFC2833 y out-of-band como es el caso del 7971, cisco no localiza un MTP por que ambos phones soportan RFC2833.
con el mismo metodo de DTMF soportado en ambos telefonos, no es necesario un MTP.