Archives de catégorie : Asterisk

Asterisk extension.conf

[general]
;language=fr
static=yes
writeprotect=no
clearglobalvars=yes

[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

alain2=SIP/alain
ced=SIP/cedric
alain=ZAP/1
rtc=ZAP/2
hotline=SIP/gigaset


TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider


[interne]

include => ana-int
include => parkedcalls


exten => 1,1,Dial(${alain},20,rT)
exten => 1,2,Voicemail(1001@interne,u)
exten => 1,102,Voicemail(1001@interne,b)
exten => 1,3,Hangup

;exten => 8,1,Transfer(1)


exten => 123,1,Goto(from-rtc,s,1)
;exten => 10,1,Playback(our-business-hours-are&promptfr/digits/9&hours&promptfr/letters/a&promptfr/digits/18&hours
;exten => 10,n,Playback(promptfr/digits/2&promptfr/digits/day-1&promptfr/letters/a&promptfr/digits/day-5)


exten => 2,1,Dial(${hotline},20,r,T)
exten => 2,2,Voicemail(6001@sip,u)
exten => 2,102,Voicemail(6001@sip,b)
exten => 2,3,Hangup

exten => 3,1,Dial(${ced},,r,T)
exten => 3,n,hangup

exten => 4,1,Dial(${alain2},,r,T)
exten => 4,n,Hangup

exten => 500,1,Wait(2)
exten => 500,2,VoicemailMain(${CALLERID(num)}@sip)
exten => 500,3,Hangup

exten => 500*,1,VoicemailMain(@sip)
exten => 500*,2,Hangup

exten => i,1,Playback(custom/error-fr)
exten => i,2,hangup

;apel entrant

[from-rtc]

exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,Playback(custom/welcome-fr2)
exten => s,4,Wait(.5)
exten => s,5,Set(TIMEOUT(response)=15)
exten => s,6,Background(continue-in-english&press-2&otherwise&press&promptfr/digits/1)   
exten => s,7,wait(.5)
exten => s,8,Set(CHANNEL(language)=en)
exten => s,9,Background(continue-in-english&press-2&otherwise&press-1)         
exten => s,10,Set(CHANNEL(language)=fr)

;envoie sur les menu suivant la langue

exten => 1,1,Goto(fr,s,1)
exten => 2,1,Goto(en,s,1)

;timeout langue
exten => t,1,Playback(vm-sorry)
exten => t,n,Set(CHANNEL(language)=en)
exten => t,n,Playback(vm-sorry)
exten => t,n,Wait(.5)
exten => t,n,Set(CHANNEL(language)=fr)
exten => t,n,Goto(from-rtc,s,5)

;invalid langue
exten => i,1,Playback(conf-errormenu)
exten => i,n,Set(CHANNEL(language)=en)
exten => i,n,Playback(conf-errormenu)
exten => i,n,Wait(.5)
exten => i,n,Set(CHANNEL(language)=fr)
exten => i,n,Goto(from-rtc,s,5)

[fr]

exten => s,1,GotoIfTime(8:00-18:59,mon-fri,*,*?fr,s,3)
exten => s,2,Goto(fr,closed,1)
exten => s,3,Set(TIMEOUT(response)=15)
exten => s,n,Set(CHANNEL(language)=fr)
exten => s,n,Playback(for-tech-support&press-1)
exten => s,n,wait(.5)
exten => s,n,Playback(for-sales&press-2)


;timeout service choix
exten => t,1,Playback(vm-sorry)
exten => t,2,Wait(1)
exten => t,3,Goto(fr,s,1)

;invalid service choix
exten => i,1,Playback(invalid)
exten => i,2,Wait(1)
exten => i,3,Goto(fr,s,1)

exten => closed,1,Set(CHANNEL(language)=fr)
exten => closed,n,Playback(our-business-hours-are&promptfr/digits/9&hours&promptfr/letters/a&promptfr/digits/18&hours)
exten => closed,n,Playback(promptfr/digits/2&promptfr/digits/day-1&promptfr/letters/o&promptfr/digits/day-5)
exten => closed,n,Wait(.5)
exten => closed,n,Set(TIMEOUT(response)=15)
exten => closed,n,Playback(T-to-leave-msg&press-star)

;rep general
exten => *,1,VoiceMail(6001@sip)
exten => *,n,Playback(vm-goodbye)
exten => *,n,Hangup

;services

;hotline
exten => 1,1,wait(1)
exten => 1,n,playback(priv-introsaved)
exten => 1,n,wait(0.5)
exten => 1,n,Dial(${hotline},15)
exten => 1,n,Dial(${alain},15)
exten => 1,n,Goto(fr,occ,1)

;commercial
exten => 2,1,wait(1)
exten => 2,n,playback(priv-introsaved)
exten => 2,n,wait(.5)
exten => 2,n,Dial(${alain},15,r)
exten => 2,n,Dial(${hotline},15)
exten => 2,n,Goto(fr,occ,1)

;autre question
;exten => 3,1,wait(1)
;exten => 3,n,playback(priv-introsaved)
;exten => 3,n,wait(.5)
;exten => 3,n,Dial(${hotline},15)
;exten => 3,n,Dial(${alain},15)
;exten => 3,n,Goto(fr,occ,1)


;repondeur si ouvert avec ttes lignes occupŽÃŽ©es ou pas rŽÃŽ©pondu

exten => occ,1,Playback(all-circuits-busy-now)
exten => occ,2,Wait(.5)
exten => occ,3,Set(TIMEOUT(response)=15)
exten => occ,4,Playback(T-to-leave-msg&press-star) ;*


[en]

exten => s,1,Set(CHANNEL(language)=en)
exten => s,2,GotoIfTime(8:00-18:59,mon-fri,*,*?en,s,4)
exten => s,3,Goto(en,closed,1)
exten => s,4,Set(TIMEOUT(response)=15)
exten => s,n,Playback(for-tech-support&press-1)
;exten => s,n,wait(.5)
exten => s,n,Playback(for-sales&press-2)

;timeout service choix
exten => t,1,Playback(vm-sorry)
exten => t,2,Wait(1)
exten => t,3,Goto(en,s,1)

;invalid service choix
exten => i,1,Playback(invalid)
exten => i,2,Wait(1)
exten => i,3,Goto(en,s,1)

exten => closed,1,Playback(our-business-hours-are&digits/en/9&hours&digits/en/a-m&digits/en/2&digits/en/6&hours&digits/en/p-m)
exten => closed,n,Playback(digits/en/2&digits/en/day-1&digits/en/2&digits/en/day-5)
exten => closed,n,Wait(.5)
exten => closed,n,Set(TIMEOUT(response)=15)
exten => closed,n,Playback(T-to-leave-msg&press-star)

;rep general
exten => *,1,Set(CHANNEL(language)=en)
exten => *,n,VoiceMail(6001@sip)
exten => *,n,Playback(privacy-thankyou)
exten => *,n,Hangup

;services

;hotline
exten => 1,1,wait(1)
exten => 1,n,playback(priv-introsaved)
exten => 1,n,wait(0.5)
exten => 1,n,Dial(${hotline},15)
exten => 1,n,Dial(${alain},15)
exten => 1,n,Goto(en,occ,1)

;commercial
exten => 2,1,wait(1)
exten => 2,n,playback(priv-introsaved)
exten => 2,n,wait(.5)
exten => 2,n,Dial(${alain},15)
exten => 2,n,Dial(${hotline},15)
exten => 2,n,Goto(en,occ,1)

;autre question
;exten => 3,1,wait(1)
;exten => 3,n,playback(priv-introsaved)
;exten => 3,n,wait(.5)
;exten => 3,n,Dial(${hotline},15)
;exten => 3,n,Dial(${alain},15)
;exten => 3,n,Goto(en,occ,1)

;repondeur si ouvert avec ttes lignes occupées ou pas répondu
exten => occ,1,Playback(all-circuits-busy-now)
exten => occ,2,Wait(.5)
exten => occ,3,Set(TIMEOUT(response)=15)
exten => occ,4,Playback(T-to-leave-msg&press-star)

[ana-int]

include => interne

exten => _0X.,1,Dial(${rtc}/${EXTEN:1})
exten => _0X.,2,Hangup