[RenvoiGeneral]
;BLF
exten => **1244**500,hint,Custom:lampRenvGen
;Activation/Desactivation BLF Renvoi General
exten => _**1244**XXXXXXXXXX,1,NoOp(Enregistrement Numero)
exten => _**1244**XXXXXXXXXX,n,Set(DB(Renvoi/Extension)=${EXTEN:8})
exten => _**1244**XXXXXXXXXX,n,Hangup()
exten => **1244**500,1,Answer()
exten => **1244**500,n,GotoIf($[${DB(Renvoi/General)} = 1]?Actif:PasActif)
exten => **1244**500,n,Hangup()
exten => **1244**500,n(Actif),Set(DB(Renvoi/General)=0)
exten => **1244**500,n,Set(DEVSTATE(Custom:lampRenvGen)=NOT _INUSE)
exten => **1244**500,n,Playback(RenvoiDesactive)
exten => **1244**500,n,Hangup()
exten => **1244**500,n(PasActif),Set(DB(Renvoi/General)=1)
exten => **1244**500,n,Set(DEVSTATE(Custom:lampRenvGen)=BUS Y)
exten => **1244**500,n,Playback(RenvoiActive)
exten => **1244**500,n,Hangup()
[CheckRenv]
exten = s,1,NoOp(Controle Renvoi General)
exten = s,n,GotoIf($[${DB(Renvoi/General)} = 1]?Actif:PasActif)
exten = s,n(Actif),NoOp(Renvoi Actif)
exten = s,n,Goto(TONCONTEXTEPOURLESAPPELS,${DB(Renvoi/Extension)},1)
exten = s,n,Hangup()
exten = s,n(PasActif),NoOp(Renvoi Desactive)
exten = s,n,Return()