primero lo primero
hola gente!!!!
antes de configurar correo de voz y esas yerbas es necesario armar un plano de discado atractivo de manera que marquemos el numero de nuestra empresa nos reciba una voz agradable diciendo el nombre de nuestra empresa, que nos numere las opciones a discar y a que areas nos deribara y asi sucesivamente hasta llegar por ejemplo al telefono del juan (el chico de aguante tecnico)
Si leyeron el tema anterior a este que escribi van a poder comparar el archivo extensions.conf con el que les voy a volcar aqui, no hay muchas digerencias sustanciales, pero si son minuciosos en la observacion y van siguiendo el codigo de este archivo y como es que en la consola del asterisk se va ejecutando veran que descomente alguna partecita aqui otra alla y cambie unas lineas para que en vez que lo que primero se ejecute sea la "demo" el curso siga para
aca va el extensions.conf
;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
;
; This configuration file is reloaded
; - With the "extensions reload" command in the CLI
; - With the "reload" command (that reloads everything) in the CLI
;
; The "General" category is for certain variables.
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified. Remember that all comments
; made in the file will be lost when that happens.
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no
;
; If autofallthrough is set, then if an extension runs out of
; things to do, it will terminate the call with BUSY, CONGESTION
; or HANGUP depending on Asterisk's best guess (strongly recommended).
;
; If autofallthrough is not set, then if an extension runs out of
; things to do, asterisk will wait for a new extension to be dialed
; (this is the original behavior of Asterisk 1.0 and earlier).
;
autofallthrough=yes
;
; If clearglobalvars is set, global variables will be cleared
; and reparsed on an extensions reload, or Asterisk reload.
;
; If clearglobalvars is not set, then global variables will persist
; through reloads, and even if deleted from the extensions.conf or
; one if its included files, will remain set to the previous value.
;
clearglobalvars=no
;
; You can include other config files, use the #include command (without the ';')
; Note that this is different from the "include" command that includes contexts within
; other contexts. The #include command works in all asterisk configuration files.
;#include "filename.conf"
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=Zap/g2 ; Trunk interface
;
; Note the 'g2' in the TRUNK variable above. It specifies which group (defined
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
; the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy Zap channel (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy Zap channel (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last time (aka. descending rotary hunt group).
;
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider
;
; Any category other than "General" and "Globals" represent
; extension contexts, which are collections of extensions.
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal. In patterns, some characters have special meanings:
;
; X - any digit from 0-9
; Z - any digit from 1-9
; N - any digit from 2-9
; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
; . - wildcard, matches anything remaining (e.g. _9011. matches
; anything starting with 9011 excluding 9011 itself)
; ! - wildcard, causes the matching process to complete as soon as
; it can unambiguously determine that no other matches are possible
;
; For example the extension _NXXXXXX would match normal 7 digit dialings,
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension. The priority
; "next" or "n" means the previous priority plus one, regardless of whether
; the previous priority was associated with the current extension or not.
; The priority "same" or "s" means the same as the previously specified
; priority, again regardless of whether the previous entry was for the
; same extension. Priorities may be immediately followed by a plus sign
; and another integer to add that amount (most useful with 's' or 'n').
; Priorities may then also have an alias, or label, in
; parenthesis after their name which can be used in goto situations
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred. One may include another
; context in the current one as well, optionally with a
; date and time. Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority[+offset][(alias)],application(arg1,arg2,...)
;exten => someexten,priority[+offset][(alias)],application,arg1|arg2...
;
; Timing list for includes is
;
; <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern. The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;
;
; Sample entries for extensions.conf
;
;
[dundi-e164-canonical]
;
; List canonical entries here
;
;exten => 12564286000,1,Macro(std-exten,6000,IAX2/foo)
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
[dundi-e164-customers]
;
; If you are an ITSP or Reseller, list your customers here.
;
;exten => _12564286000,1,Dial(SIP/customer1)
;exten => _12564286001,1,Dial(IAX2/customer2)
[dundi-e164-via-pstn]
;
; If you are freely delivering calls to the PSTN, list them here
;
;exten => _1256428XXXX,1,Dial(Zap/g2/${EXTEN:7}) ; Expose all of 256-428
;exten => _1256325XXXX,1,Dial(Zap/g2/${EXTEN:7}) ; Ditto for 256-325
[dundi-e164-local]
;
; Context to put your dundi IAX2 or SIP user in for
; full access
;
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn
[dundi-e164-switch]
;
; Just a wrapper for the switch
;
switch => DUNDi/e164
[dundi-e164-lookup]
;
; Locally to lookup, try looking for a local E.164 solution
; then try DUNDi if we don't have one.
;
include => dundi-e164-local
include => dundi-e164-switch
;
; DUNDi can also be implemented as a Macro instead of using
; the Local channel driver.
;
[macro-dundi-e164]
;
; ARG1 is the extension to Dial
;
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
;
; Here are the entries you need to participate in the IAXTEL
; call routing system. Most IAXTEL numbers begin with 1-700, but
; there are exceptions. For more information, and to sign
; up, please go to [url]www.gnophone.com[/url] or [url]www.iaxtel.com[/url]
;
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)
;
; The SWITCH statement permits a server to share the dialplain with
; another server. Use with care: Reciprocal switch statements are not
; allowed (e.g. both A -> B and B -> A), and the switched server needs
; to be on-line or else dialing can be severly delayed.
;
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext
[trunkint]
;
; International long distance through trunk
;
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunkld]
;
; Long distance context accessed through trunk
;
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunklocal]
;
; Local seven-digit dialing accessed through trunk interface
;
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunktollfree]
;
; Long distance context accessed through trunk interface
;
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[international]
;
; Master context for international long distance
;
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
;
; Master context for long distance
;
ignorepat => 9
include => local
include => trunkld
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
;
; You can use an alternative switch type as well, to resolve
; extensions that are not known here, for example with remote
; IAX switching you transparently get access to the remote
; Asterisk PBX
;
; switch => IAX2/user:password@bigserver/local
;
; An "lswitch" is like a switch but is literal, in that
; variable substitution is not performed at load time
; but is passed to the switch directly (presumably to
; be substituted in the switch routine itself)
;
; lswitch => Loopback/12${EXTEN}@othercontext
;
; An "eswitch" is like a switch but the evaluation of
; variable substitution is performed at runtime before
; being passed to the switch routine.
;
; eswitch => IAX2/context@${CURSERVER}
[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
[demo]
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
....
....
....
.....
......bla bla bla bla.....miren el archivo anterior en sp5004 y *) en el doc ant
exten => 1000,1,Goto(default,s,1)
;
; We also create an example user, 1234, who is on the console and has
; voicemail, etc.
;
exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
; (but skip if channel is not up)
exten => 1234,n,Macro(stdexten,1234,${CONSOLE})
exten => 1235,1,Voicemail(u1234) ; Right to voicemail
exten => 1236,1,Dial(Console/dsp) ; Ring forever
exten => 1236,n,Voicemail(u1234) ; Unless busy
;
; Give voicemail at extension 8500
;
exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)
[mainmenu]
;
; Examplo de contexto "mainmenu" con submenus
;
exten => s,1,Wait,1
exten => s,1,Answer
exten => s,n,Playback(bienvenida) ; Bienvenido a la red Aquaphone
exten => s,n,Wait,1
exten => s,n,playback(op-menu-pri) ; presione 1 para ventas, 2 para ... sop
exten => s,n,WaitExten
exten => 1,1,Goto(ventas,s,1)
exten => 2,1,Goto(soporte,s,1)
exten => 2,n,Wait(2)
exten => 3,1;Hangup
[ventas]
exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
exten => s,n,Wait,2
exten => s,n,Playback(ventas) ; "Ud. se comunico con el departamento de Ventas. Si sabe el nro de interno marquelo sino aguarde y sera atendido."
exten => s,n,WaitExten
exten => 1,1,Goto(default,8006,1)
exten => 2,1,Goto(default,8005,2)
exten => 2,n,Wait(2)
exten => 3,1;Hangup
[soporte]
exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
exten => s,n,Wait,2
exten => s,n,Playback(soporte) ; "Ud. se comunico con el departamento de Soporte. Si sabe el nro de interno marquelo sino aguarde y sera atendido."
exten => s,n,WaitExten
exten => 1,1,Goto(default,8003,1) ;;;;;es te es el te le fo no de qui que !!!!!!!!!
exten => 2,1,Goto(default,8002,2)
exten => 2,n,Wait(2)
exten => 3,1,Hangup
[default]
;
; By default we include the demo. In a production system, you
; probably don't want to have the demo there.
;
exten => _80XX,1,Dial(SIP/${EXTEN},10,t)
include => demo
include => mainmenu
exten => s,1,Wait,1
exten => s,n,Goto(mainmenu,s,1)
;
; Grabacion del menu de presentacion
; de los submenus y mensajes indicadores
;marque 2020 para grabar la indicacion de que despues de la señal grabe su menu
exten => 2020,1,Wait(2)
exten => 2020,2,Record(comiensa-grabacion-diga_su_mensage.gsm)
exten => 2020,3,Wait(2)
exten => 2020,4,Playback(comi-gra-indic)
exten => 2020,5,Wait(2)
exten => 2020,6,Handup
;marque 2000 para grabar el mensaje de Bienvenida
exten => 2000,1,Wait(2)
exten => 2000,2,Playback(comi-gra-indic)
exten => 2000,3,Wait(2)
exten => 2000,4,Record(bienvenida.gsm)
exten => 2000,5,WAIT(2)
exten => 2000,6,Playback(bienvenida)
exten => 2000,7,Hangup
;marque 2001 para grabar el mensaje de opciones de mainmenu
exten => 2001,1,Wait(2)
exten => 2001,2,Playback(comi-gra-indic)
exten => 2001,3,Wait(2)
exten => 2001,4,Record(op-menu-pri.gsm)
exten => 2001,5,WAIT(2)
exten => 2001,6,Playback(op-menu-pri)
exten => 2001,7,Hangup
;marque 2002 para grabar el mensaje de ventas
exten => 2002,1,Wait(2)
exten => 2002,2,Playback(comi-gra-indic)
exten => 2002,3,Wait(2)
exten => 2002,4,Record(ventas.gsm)
exten => 2002,5,Wait(2)
exten => 2002,6,Playback(ventas)
exten => 2002,7,Wait(2)
exten => 2002,8,Hangup
;marque 2003 para grabar el mensaje de soporte
exten => 2003,1,Wait(2)
exten => 2003,2,Playback(comi-gra-indic)
exten => 2003,3,Wait(2)
exten => 2003,4,Record(soporte.gsm)
exten => 2003,5,Wait(2)
exten => 2003,6,Playback(soporte)
exten => 2003,7,Wait(2)
exten => 2003,8,Hangup
Solo concentremonos en las lineas que modifique en :
include => mainmenu : que incluye el contexto mainmenu en el default
exten => s,1,Wait,1 : comiensa el asterisk leyendo de aqui
exten => s,n,Goto(mainmenu,s,1) : nos vamos al main menu!!!
Por otro lado cree unas herramientillas para facilitarnos parte del trabajo de grabacion de los mensajes de anuncio ya sea cualquiera que se nos ocurran
.Por ej :
La extension 2020 grabare un mensaje que diga "comensara la grabacion ,por favor diga el mensaje que quiera grabar" ,,(no es necesario esto solo es un chiche, nada mas) 🙂
La extension 2000 graba el mensaje de bienvenida y me lo reproduce para que vea si lo que grabe me gusto,,,,,, ya grabe este como 20 veces y ninguno me gusto....una voz femenina quedaria mejor,jejej
La extension 2001 graba las opciones a discar por ej "marque 1 para ventas , 2 para soporte, etc
La extension 2002graba la bienvenida a la parte de ventas y sus opsiones
y la 2003 lo mismo pero pra soporte
...bueno cuando la intruccion goto del contexto default nos lleva a
aca esta lo interesante!!!
primero espera, luego contesta,luego toca el mensaje de bienvenida,..espera...toca el mensaje de opciones de discado....espera que marques y nos deriva a los context o segun se digite uno o dos.
explico solo la de la otra se comporta igual:
hacemos dos llamados TUUUUU TUUUUUU
esperamos un cachito de tiempo y nos recibe el mensaje de bienvenida a ventas nos invita a discar el numero de interno si lo conocemos o que esperemos y seremos atendidos por un operado!!!!
si marcamos uno sonara el sip 8006 y si marcamos 2 sonara el sip 8005
les cuento que yo en la cumputadora que tengo estalado asterisk tengo un softphone con el numero 8006 simulando la extension 1 de ventas y conectado en la boca 4 del micronet tengo un telefono conectado que responde al numero 8003 que vendria a ser un telefono del area de soporte
al cual accederiamos marcando la opcion 1 si quisieramos hablar por ejemplo con quique!!!!
bueno amigo espero le ayude, recuerden que no esta de lo mejorcito lo que hice pero sepan recien arranco. entre otras cosas faltaria contemplar ingreso de codigo invalido ,,,,, manejar mejor los tiempos ,,,etc
Haber si parlan los que saben!!!! corrijan los errores ,sin miedo que sera muy agradecido hasta el minusculo granito de arena que se aporte a esta charla,,
Pd: la proxima se viene la info de voicemail,,, .Para ir calentando los digitigrados disquen 8500 y afilen su ingles.... :roll:
Saludos desde Argentina
Oscar