Hub49
01/11/2016, 17h16
Bonjour à tous et toutes,
Je suis sur une distribution Mageia 5 avec un bureau KDE.
Je viens d'installer via les dépôts asterisk (11.23.1) et les softphones ekiga et jitsi. Les installations se sont bien passées je pense puisque les softphones se lancent correctement: je me vois connecté avec ma ligne sip.
Le but d'une telle installation est de me fournir un standard pour recevoir des appels, lesquels auront un pré décroché d'attente.
En console, j'ai cette info lorsque je tape asterisk -r et je reload ensuite :
localhost*CLI> reload
[Nov 1 15:08:30] WARNING[711]: cel.c:361 do_reload: Could not load cel.conf
[Nov 1 15:08:30] NOTICE[711]: app_queue.c:7953 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:164 pbx_load_module: Starting AEL load process.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:177 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:180 pbx_load_module: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:187 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:192 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:195 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
localhost*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@localhost mand]#
En console, j'ai après avoir taper "sip show users" :
localhost*CLI> sip show user
Usage: sip show user <name> [load]
Shows all details on one SIP user and the current status.
Option "load" forces lookup of peer in realtime storage.
localhost*CLI> sip show users
Username Secret Accountcode Def.Context ACL Forcerport
101 azerty local No Yes
102 azerty local No Yes
6000 1234 work No No
localhost*CLI>
Comme j'ai essentiellement bidouillé dans les fichiers extensions.conf et sip.conf, je ne comprends pas le problème évoquant le fichier extensions.ael
Je mets ici les deux fichiers :
extensions.conf (un peu long, désolé):
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=DAHDI/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
; 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)
;[context]
;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...)
; <time range>,<days of week>,<days of month>,<months>[,<timezone>]
;include => daytime,9:00-17:00,mon-fri,*,*
;include => weekend,*,sat-sun,*,*
;include => weeknights,17:02-8:58,mon-fri,*,*
;ignorepat => 9
[dundi-e164-canonical]
;exten => 12564286000,1,Gosub(6000,stdexten(IAX2/foo))
;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
[dundi-e164-customers]
;exten => _12564286000,1,Dial(SIP/customer1)
;exten => _12564286001,1,Dial(IAX2/customer2)
[dundi-e164-via-pstn]
;exten => _1256428XXXX,1,Dial(DAHDI/G2/${EXTEN:7}) ; Expose all of 256-428
;exten => _1256325XXXX,1,Dial(DAHDI/G2/${EXTEN:7}) ; Ditto for 256-325
[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn
[dundi-e164-switch]
switch => DUNDi/e164
[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch
[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext
[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})
[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
ignorepat => 9
include => local
include => trunkld
[local]
ignorepat => 9
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => parkedcalls
; switch => IAX2/user:password@bigserver/local
; lswitch => Loopback/12${EXTEN}@othercontext
; eswitch => IAX2/context@${CURSERVER}
; This is the dialing hook. use:
; include => outbound-freenum
[outbound-freenum]
exten => _X*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
[outbound-freenum2]
exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})
same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well
same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1)
; filter out bad characters per the README-SERIOUSLY.best-practices.txt document
same => n,Set(TIMEOUT(absolute)=10800)
same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freen um.org)}) ; perform our lookup with freenum.org
same => n,GotoIf($["${isnresult}" != ""]?from)
same => n,Set(DIALSTATUS=CONGESTION)
same => n,Goto(fn-CONGESTION,1)
same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})
same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial) ; check if we set the FREENUMDOMAIN global variable in [global]
same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we'll use it for our outbound dialing domain
same => n(dial),Dial(SIP/${isnresult},40)
same => n,Goto(fn-${DIALSTATUS},1)
exten => fn-BUSY,1,Busy()
exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS})
same => n,Congestion()
[macro-trunkdial]
; ${ARG1} - What to dial
exten => s,1,Dial(${ARG1})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp
[stdexten]
; ${EXTEN} - Extension
; ${ARG1} - Device(s) to ring
; ${ARG2} - Optional context in Voicemail
-------->suite du fichier extensions.conf dans le post suivant car trop long.
et sip.conf :
[general]
context=local ;Contexte par defaut
bindport=5060 ;UDP standard
bindaddr=0.0.0.0 ;bind access to all
srvlookup=yes ;activer les lookup DNS des appels
language=fr ;MSG vocaux en FR
[101] ;Login SIP
secret=azerty ;Mot de passe
callerid= »Bob_les_ponges» <101> ;Affichage lors de l appel
context=local ;appels geres dans extension local
mailbox=101@default ;compte de msg vocale cfr voicemail.conf
type=friend ;allow in et out
host=dynamic ;adresse ip du client
nat=yes ;utiliser derriere du NAT
[102]
secret=azerty
callerid= »Kiki » <102>
context=local
type=friend
host=dynamic
nat=yes
mailbox=102@default
Je suis connecté avec une Bbox. J'ai une ligne sip. Ekiga. J'utilise un casque avec micro pour les appels.
En test, si je m'appelle, ça sonne côté appelant et j'ai le fichier de pré décroché qui se lance côté réception d'appel, soit exactement l'inverse de ce que je souhaite !
Je pense que le problème n'est pas gravissisme mais vu mon niveau général.. je tourne en rond. Il y a forcément un truc que je n'ai pas indiqué...et même plusieurs.
Merci aux intervenants qui me fileront un coup de main pour comprendre le problème.
Je suis sur une distribution Mageia 5 avec un bureau KDE.
Je viens d'installer via les dépôts asterisk (11.23.1) et les softphones ekiga et jitsi. Les installations se sont bien passées je pense puisque les softphones se lancent correctement: je me vois connecté avec ma ligne sip.
Le but d'une telle installation est de me fournir un standard pour recevoir des appels, lesquels auront un pré décroché d'attente.
En console, j'ai cette info lorsque je tape asterisk -r et je reload ensuite :
localhost*CLI> reload
[Nov 1 15:08:30] WARNING[711]: cel.c:361 do_reload: Could not load cel.conf
[Nov 1 15:08:30] NOTICE[711]: app_queue.c:7953 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:164 pbx_load_module: Starting AEL load process.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:177 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:180 pbx_load_module: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:187 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:192 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Nov 1 15:08:30] NOTICE[711]: pbx_ael.c:195 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
localhost*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@localhost mand]#
En console, j'ai après avoir taper "sip show users" :
localhost*CLI> sip show user
Usage: sip show user <name> [load]
Shows all details on one SIP user and the current status.
Option "load" forces lookup of peer in realtime storage.
localhost*CLI> sip show users
Username Secret Accountcode Def.Context ACL Forcerport
101 azerty local No Yes
102 azerty local No Yes
6000 1234 work No No
localhost*CLI>
Comme j'ai essentiellement bidouillé dans les fichiers extensions.conf et sip.conf, je ne comprends pas le problème évoquant le fichier extensions.ael
Je mets ici les deux fichiers :
extensions.conf (un peu long, désolé):
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=DAHDI/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
; 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)
;[context]
;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...)
; <time range>,<days of week>,<days of month>,<months>[,<timezone>]
;include => daytime,9:00-17:00,mon-fri,*,*
;include => weekend,*,sat-sun,*,*
;include => weeknights,17:02-8:58,mon-fri,*,*
;ignorepat => 9
[dundi-e164-canonical]
;exten => 12564286000,1,Gosub(6000,stdexten(IAX2/foo))
;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
[dundi-e164-customers]
;exten => _12564286000,1,Dial(SIP/customer1)
;exten => _12564286001,1,Dial(IAX2/customer2)
[dundi-e164-via-pstn]
;exten => _1256428XXXX,1,Dial(DAHDI/G2/${EXTEN:7}) ; Expose all of 256-428
;exten => _1256325XXXX,1,Dial(DAHDI/G2/${EXTEN:7}) ; Ditto for 256-325
[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn
[dundi-e164-switch]
switch => DUNDi/e164
[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch
[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext
[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})
[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
ignorepat => 9
include => local
include => trunkld
[local]
ignorepat => 9
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => parkedcalls
; switch => IAX2/user:password@bigserver/local
; lswitch => Loopback/12${EXTEN}@othercontext
; eswitch => IAX2/context@${CURSERVER}
; This is the dialing hook. use:
; include => outbound-freenum
[outbound-freenum]
exten => _X*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXXX*X!,1,Goto(outbound-freenum2,${EXTEN},1)
[outbound-freenum2]
exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})
same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well
same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1)
; filter out bad characters per the README-SERIOUSLY.best-practices.txt document
same => n,Set(TIMEOUT(absolute)=10800)
same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freen um.org)}) ; perform our lookup with freenum.org
same => n,GotoIf($["${isnresult}" != ""]?from)
same => n,Set(DIALSTATUS=CONGESTION)
same => n,Goto(fn-CONGESTION,1)
same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})
same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial) ; check if we set the FREENUMDOMAIN global variable in [global]
same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we'll use it for our outbound dialing domain
same => n(dial),Dial(SIP/${isnresult},40)
same => n,Goto(fn-${DIALSTATUS},1)
exten => fn-BUSY,1,Busy()
exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS})
same => n,Congestion()
[macro-trunkdial]
; ${ARG1} - What to dial
exten => s,1,Dial(${ARG1})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp
[stdexten]
; ${EXTEN} - Extension
; ${ARG1} - Device(s) to ring
; ${ARG2} - Optional context in Voicemail
-------->suite du fichier extensions.conf dans le post suivant car trop long.
et sip.conf :
[general]
context=local ;Contexte par defaut
bindport=5060 ;UDP standard
bindaddr=0.0.0.0 ;bind access to all
srvlookup=yes ;activer les lookup DNS des appels
language=fr ;MSG vocaux en FR
[101] ;Login SIP
secret=azerty ;Mot de passe
callerid= »Bob_les_ponges» <101> ;Affichage lors de l appel
context=local ;appels geres dans extension local
mailbox=101@default ;compte de msg vocale cfr voicemail.conf
type=friend ;allow in et out
host=dynamic ;adresse ip du client
nat=yes ;utiliser derriere du NAT
[102]
secret=azerty
callerid= »Kiki » <102>
context=local
type=friend
host=dynamic
nat=yes
mailbox=102@default
Je suis connecté avec une Bbox. J'ai une ligne sip. Ekiga. J'utilise un casque avec micro pour les appels.
En test, si je m'appelle, ça sonne côté appelant et j'ai le fichier de pré décroché qui se lance côté réception d'appel, soit exactement l'inverse de ce que je souhaite !
Je pense que le problème n'est pas gravissisme mais vu mon niveau général.. je tourne en rond. Il y a forcément un truc que je n'ai pas indiqué...et même plusieurs.
Merci aux intervenants qui me fileront un coup de main pour comprendre le problème.