I.
CONFIGURAR CHAN_SIP: En el caso de que todavía utilice el controlador
de canal SIP anterior de Asterisk, chan_sip, en lugar del controlador de canal
PJSIP moderno, puede usar lo siguiente como una guía para configurar
sip.conf
El soporte para RTCP-MUX opcional se está deshabilitando en navegadores
posteriores. Por tanto en versiones de asterisk superiores a 14 se debe de
establecer la opción “rtcp_mux=yes” en la entrada del punto final en sip.conf
o pjsip.conf
Configure #sudo nano /etc/asterisk/sip.conf de la siguiente manera:
pi@raspberrypi:/etc/asterisk $ sudo nano sip.conf
También se puede ingresar con el siguiente comando desde el cd
pi@raspberrypi:~ $sudo nano /etc/asterisk/sip.conf
En el archivo que se abre escribimos los usuarios y sus respecivas caracterisiticas
language = es
[general]
udpbindaddr=0.0.0.0:5060
realm=192.168.0.16
address or host
transport=udp,ws,wss ;tls
; localnet=0.0.0.0/255.255.255.0
[199]
host=dynamic
secret=199
context=default
type=friend
encryption=yes
avpf=yes
force_avp=yes
icesupport=yes
directmedia=no
disallow=all
allow=opus
allow=ulaw
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
rtcp_mux=yes
;;; OPCIONAL
dial=SIP/199
allow=vp8
nat=yes,force_rport
keepalive=60
generaterpid=no
trustrpid=no
sendrpid=no
qualify=no
qualifyfreq=600
videosupport=no
callcounter=yes
[general]
language = es
;context=unauthenticated ; contexto predeterminado para las
llamadas entrantes
;context=LocalSets ; aquí es donde las llamadas desde el dispositivo
ingresarán en el plan de marcado
allowguest=no ; deshabilitar llamadas no autenticadas
srvlookup=no ; deshabilitar la búsqueda de registros DNS SRV en
llamadas salientes
tcpenable=no ; deshabilitar el soporte TCP
videosupport=yes ; a menos que tenga una conexión DNS confiable,
en cuyo caso sí
udpbindaddr=0.0.0.0 ; escuchar solicitudes UDP en todas las
interfaces
; EXTENSION COMUN SIP (COMPUTADOR)
[1000]
username=1000
type=friend
secret=123
callerid="PC Sebastian Olaya" <1000>
host=dynamic
nat=no
context=internal
mailbox=1000@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1000
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
[1001]
username=1001
type=friend
secret=123
callerid="PC Mauricio Perdomo" <1001>
host=dynamic
dtmfmode=rfc2833
nat=no
context=internal
mailbox=1001@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1001
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
[1002]
username=1002
type=friend
secret=123
callerid="PC Miguel Perez" <1002>
host=dynamic
nat=no
context=internal
mailbox=1002@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1002
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
;EXTENSION COMUN SIP (CELULAR)
[1003]
username=1003
type=friend
secret=123
callerid="CEL Sebastian Olaya" <1003>
host=dynamic
dtmfmode=rfc2833
nat=yes,force_rport,comedia
context=internal
mailbox=1003@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1003
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
[1004]
username=1004
type=friend
secret=123
callerid="CEL Mauricio Perdomo" <1004>
host=dynamic
dtmfmode=rfc2833
nat=yes,force_rport,comedia
context=internal
mailbox=1004@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1004
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
[1005]
username=1005
type=friend
secret=123
callerid="CEL Miguel Perez" <1005>
host=dynamic
dtmfmode=rfc2833
nat=yes,force_rport,comedia
context=internal
mailbox=1005@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1005
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
[1006]
username=1006
type=friend
secret=123
callerid="TelephoneIP" <1006>
host=dynamic
dtmfmode=rfc2833
nat=no
context=internal
mailbox=206@voicemail
callgroup=1
pickupgroup=1
videosupport = yes
maxcallbitrate=384
dial=SIP/1006
disallow=all
allow=alaw
allow=opus,ulaw
allow=gsm
allow=speex
allow=speex32
allow=g722
allow=h261
allow=h263
allow=h263p
allow=h264
allow=g729
allow=h264
allow=h263
allow=h263p
allow=vp8
;directmedia=no
;icesupport=yes
;(MENSAJE DE TEXTO)
accept_outofcall_message = yes
outofcall_message_context = messages
auth_message_requests = yes
subscribecontext = subscribe
Guardamos las modificaciones del archivo y lo cierro
II. Configure #sudo nano /etc/asterisk/extensions.conf de la siguiente
manera:
pi@raspberrypi:/etc/asterisk $ sudo nano extensions.conf
También se puede ingresar con el siguiente comando desde el cd
pi@raspberrypi:~ $sudo nano /etc/asterisk/extensions.conf
En el archivo que se abre escribimos las siguientes características
[internal]
language = es
videosupport=yes
;(PLAN DE MARCACION)
exten=>1000,1,Dial(SIP/1000,15,tT)
exten=>1000,2,Voicemail(1000@voicemail)
exten=>1000,3,Playback(vm_goodbye)
exten=>1000,4,Hangup
exten=>1001,1,Dial(SIP/1001,15,tT)
exten=>1001,2,Voicemail(1001@voicemail)
exten=>1001,3,Playback(vm_goodbye)
exten=>1001,4,Hangup
exten=>1002,1,Dial(SIP/1002,15,tT)
exten=>1002,2,Voicemail(1002@voicemail)
exten=>1002,3,Playback(vm_goodbye)
exten=>1002,4,Hangup
exten=>1003,1,Dial(SIP/1003,15,tT)
exten=>1003,2,Voicemail(1003@voicemail)
exten=>1003,3,Playback(vm_goodbye)
exten=>1003,4,Hangup
exten=>1004,1,Dial(SIP/1004,15,tT)
exten=>1004,2,Voicemail(1004@voicemail)
exten=>1004,3,Playback(vm_goodbye)
exten=>1004,4,Hangup
exten=>1005,1,Dial(SIP/1005,15,tT)
exten=>1005,2,Voicemail(1005@voicemail)
exten=>1005,3,Playback(vm_goodbye)
exten=>1005,4,Hangup
exten=>1006,1,Dial(SIP/1006,15,tT)
exten=>1006,2,Voicemail(1006@voicemail)
exten=>1006,3,Playback(vm_goodbye)
exten=>1006,4,Hangup
;(ESCUCHAR BUZON DE VOZ)
exten=>*98,1,Answer
exten=>*98,2,Wait(1)
exten=>*98,3,VoiceMailMain($(CALLERID)@voicemail)
exten=>*98,4,Hangup
;(CONFERENCIA)
;INVITADO
exten => 222,1,progress()
exten => 222,2,wait(1)
exten => 222,3,ConfBridge(1,default_bridge,default_user)
;ADMINISTRADOR
exten => 111,1,progress()
exten => 111,2,wait(1)
exten => 111,3,ConfBridge(1,default_bridge,admin_user)
;(MENSAJES INSTANTANEOS)
[subscribe]
exten => 1000,hint,SIP/1000
exten => 1001,hint,SIP/1001
exten => 1002,hint,SIP/1002
exten => 1003;hint,SIP/1003
exten => 1004,hint,SIP/1004
exten => 1005,hint,SIP/1005
exten => 1006,hint,SIP/1006
[messages]
exten => 1000.,1,Noop(Mensaje de ${MESSAGE(1001)})
same => n,Noop(Mensaje para ${MESSAGE(1000)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1000})
same => n,Messagesend(sip:${1000},${MESSAGE(1001)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1001.,1,Noop(Mensaje de ${MESSAGE(1002)})
same => n,Noop(Mensaje para ${MESSAGE(1001)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1001})
same => n,Messagesend(sip:${1001},${MESSAGE(1002)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1002.,1,Noop(Mensaje de ${MESSAGE(1003)})
same => n,Noop(Mensaje para ${MESSAGE(1002)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1002})
same => n,Messagesend(sip:${1002},${MESSAGE(1003)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1003.,1,Noop(Mensaje de ${MESSAGE(1004)})
same => n,Noop(Mensaje para ${MESSAGE(1003)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1003})
same => n,Messagesend(sip:${1003},${MESSAGE(1004)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1004.,1,Noop(Mensaje de ${MESSAGE(1005)})
same => n,Noop(Mensaje para ${MESSAGE(1004)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1004})
same => n,Messagesend(sip:${1004},${MESSAGE(1005)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1005.,1,Noop(Mensaje de ${MESSAGE(1006)})
same => n,Noop(Mensaje para ${MESSAGE(1005)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1005})
same => n,Messagesend(sip:${1005},${MESSAGE(1006)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
exten => 1006.,1,Noop(Mensaje de ${MESSAGE(1005)})
same => n,Noop(Mensaje para ${MESSAGE(1006)})
same => n,Noop(Texto = ${MESSAGE(body)})
same => n,Set(dest=${1006})
same => n,Messagesend(sip:${1006},${MESSAGE(1005)})
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?failed,s,1)
same => n,Hangup
[failed]
;saber si el mensaje fue recibido
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1001} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1001),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1002} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1002),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1003} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1003),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1004} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1004),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1005} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1005),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
exten => s,1,Set(texto=${MESSAGE(body)})
same => n,Set(MESSAGE(body)="El Mensaje - ${texto} - para ${1006} no ha sido en$
same => n,Set(remit=${CUT(MESSAGE(1006),<,2)})
same => n,Set(remit=${CUT(remit,@,1)})
same => n,MessageSend(${remit},CentroMensajes)
same => n,Noop(Estado del mensaje ${MESSAGE_SEND_STATUS})
same => n,Hangup
Guardamos las modificaciones del archivo y lo cierro
III. Configure #sudo nano /etc/asterisk/voicemail.conf de la siguiente manera:
(MENSAJES DE VOS)
pi@raspberrypi:/etc/asterisk $ sudo nano voicemail.conf
También se puede ingresar con el siguiente comando desde el cd
pi@raspberrypi:~ $sudo nano /etc/asterisk/voicemail.conf
En el archivo que se abre escribimos las siguientes caracterisiticas
[voicemail]
language = es
1000=>1000,PC Sebastian Olaya,PCsebastian@localhost
1001=>1001,PC Mauricio Perdomo,PCmauricio@localhost
1002=>1002,PC Miguel Perez,PCmiguel@localhost
1003=>1003,CEL Sebastian Olaya,CELsebastian@localhost
1004=>1004,CEL Mauricio Perdomo,CElmauricio@localhost
1005=>1005,CEL Miguel Perez,CELmiguel@localhost
1006=>1006,TelephoneIP,TelephoneIP@localhost
Guardamos las modificaciones del archivo y lo cierro
IV. Configure #sudo nano /etc/asterisk/voicemail.conf de la siguiente manera:
(CONFERENCIAS)
pi@raspberrypi:/etc/asterisk $ sudo nano confbridge.conf
También se puede ingresar con el siguiente comando desde el cd
pi@raspberrypi:~ $sudo nano /etc/asterisk/confbridge.conf
En el archivo que se abre escribimos las siguientes caracterisiticas
[general]
language = es
;Administrador
[1000]
type = user
pin = 111 ;clave administrador
marked = yes
admin = yes
;Usuarios
[1001]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[1002]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[1003]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[1004]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[1005]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[1006]
type = user
pin = 222 ;clave usuario
wait_marked = yes
end_marked = yes
[default_bridge]
type = bridge
max_members = 12
Guardamos las modificaciones del archivo y lo cierro
Después de ajustar los softphone, intentará llamar a las extensiones 111 y 222.
10-Guardamos y cargamos las configuraciones o modificaciones de los archivos
root@mao-Inspiron-N5110:/etc/asterisk# asterisk -r
Asterisk 13.18.2, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 13.18.2 currently running on mao-Inspiron-N5110 (pid = 1670)
mao-Inspiron-N5110*CLI> reload
11-reload (en asterisk o rasterisl)
12-Mirar IP del asterisk
/home/mao# cd /etc/asterisk/
/etc/asterisk# ifconfig
Direc. inet:192.168.0.14
13-se configurarn los dispositivos
A-Configuramos el telefono ip siguiendo las intrucciones dadas
;menu, estado, ok = 192.168.1.2 (ip del telefono) buscar e internet usuario y clave =
admin
;registro, usuario y contraseña = 204
;servidor sip = ip de la red cableada (192.168.1.11)
Guardamos las modificaciones del archivo y lo cierro
B-Configuramos los telefonos moviles descargando la aplicacion PortGo con las siguientes
instruccciones
;usuario=200
;contraseña=123
;ip(generada por asterisk)=198.168.0.14
C-Configuramos los portatiles descargando la aplicacion linphone con las siguientes
instruccciones
;usuario=200
;contraseña=123
;ip(generada por asterisk)=198.168.0.14
14-Comprobamos dispositivos conectados
/home/mao# asterisk -r
*CLI> sip show peers
15-BIBLIOGRAFIA
cambiar el lenguaje a español (es)
http://todoasterisk.blogspot.com.co/2009/05/poner-el-idioma-de-asterisk-en-espanol.html
buzon de voz
http://hotfixed.net/curso-asterisk-1-8-capitulo-08-configurando-buzones-de-voz/
conferencias
http://www.fucking-it.com/es/documentacion/asterisk/25-asterisk-conferencia-de-voz
mensajes
https://voztovoice.org/?q=node/549