Table of Contents

Instalar Asterisk

Descargar ASTERISK

Una vez que se completa la descarga, extraemos el contenido del paquete descargado

sudo tar zxf asterisk-XXX-current.tar.gz
cd asterisk-XXX

Usaremos el script install_prereq para resolver todas las dependencias en nuestro sistema

sudo contrib/scripts/install_prereq install

El anterior comando instalará todos los paquetes necesarios. Al finalizar con éxito, imprimirá el siguiente mensaje

#############################################
## install completed successfully
#############################################

Instalación del servicio de Asterisk

sudo ./configure
sudo make menuselect

Para colocar el idioma a español se debe seleccionar los siguientes módulos

Core Sound Packages
	[*] CORE-SOUNDS-ES-ULAW
	[*] CORE-SOUNDS-ES-ALAW
	[*] CORE-SOUNDS-ES-GSM

Nota también seleccionar CORE-SOUNDS-EN-XXX ulaw, alaw, gsm

continuar con las instalación

sudo make
sudo make install
sudo make samples
sudo make config
export default {
  data() {
    return {
      msg: 'Highlighted!',
    };
  },
};

Crear certificado SSL

Para el funcionamiento del WebRTC se debe crear los certificados auto firmados

sudo mkdir /etc/asterisk/keys
sudo contrib/scripts/ast_tls_cert -C monitoreafacil.com -O "My Organization" -d /etc/asterisk/keys

Se debe colocar un contraseña este proceso se repetirá varias veces

Nota para que el navegador reconozca el certificado se debe colocar la siguiente

URL: https://ip_server:8089/ws

Instalar Postgresql

Instalar dependencias de Postgresql

sudo apt-get install unixodbc unixodbc-dev odbc-postgresql
sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev

Copiar los archivos del repositorio de Git mod-db/etc y mod-db/etc-asterisk

sudo cp odbcinst.ini /etc/
sudo cp odbc.ini /etc/
cd ..
cd etc-asterisk && cp * /etc/asterisk -rf

Crear DB para Asterisk y configurar un usuario con password

sudo su postgres
psql
CREATE ROLE asterisk WITH LOGIN PASSWORD 'asterisk';
CREATE DATABASE asterisk;
GRANT ALL PRIVILEGES ON DATABASE asterisk TO asterisk;
\quit

Ingresar a la consola de Posgresql

sudo -u postgres psql -U postgres asterisk
asterisk-# \dt #data table

Verificar conexión de la DB en Asterisk

*CLI> odbc show

ODBC DSN Settings
-----------------
  Name:   asterisk
  DSN:    asterisk
    Last connection attempt: 1969-12-31 20:00:00
    Number of active connections: 1 (out of 100)
    Logging: Enabled
    Number of prepares executed: 13
    Number of queries executed: 12
    ...

Verificar conexión con Postgresql

$ echo "select 1" | isql -v asterisk asterisk asterisk cdr show pgsql status

Iniciar la base de datos con Node.js

En la carpeta mod-db/ ejecutar

npm install
npm run setup
sudo echo "alias db='cd <ruta_git>/Sistema-Integrador-de-Llamadas-VoIP/mod-db/;npm run setup'" >> ~/.zshrc # opcional ~/.bash_aliases

Crear alias para el Backend

Crear alias para copiar los archivos a la carpeta de Git desde /etc/asterisk/*

sudo echo "alias cpA='pushd <ruta_git>/Sistema-Integrador-de-Llamadas-VoIP/mod-db/etc/;sudo cp * /etc/ -rf;cd ..;cd etc-asterisk/;sudo cp * /etc/asterisk/ -rf;popd'" >> ~/.zshrc

Alias para copiar las configuraciones de la DB ubicada en /etc/ a la carpeta de Git

sudo echo "alias cpL='pushd /etc/;sudo cp odbcinst.ini <ruta_git>/Sistema-Integrador-de-Llamadas-VoIP/mod-db/etc/ -rf;sudo cp odbc.ini <ruta_git>/Sistema-Integrador-de-Llamadas-VoIP/mod-db/etc/ -rf;cd asterisk/;sudo cp * <ruta_git>/Sistema-Integrador-de-Llamadas-VoIP/mod-db/etc-asterisk/ -rf;popd'" >> ~/.zshrc

NOTA

Para crear los alias pueden usar >> ~/.bash_aliases si usan la terminal por defecto del sistema en caso que usen Oh My ZSH deben usar >> ~/.zshrc

Docs


Advertisement 😃

  • pica - high quality and fast image resize in browser.
  • babelfish - developer friendly i18n with plurals support and easy syntax.

You will like those projects!


h1 Heading 😎

h2 Heading

h3 Heading

h4 Heading

h5 Heading
h6 Heading

Horizontal Rules




Typographic replacements

Enable typographer option to see result.

© © ® ® ™ ™ § § ±

test… test… test… test?.. test!..

!!! ??? , – —

“Smartypants, double quotes” and ‘single quotes’

Emphasis

This is bold text

This is bold text

This is italic text

This is italic text

Strikethrough

Blockquotes

Blockquotes can also be nested…

…by using additional greater-than signs right next to each other…

…or with spaces between arrows.

Lists

Unordered

  • Create a list by starting a line with +, -, or *
  • Sub-lists are made by indenting 2 spaces:
    • Marker character change forces new list start:
      • Ac tristique libero volutpat at
      • Facilisis in pretium nisl aliquet
      • Nulla volutpat aliquam velit
  • Very easy!

Ordered

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  1. You can use sequential numbers…
  2. …or keep all the numbers as 1.

Start numbering with offset:

  1. foo
  2. bar

Code

Inline code

Indented code

// Some comments
line 1 of code
line 2 of code
line 3 of code

Block code “fences”

Sample text here...

Syntax highlighting

var foo = function (bar) {
  return bar++;
};

console.log(foo(5));

Tables

Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
ext extension to be used for dest files.

Right aligned columns

Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
ext extension to be used for dest files.

link text

link with title

Autoconverted link https://github.com/nodeca/pica (enable linkify to see)

Images

Minion Stormtroopocat

Like links, Images also have a footnote style syntax

Alt text

With a reference later in the document defining the URL location:

Plugins

The killer feature of markdown-it is very effective support of syntax plugins.

Emojies

Classic markup: 😉 :crush: 😢 :tear: 😆 😋

Shortcuts (emoticons): 😃 😦 😎 😉

see how to change output with twemoji.

Subscript / Superscript

  • 19th
  • H2O

<ins>

Inserted text

<mark>

Marked text

Footnotes

Footnote 1 link[1].

Footnote 2 link[2].

Inline footnote[3] definition.

Duplicated footnote reference[2:1].

and multiple paragraphs.

Definition lists

Term 1

Definition 1 with lazy continuation.

Term 2 with inline markup

Definition 2

  { some code, part of Definition 2 }

Third paragraph of definition 2.

Compact style:

Term 1
Definition 1
Term 2
Definition 2a
Definition 2b

Abbreviations

This is HTML abbreviation example.

It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.

*[HTML]: Hyper Text Markup Language

Custom containers


  1. Footnote can have markup ↩︎

  2. Footnote text. ↩︎ ↩︎

  3. Text of inline footnote ↩︎