Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [alarm]
- ;waehrend der Feiertage kein Abwurf bei besetzt oder nicht-melden!!!
- exten => 300,1,NoOp(=== Alarm Queue ===)
- same => n,NoOp(From: ${CALLERID(NUM)})
- same => n,NoOp(To: ${EXTEN})
- same => n,Macro(Normalize)
- ; same => n,AGI(ast_get_phonebook.php)
- same => n,Set(CALLERID(NAME)="Hotline")
- same => n,GotoIf($[${DB_EXISTS(ALARM/320)} & ${DB_EXISTS(ALARM/323)}]?both)
- same => n,GotoIf($[${DB_EXISTS(ALARM/320)}]?alarm1)
- same => n,GotoIf($[${DB_EXISTS(ALARM/323)}]?alarm2)
- same => n,Goto(vpl)
- same => n(alarm1),NoOp(Nur Platz 320 angemeldet oder frei)
- same => n,GotoIf($[${SIPPEER(3201,curcalls)}>0]?vpl)
- same => n,GotoIf($[${SIPPEER(3202,curcalls)}>0]?vpl)
- same => n,NoOp(Platz 320 frei - rufe)
- same => n,Dial(SIP/3201&SIP/3202,20)
- ; same => n,Dial(SIP/3201&SIP/3202)
- same => n,GotoIf($[${DIALSTATUS}!=ANSWER]?vpl)
- same => n,Goto(hangup)
- same => n(alarm2),NoOp(Nur Platz 323 angemeldet oder frei)
- same => n,GotoIf($[${SIPPEER(3231,curcalls)}>0]?vpl)
- same => n,GotoIf($[${SIPPEER(3232,curcalls)}>0]?vpl)
- same => n,NoOp(Platz 323 frei - rufe)
- same => n,Dial(SIP/3231&SIP/3232,20)
- ; same => n,Dial(SIP/3231&SIP/3232)
- same => n,GotoIf($[${DIALSTATUS}!=ANSWER]?vpl)
- same => n,Goto(hangup)
- same => n(both),NoOp(Platz 320 und 323 angemeldet)
- same => n,GotoIf($[${SIPPEER(3201,curcalls)}>0]?alarm2)
- same => n,GotoIf($[${SIPPEER(3202,curcalls)}>0]?alarm2)
- same => n,GotoIf($[${SIPPEER(3231,curcalls)}>0]?alarm1)
- same => n,GotoIf($[${SIPPEER(3232,curcalls)}>0]?alarm1)
- same => n,Dial(SIP/3201&SIP/3202&SIP/3231&SIP/3232,20)
- ; same => n,Dial(SIP/3201&SIP/3202&SIP/3231&SIP/3232)
- same => n,GotoIf($[${DIALSTATUS}!=ANSWER]?vpl)
- same => n,Goto(hangup)
- same => n(vpl),NoOp(Niemand angemeldet, frei oder erreichbar - VPL)
- same => n,Set(CALLERID(NAME)=Abw Alarm)
- same => n,Goto(from-858,vpl,1)
- ; same => n,NoOp(Keine Vermittlung waehrend der Feiertage)
- ; same => n,Busy()
- same => n(hangup),NoOp()
- same => n,HangUp()
- exten => _alarm.,1,NoOp(=== An-/Abmeldung Alarm ===)
- same => n,Answer()
- same => n,GotoIf($[${DB_EXISTS(ALARM/${CALLERID(NUM)})}]?logoff:logon)
- same => n(logon),NoOp(Anmeldung Platz ${CALLERID(NUM)})
- same => n,Set(DB(ALARM/${CALLERID(NUM)})=on)
- same => n,Set(DEVICE_STATE(Custom:alarm${CALLERID(NUM)})=BUSY)
- same => n,Goto(hangup)
- same => n(logoff),NoOp(Abmeldung Platz ${CALLERID(NUM)})
- same => n,Set(old=${DB_DELETE(ALARM/${CALLERID(NUM)})})
- same => n,Set(DEVICE_STATE(Custom:alarm${CALLERID(NUM)})=NOT_INUSE)
- same => n,Goto(hangup)
- same => n(hangup),Hangup()
Advertisement
Add Comment
Please, Sign In to add comment