Dieses Wiki ist ein Archiv bis 2023. Das aktuelle Wiki findet sich unter https://wiki.hamburg.ccc.de/
Difference between revisions of "VoIP:Konfiguration neu"
m (Aktualisiert: Problemstellen mit Handwahl kommentiert, kleine Bugs behoben, dem Bayern seine 01803-Rauswahl wieder eingefügt. Dies Version ist jetzt live.) |
(Die Menüs für 0700-CHAOSFON gebaut; Mehr Kommentare & TODOs; MetaRheinMain über SIP-Proxy angebunden) |
||
Line 141: | Line 141: | ||
;; $Id$ | ;; $Id$ | ||
;; | ;; | ||
+ | ;; | ||
+ | ;; TODO: | ||
+ | ;; - MeetMe funktioniert nur mit Zaptel-Timer | ||
+ | ;; - ztdummy installieren | ||
+ | ;; - Voicemail richten | ||
+ | ;; - stdexten Macro | ||
+ | ;; - chaosfon-dialout | ||
+ | ;; - Verbindungen ueber das VPN ausbauen | ||
+ | ;; | ||
+ | |||
+ | |||
+ | |||
[general] | [general] | ||
;; | ;; | ||
− | ;; | + | ;; http://www.voip-info.org/wiki/index.php?page=Asterisk+Dialplan+General |
;; | ;; | ||
static=yes | static=yes | ||
writeprotect=yes | writeprotect=yes | ||
+ | autofallthrough=yes | ||
clearglobalvars=yes | clearglobalvars=yes | ||
+ | priorityjumping=no | ||
Line 154: | Line 168: | ||
[globals] | [globals] | ||
;; | ;; | ||
− | ;; | + | ;; http://www.voip-info.org/wiki/index.php?page=Asterisk+Dialplan+Globals |
;; | ;; | ||
+ | ;; Gruppenrufe | ||
;; Folgendes funktioniert nicht ganz, da wir intern nur 2 B-Kanaele haben | ;; Folgendes funktioniert nicht ganz, da wir intern nur 2 B-Kanaele haben | ||
;; Wir koennten auf der DECT-Anlage einen Gruppenruf einrichten | ;; Wir koennten auf der DECT-Anlage einen Gruppenruf einrichten | ||
Line 163: | Line 178: | ||
; -23 klingelt auch auf -26 und -27: | ; -23 klingelt auch auf -26 und -27: | ||
ZENTRALE_EXTERN=Local/office-isdn@phones | ZENTRALE_EXTERN=Local/office-isdn@phones | ||
− | ZENTRALE_INTERN=Local/office-isdn@phones&Local/office- | + | ZENTRALE_INTERN=Local/office-isdn@phones&SIP/zentrale&Local/packbarthome@phones |
+ | ZENTRALE_INTERN2=Local/office-isdn@phones&SIP/zentrale&Local/packbart@phones&Local/alx@phones&Local/pirx@phones&Local/ali@phones | ||
ZENTRALE_MAILBOX=800@default | ZENTRALE_MAILBOX=800@default | ||
Line 169: | Line 185: | ||
PRESSE2=Local/ali@phones | PRESSE2=Local/ali@phones | ||
;PRESSE2=Local/ali@phones&misdn/g:wall/<somewhereelse> | ;PRESSE2=Local/ali@phones&misdn/g:wall/<somewhereelse> | ||
− | PRESSE_MAILBOX= | + | PRESSE_MAILBOX=601@default |
;KASSE=Local/bayer@phones | ;KASSE=Local/bayer@phones | ||
+ | ;; FreeWorldDialup Account | ||
FWDNUMBER=714542 | FWDNUMBER=714542 | ||
FWDCIDNAME=ccchh | FWDCIDNAME=ccchh | ||
+ | |||
+ | ;; Passwort fuer Amtsholung aus dem VPN | ||
DIALOUTPW=2423 | DIALOUTPW=2423 | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ISDN_WALL=misdn/g:wall | ||
+ | ISDN_INTERNAL=misdn/g:internal1 | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Eingehende Verbindungen | ||
+ | ;; | ||
Line 197: | Line 230: | ||
;; erreichen niemals die s Extension. Bei langsam waehlenden Telefonen | ;; erreichen niemals die s Extension. Bei langsam waehlenden Telefonen | ||
;; springt das Goto zu kurz. | ;; springt das Goto zu kurz. | ||
− | exten => _401801!,1,GotoIf(${EXTEN:6}?extensions,${EXTEN:6},1:extensions,s,1) | + | exten => _401801!,1,GotoIf($["${EXTEN:6}" != ""]?extensions,${EXTEN:6},1:extensions,s,1) |
;; Wir braeuchten ein "include" mit Praefix | ;; Wir braeuchten ein "include" mit Praefix | ||
;include => extensions | ;include => extensions | ||
+ | ;; oder einen [extensions-wall] Kontext | ||
+ | ;include => extensions-wall | ||
Line 223: | Line 258: | ||
;; Klappt leider nicht so, wie es soll und verschluckt | ;; Klappt leider nicht so, wie es soll und verschluckt | ||
;; manchmal eine Ziffer: | ;; manchmal eine Ziffer: | ||
− | ;exten => s,1,Background( | + | ;exten => s,1,Background(chaosvpn_hamburg_willkommen) |
exten => s,1,NoOp | exten => s,1,NoOp | ||
− | + | exten => i,1,Answer | |
− | + | exten => i,n,Playback(chaosvpn_hamburg_hamwanich) | |
− | + | exten => i,n,PlayTones(info) | |
− | + | exten => i,n,Hangup | |
exten => 0,1,Goto(phones,zentrale,intern) | exten => 0,1,Goto(phones,zentrale,intern) | ||
+ | |||
+ | exten => zentrale,1,Goto(phones,zentrale,intern) | ||
include => catchall | include => catchall | ||
include => extensions | include => extensions | ||
+ | |||
+ | ;; Todo: Einen [named-extensions] o.ae. ([extensions-named?]) context anlegen, um | ||
+ | ;; genauer definieren zu koennen, welche Namen erreichbar sind. | ||
+ | ;; | ||
+ | ;; Alle Namen aus [phones] sind erreichbar | ||
+ | include => phones | ||
Line 244: | Line 287: | ||
;; | ;; | ||
− | ; Dialout via ISDN | + | ;; Dialout via ISDN |
+ | ;; Todo: 110 + 112 + die ueblichen Verdaechtigen sperren | ||
exten => _10!,1,Authenticate(${DIALOUTPW}) | exten => _10!,1,Authenticate(${DIALOUTPW}) | ||
− | exten => _10!,n,GotoIf(${EXTEN:2}?dialout-isdn,${EXTEN:2},1:dialout-isdn,s,1) | + | exten => _10!,n,GotoIf($["${EXTEN:2}" != ""]?dialout-isdn,${EXTEN:2},1:dialout-isdn,s,1) |
include => vpn-trunk | include => vpn-trunk | ||
include => dialout | include => dialout | ||
+ | |||
+ | |||
+ | |||
+ | [sip-trunk] | ||
+ | ;; | ||
+ | ;; Anrufe an SIP/irgendwer@hamburg.ccc.de | ||
+ | ;; ohne Dialout | ||
+ | ;; | ||
+ | |||
+ | exten => i,1,Answer | ||
+ | exten => i,n,Playback(chaosvpn_hamburg_hamwanich) | ||
+ | exten => i,n,PlayTones(info) | ||
+ | exten => i,n,Hangup | ||
+ | |||
+ | exten => 0,1,Goto(phones,zentrale,extern) | ||
+ | |||
+ | include => catchall | ||
+ | include => extensions | ||
+ | |||
+ | ;; Todo: Einen [named-extensions] o.ae. context anlegen, um | ||
+ | ;; genauer definieren zu koennen, welche Namen erreichbar sind. | ||
+ | ;; | ||
+ | ;; Alle Namen aus [phones] sind erreichbar | ||
+ | include => phones | ||
Line 261: | Line 329: | ||
include => catchall | include => catchall | ||
+ | |||
+ | |||
+ | |||
+ | [guest] | ||
+ | ;; | ||
+ | ;; Eingehende IAX-Verbindungen unbekannter Peers | ||
+ | ;; | ||
+ | |||
+ | exten => i,1,Answer | ||
+ | exten => i,n,Playback(chaosvpn_hamburg_hamwanich) | ||
+ | exten => i,n,PlayTones(info) | ||
+ | exten => i,n,Hangup | ||
+ | |||
+ | exten => 0,1,Goto(phones,zentrale,extern) | ||
+ | |||
+ | include => catchall | ||
+ | include => extensions | ||
+ | |||
+ | ;; Todo: Einen [named-extensions] o.ae. context anlegen, um | ||
+ | ;; genauer definieren zu koennen, welche Namen erreichbar sind. | ||
+ | ;; | ||
+ | ;; Alle Namen aus [phones] sind erreichbar | ||
+ | include => phones | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; | ||
+ | ;; | ||
Line 266: | Line 366: | ||
[extensions] | [extensions] | ||
;; | ;; | ||
− | ;; allgemeine Durchwahlen. Von aussen, innen und | + | ;; allgemeine Durchwahlen. Von aussen, innen und uebers Internet/VPN erreichbar |
;; http://wiki.hamburg.ccc.de/index.php/VOIP:Durchwahlen | ;; http://wiki.hamburg.ccc.de/index.php/VOIP:Durchwahlen | ||
;; | ;; | ||
; * 1 | ; * 1 | ||
+ | |||
+ | |||
; * 2 | ; * 2 | ||
Line 277: | Line 379: | ||
exten => 26,1,Goto(phones,office-dect,1) | exten => 26,1,Goto(phones,office-dect,1) | ||
+ | |||
+ | |||
; * 3 | ; * 3 | ||
+ | |||
+ | ;; alte Voicebox - Nummer aufheben | ||
+ | ;exten => 31,1,NoOp | ||
+ | |||
+ | |||
; * 4 Funktionsbereich offizielle Clubnummern | ; * 4 Funktionsbereich offizielle Clubnummern | ||
Line 285: | Line 394: | ||
exten => 40,n,Goto(mailfax,${EXTEN},1) | exten => 40,n,Goto(mailfax,${EXTEN},1) | ||
− | exten => 41,1,Goto(phones,papierfax,1) | + | ;exten => 41,1,Goto(phones,papierfax,1) !!!! Abgeklemmt solange das Fax abgeklemmt ist !!! |
+ | |||
+ | exten => 41,1,SetVar(EMAIL=office@ccc.de) | ||
+ | exten => 41,n,Goto(mailfax,${EXTEN},1) | ||
exten => 42,1,SetVar(EMAIL=mail@ccc.de) | exten => 42,1,SetVar(EMAIL=mail@ccc.de) | ||
exten => 42,n,Goto(mailfax,${EXTEN},1) | exten => 42,n,Goto(mailfax,${EXTEN},1) | ||
− | exten => | + | exten => 4300,1,Goto(phones,chaosfon,1) |
+ | exten => 43010,1,Goto(phones,chaosfon-logout,1) | ||
+ | exten => 43011,1,Goto(phones,chaosfon-login,1) | ||
+ | |||
+ | exten => 4601,1,Goto(phones,presse,1) | ||
+ | |||
+ | exten => 4666,1,Goto(phones,frollein,1) | ||
+ | |||
+ | |||
; * 5 Funktionsbereich Faxnummern | ; * 5 Funktionsbereich Faxnummern | ||
Line 311: | Line 431: | ||
exten => 55,1,SetVar(EMAIL=anonymizer@ccc.de) | exten => 55,1,SetVar(EMAIL=anonymizer@ccc.de) | ||
exten => 55,n,Goto(mailfax,${EXTEN},1) | exten => 55,n,Goto(mailfax,${EXTEN},1) | ||
− | |||
− | |||
− | |||
exten => 5601,1,SetVar(EMAIL=presse@hamburg.ccc.de) | exten => 5601,1,SetVar(EMAIL=presse@hamburg.ccc.de) | ||
Line 328: | Line 445: | ||
exten => 5801,1,SetVar(EMAIL=bayer@hamburg.ccc.de) | exten => 5801,1,SetVar(EMAIL=bayer@hamburg.ccc.de) | ||
exten => 5801,n,Goto(mailfax,${EXTEN},1) | exten => 5801,n,Goto(mailfax,${EXTEN},1) | ||
+ | |||
+ | |||
; * 6 Funktionsbereich Voicemail | ; * 6 Funktionsbereich Voicemail | ||
Line 334: | Line 453: | ||
exten => 6000,n,Hangup() | exten => 6000,n,Hangup() | ||
− | ;; 61XXX fuer Erweiterungen | + | ;; 61XXX fuer Erweiterungen? |
;; 6NXX den Nummern von 8xx anpassen | ;; 6NXX den Nummern von 8xx anpassen | ||
Line 341: | Line 460: | ||
exten => _6NXX,1,Voicemail(${EXTEN:1}@default) | exten => _6NXX,1,Voicemail(${EXTEN:1}@default) | ||
exten => _6NXX,n,Hangup() | exten => _6NXX,n,Hangup() | ||
+ | |||
+ | |||
; * 7 Funktionsbereich Verschiedenes/Spielzeuge | ; * 7 Funktionsbereich Verschiedenes/Spielzeuge | ||
Line 346: | Line 467: | ||
; ** 71 Konferenz | ; ** 71 Konferenz | ||
− | exten => | + | exten => 7100,1,MeetMe(${EXTEN:2}) |
+ | exten => _711XX,1,MeetMe(${EXTEN:3}) | ||
+ | exten => _71NX,1,MeetMe(${EXTEN:2}) | ||
+ | |||
+ | |||
+ | ; ** 7701 Spielzeug: Labyrinth ueber IAX - klickstu http://www.astrastudio.de/ | ||
+ | |||
+ | exten => 7701,1,Dial(IAX2/home.astrastudio.de/2088@default) | ||
+ | exten => 7701,2,Hangup | ||
+ | |||
; ** 78 Streams | ; ** 78 Streams | ||
exten => 7806,1,Answer | exten => 7806,1,Answer | ||
− | exten => 7806,n, | + | exten => 7806,n,Goto(phones,stream-nerdsonair,orange) |
+ | |||
+ | exten => 7807,1,Answer | ||
+ | exten => 7807,n,Goto(phones,stream-cradar,radiodarmstadt) | ||
+ | |||
exten => 7901,1,Macro(echotest) | exten => 7901,1,Macro(echotest) | ||
+ | |||
+ | |||
; * 8 Funktionsbereich Mitgliedertelefone | ; * 8 Funktionsbereich Mitgliedertelefone | ||
Line 359: | Line 495: | ||
exten => 800,1,Goto(phones,zentrale,intern) | exten => 800,1,Goto(phones,zentrale,intern) | ||
+ | ;; Alx | ||
exten => 827,1,Goto(phones,alx,1) | exten => 827,1,Goto(phones,alx,1) | ||
;; vorruebergehend noch die -27 [spaetestens 2006-03 raus] | ;; vorruebergehend noch die -27 [spaetestens 2006-03 raus] | ||
Line 364: | Line 501: | ||
;; | ;; | ||
+ | ;; Ali | ||
+ | exten => 877,1,Goto(phones,ali,1) | ||
+ | exten => _877X!,1,Set(SWITCHTO=alivpnlardass) | ||
+ | exten => _877X!,n,Goto(tochaos_iax,${EXTEN:3},1) | ||
+ | |||
+ | ;; Hauke | ||
exten => _828,1,Goto(phones,packbart,1) | exten => _828,1,Goto(phones,packbart,1) | ||
;; ohne TIMEOUT(digit) tut das nicht ohne Blockwahl: | ;; ohne TIMEOUT(digit) tut das nicht ohne Blockwahl: | ||
exten => _828X!,1,Set(SWITCHTO=packbartvpnhome) | exten => _828X!,1,Set(SWITCHTO=packbartvpnhome) | ||
− | exten => _828X!,n,Goto( | + | exten => _828X!,n,Goto(tochaos_iax,${EXTEN:3},1) |
+ | exten => 829,1,Answer | ||
+ | exten => 829,n,MusicOnHold(chaosmix) | ||
+ | ;exten => 829,1,Dial(IAX2/packbart@openchaos.org) | ||
+ | ;exten => 829,1,Dial(SIP/packbart@openchaos.org) | ||
exten => _829!,1,Set(SWITCHTO=packbartvpnhome) | exten => _829!,1,Set(SWITCHTO=packbartvpnhome) | ||
− | exten => _829!,n,GotoIf($["${EXTEN:3}" != ""]? | + | exten => _829!,n,GotoIf($["$["${EXTEN:3}" != ""]" != ""]?tochaos_iax,${EXTEN:3},1:tochaos_iax,s,1) |
+ | ;; Bayer | ||
exten => _830,1,Goto(phones,bayer,1) | exten => _830,1,Goto(phones,bayer,1) | ||
+ | |||
+ | |||
; * 9 Funktionsbereich Chaos-VPN | ; * 9 Funktionsbereich Chaos-VPN | ||
;exten => _92!,1,Set(SWITCHTO=cccc) | ;exten => _92!,1,Set(SWITCHTO=cccc) | ||
− | ;exten => _92!,n,GotoIf(${EXTEN:2}? | + | ;exten => _92!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) |
;exten => _93!,1,Set(SWITCHTO=cccb) | ;exten => _93!,1,Set(SWITCHTO=cccb) | ||
− | ;exten => _93!,n,GotoIf(${EXTEN:2}? | + | ;exten => _93!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) |
;exten => _94!,1,Set(SWITCHTO=ccchh) | ;exten => _94!,1,Set(SWITCHTO=ccchh) | ||
− | ;exten => _94!,n,GotoIf(${EXTEN:2}? | + | ;exten => _94!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) |
− | + | exten => _96!,1,Set(SWITCHTO=metarheinmain) | |
− | ;exten => _96!,n,GotoIf(${EXTEN:2}? | + | exten => _96!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_sip,${EXTEN:2},1:tochaos_sip,s,1) |
+ | ;exten => _96!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) | ||
include => catchall | include => catchall | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; | ||
+ | ;; | ||
[phones] | [phones] | ||
;; | ;; | ||
− | ;; Rufempfaenger (Funktionen, Personen, | + | ;; Benamste Rufempfaenger (Funktionen, Telefone, Personen, Dinge) |
;; | ;; | ||
− | exten => zentrale,1, | + | |
− | exten => zentrale,n(extern),Dial(${ZENTRALE_EXTERN},20, | + | ;; |
+ | ;; Zentrale | ||
+ | ;; | ||
+ | |||
+ | ;; Diese Prio sollten eigentlich nur SIP- und IAX-Anrufe | ||
+ | ;; an "zentrale" erreichen. Behandeln wie extern. | ||
+ | |||
+ | exten => zentrale,1,Goto(extern) | ||
+ | |||
+ | ;; Zentrale von aussen: 20s Office klingen lassen, dann abwimmeln | ||
+ | |||
+ | exten => zentrale,n(extern),Dial(${ZENTRALE_EXTERN},20,t) | ||
exten => zentrale,n,Playback(cccansage) | exten => zentrale,n,Playback(cccansage) | ||
exten => zentrale,n,Hangup | exten => zentrale,n,Hangup | ||
− | exten => zentrale,n(intern),Dial(${ZENTRALE_INTERN},20, | + | ;; Zentrale von innen/aus dem VPN: 20s Office klingeln lassen, |
− | exten => zentrale,n,Dial(${ZENTRALE_INTERN2},35, | + | ;; dann 35s Office + Mitglieder anklingeln, dann Voicemail |
+ | |||
+ | exten => zentrale,n(intern),Dial(${ZENTRALE_INTERN},20,t) | ||
+ | exten => zentrale,n,Dial(${ZENTRALE_INTERN2},35,t) | ||
exten => zentrale,n,Voicemail(${ZENTRALE_MAILBOX}) | exten => zentrale,n,Voicemail(${ZENTRALE_MAILBOX}) | ||
exten => zentrale,n,Hangup | exten => zentrale,n,Hangup | ||
− | exten => presse,1,Dial(${PRESSE},20, | + | ;; Zentrale ueber 0700-CHAOSFON: Office klingeln lassen, |
− | exten => presse,n,Dial(${PRESSE2},20, | + | ;; keine eigene Voicemail |
+ | |||
+ | exten => zentrale,n(chaosfon),Dial(${ZENTRALE_EXTERN}) | ||
+ | exten => zentrale,n,Hangup | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Pressefon | ||
+ | ;; | ||
+ | |||
+ | exten => presse,1,Dial(${PRESSE},20,t) | ||
+ | exten => presse,n,Dial(${PRESSE2},20,t) | ||
exten => presse,n,Voicemail(${PRESSE_MAILBOX}) | exten => presse,n,Voicemail(${PRESSE_MAILBOX}) | ||
exten => presse,n,Hangup | exten => presse,n,Hangup | ||
− | |||
− | + | ;; | |
+ | ;; 0700-CHAOSFON | ||
+ | ;; | ||
− | exten => | + | exten => chaosfon,1,Goto(chaosfon-menue,s,1) |
+ | ;debug: | ||
+ | exten => chaosfon-login,1,AgentCallbackLogin(,,${CALLERIDNUM}@chaosfon-dialout) | ||
+ | exten => chaosfon-logout,1,AgentCallbackLogin(,,@chaosfon-dialout) | ||
+ | ; | ||
− | exten => packbart,1,Dial(misdn/g:internal1/28&IAX2/packbartvpnhome/0&SIP/packbart,45 | + | |
+ | ;; | ||
+ | ;; 0900-CHAOSFON | ||
+ | ;; | ||
+ | |||
+ | ;; I dare to dream | ||
+ | ;exten => windowssupport,1,Answer | ||
+ | ;exten => windowssupport,n,SetMusicOnHold(cashcows) | ||
+ | ;exten => windowssupport,n,Background(cashcows-welcome) | ||
+ | ;exten => windowssupport,n,Queue(cashcows) | ||
+ | ;exten => windowssupport,n,Hangup | ||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Telefone | ||
+ | ;; | ||
+ | |||
+ | exten => office-isdn,1,Dial(misdn/g:internal1/23) | ||
+ | |||
+ | exten => office-dect,1,Dial(misdn/g:internal1/26) | ||
+ | |||
+ | exten => papierfax,1,Dial(misdn/g:internal1/41) | ||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Loide | ||
+ | ;; | ||
+ | |||
+ | ;; packbart: 45s DECT + daheim + SIP klingen lassen, dann Voicemail | ||
+ | |||
+ | exten => packbart,1,Dial(misdn/g:internal1/28&IAX2/packbartvpnhome/0&SIP/packbart,45) | ||
exten => packbart,n,Voicemail(828@default) | exten => packbart,n,Voicemail(828@default) | ||
exten => packbart,n,Hangup | exten => packbart,n,Hangup | ||
− | exten => packbarthome,1,Dial(IAX2/packbartvpnhome/0 | + | exten => packbarthome,1,Dial(IAX2/packbartvpnhome/0) |
− | exten => alx,1,Dial(misdn/g:internal1/27,45 | + | ;; Alx: 45s DECT, dann Voicemail |
+ | |||
+ | exten => alx,1,Dial(misdn/g:internal1/27,45) | ||
exten => alx,n,Voicemail(827@default) | exten => alx,n,Voicemail(827@default) | ||
exten => alx,n,Hangup | exten => alx,n,Hangup | ||
− | exten => ali,1,Dial(IAX2/ | + | ;; Ali: 45s daheim + SIP klingen lassen, dann Voicemail |
+ | |||
+ | exten => ali,1,Dial(IAX2/alivpnlardass/88177799) | ||
+ | ;exten => ali,1,Dial(IAX2/alivpnlardass/88177799&SIP/ali,45) | ||
exten => ali,n,Voicemail(666@default) | exten => ali,n,Voicemail(666@default) | ||
exten => ali,n,Hangup | exten => ali,n,Hangup | ||
− | + | ;; Bayer: Siemens-Support anrufen | |
− | + | ; das macht er bitte von zuhause oder wo auch immer aus! | |
+ | ; der club hat kein geld | ||
− | + | ;exten => bayer,1,Dial(misdn/g:wall/082472810) | |
+ | ;exten => bayer,n,Hangup | ||
− | |||
;; | ;; | ||
− | ;; | + | ;; Dinge |
;; | ;; | ||
− | exten => | + | ;exten => stream-chaosradio,1,Answer |
− | exten => | + | ;exten => stream-chaosradio,n(vishnu),MP3Player(http://vishnu.netfilter.org:2342/chaosradio-lq.mp3) |
− | exten => | + | ;exten => stream-chaosradio,n,Hangup |
− | exten => | + | |
+ | exten => stream-nerdsonair,1,Answer | ||
+ | exten => stream-nerdsonair,n(orange),MP3Player(http://orange-01.live.sil.at:8000/) | ||
+ | exten => stream-nerdsonair,n,Hangup | ||
− | exten => | + | exten => stream-cradar,1,Answer |
+ | exten => stream-cradar,n(radiodarmstadt),MP3Player(http://213.202.240.45:8000/) | ||
+ | exten => stream-cradar,n,Hangup | ||
− | + | exten => echotest,1,Macro(echotest) | |
− | |||
;; | ;; | ||
− | ;; | + | ;; Konferenzen |
− | |||
;; | ;; | ||
− | exten => | + | exten => freifunken,1,MeetMe(1201,cds) |
− | exten => | + | exten => freifunken,n,Playback(vm-goodbye) |
− | + | exten => freifunken,n,Hangup | |
− | exten => | + | |
− | |||
include => catchall | include => catchall | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Abgehende Verbindungen | ||
+ | ;; | ||
[dialout] | [dialout] | ||
Line 475: | Line 711: | ||
;; | ;; | ||
− | ; Dialout via ISDN | + | ;; Dialout via ISDN |
− | exten => _0!,1,GotoIf(${EXTEN:1}?dialout-isdn,${EXTEN:1},1:dialout-isdn,s,1) | + | exten => _0!,1,GotoIf($["${EXTEN:1}" != ""]?dialout-isdn,${EXTEN:1},1:dialout-isdn,s,1) |
− | ; Dialout via ChaosVPN | + | ;; Dialout via ChaosVPN |
− | exten => _10!,1,GotoIf(${EXTEN:2}?dialout-chaosvpn,${EXTEN:2},1:dialout-chaosvpn,s,1) | + | exten => _10!,1,GotoIf($["${EXTEN:2}" != ""]?dialout-chaosvpn,${EXTEN:2},1:dialout-chaosvpn,s,1) |
− | ; Dialout via FreeWorldDialup | + | ;; Dialout via FreeWorldDialup |
− | exten => _12!,1,GotoIf(${EXTEN:2}?dialout-iaxfwd,${EXTEN:2},1:dialout-iaxfwd,s,1) | + | exten => _12!,1,GotoIf($["${EXTEN:2}" != ""]?dialout-iaxfwd,${EXTEN:2},1:dialout-iaxfwd,s,1) |
Line 490: | Line 726: | ||
;; misdn/g:wall | ;; misdn/g:wall | ||
;; | ;; | ||
+ | |||
exten => s,1,ChanIsAvail(misdn/g:wall,j) | exten => s,1,ChanIsAvail(misdn/g:wall,j) | ||
exten => s,n,PlayTones(dial) | exten => s,n,PlayTones(dial) | ||
Line 498: | Line 735: | ||
exten => s,n,Congestion | exten => s,n,Congestion | ||
− | exten => _X!.,1, | + | exten => _X!.,1,ChanIsAvail(misdn/g:wall,j) |
− | exten => _X!.,n, | + | exten => _X!.,n,StopPlayTones |
− | exten => _X!.,n,Dial(misdn/g:wall/${EXTEN},, | + | exten => _X!.,n,Dial(misdn/g:wall/${EXTEN},,T) |
exten => _X!.,102,Playback(all-circuits-busy) | exten => _X!.,102,Playback(all-circuits-busy) | ||
exten => _X!.,n,PlayTones(congestion) | exten => _X!.,n,PlayTones(congestion) | ||
exten => _X!.,n,Congestion | exten => _X!.,n,Congestion | ||
+ | |||
+ | include => catchall | ||
+ | |||
+ | |||
+ | [dialout-chaosvpn] | ||
+ | ;; | ||
+ | ;; IAX2/fnord - Baustelle, noch nicht fertig | ||
+ | ;; | ||
+ | |||
+ | ;exten => s,1,ChanIsAvail(IAX2/packbartvpnhome,j) | ||
+ | ;exten => s,n,PlayTones(dial) | ||
+ | ;exten => s,n,WaitExten | ||
+ | |||
+ | ;exten => s,102,Playback(all-circuits-busy) | ||
+ | ;exten => s,n,PlayTones(congestion) | ||
+ | ;exten => s,n,Congestion | ||
+ | |||
+ | exten => _!.,1,ChanIsAvail(IAX2/packbartvpnhome,j) | ||
+ | exten => _!.,n,StopPlayTones | ||
+ | exten => _!.,n,Dial(IAX2/packbartvpnhome/10${EXTEN},,T) | ||
+ | |||
+ | exten => _!.,102,Playback(all-circuits-busy) | ||
+ | exten => _!.,n,PlayTones(congestion) | ||
+ | exten => _!.,n,Congestion | ||
include => catchall | include => catchall | ||
Line 513: | Line 774: | ||
[dialout-iaxfwd] | [dialout-iaxfwd] | ||
;; | ;; | ||
− | ;; IAX2/iaxfwd | + | ;; IAX2/iaxfwd (FreeWorldDialup) |
;; | ;; | ||
− | exten => s,1, | + | |
− | exten => s,n, | + | exten => s,1,ChanIsAvail(IAX2/iaxfwd,j) |
+ | exten => s,n,Set(TIMEOUT(digit)=3) | ||
;exten => s,n,PlayTones(dial) | ;exten => s,n,PlayTones(dial) | ||
exten => s,n,WaitExten | exten => s,n,WaitExten | ||
Line 524: | Line 786: | ||
exten => s,n,Congestion | exten => s,n,Congestion | ||
− | exten => _X.,1,StopPlayTones | + | exten => _X.,1,ChanIsAvail(IAX2/iaxfwd,j) |
+ | exten => _X.,n,StopPlayTones | ||
exten => _X.,n,Set(CALLERID(name)=${FWDCIDNAME},CALLERID(number)=${FWDNUMBER}) | exten => _X.,n,Set(CALLERID(name)=${FWDCIDNAME},CALLERID(number)=${FWDNUMBER}) | ||
exten => _X.,n,Dial(IAX2/iaxfwd/${EXTEN}) | exten => _X.,n,Dial(IAX2/iaxfwd/${EXTEN}) | ||
+ | |||
+ | exten => _X.,102,Playback(all-circuits-busy) | ||
+ | exten => _X.,n,PlayTones(congestion) | ||
+ | exten => _X.,n,Congestion | ||
+ | |||
include => catchall | include => catchall | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 0700-CHAOSFON | ||
+ | ;; | ||
+ | |||
+ | [chaosfon-menue] | ||
+ | ;; | ||
+ | ;; Startmenue | ||
+ | ;; | ||
+ | |||
+ | ;; | ||
+ | ;; s: Intro und Menue | ||
+ | ;; | ||
+ | exten => s,1,Answer | ||
+ | exten => s,n,Background(chaosfon_menue_intro) | ||
+ | exten => s,n(menue),Set(heard_menu=yes) | ||
+ | exten => s,n,Background(chaosfon_menue_dienste) | ||
+ | exten => s,n,Background(chaosfon_menue_auswahl) | ||
+ | exten => s,n,Background(chaosfon_bitte_waehlen) | ||
+ | exten => s,n,WaitExten | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 0: Ansage wiederholen | ||
+ | ;; | ||
+ | exten => 0,1,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 1: Hackerethik | ||
+ | ;; | ||
+ | exten => 1,1,Wait(0.5) | ||
+ | exten => 1,n,Playback(chaosfon_hackerethik) | ||
+ | exten => 1,n,Wait(2) | ||
+ | exten => 1,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 2: Allgemeine Anfragen | ||
+ | ;; - ~45s Anwahlversuch | ||
+ | ;; - dann Voicemail | ||
+ | ;; | ||
+ | exten => 2,1,Wait(0.5) | ||
+ | exten => 2,n,Playback(chaosfon_allgemein) | ||
+ | exten => 2,n,Playback(chaosfon_voicemail) | ||
+ | exten => 2,n,Playback(chaosfon_dialout) | ||
+ | exten => 2,n,Queue(chaosfon-allgemein,tn) | ||
+ | exten => 2,n,Playback(chaosfon_vm-intro) | ||
+ | exten => 2,n,Voicemail(s02@chaosfon-voicemail) | ||
+ | exten => 2,n,Wait(2) | ||
+ | exten => 2,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 3: Presse | ||
+ | ;; - ~45s Anwahlversuch | ||
+ | ;; - dann Voicemail | ||
+ | ;; | ||
+ | exten => 3,1,Wait(0.5) | ||
+ | exten => 3,n,Playback(chaosfon_presse) | ||
+ | exten => 3,n,Playback(chaosfon_dialout2) | ||
+ | exten => 3,n,Playback(chaosfon_voicemail2) | ||
+ | exten => 3,n,Queue(chaosfon-presse,tn) | ||
+ | exten => 3,n,Playback(chaosfon_vm-intro) | ||
+ | exten => 3,n,Voicemail(s03@chaosfon-voicemail) | ||
+ | exten => 3,n,Wait(2) | ||
+ | exten => 3,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 4: Erfakreis-Menue | ||
+ | ;; | ||
+ | exten => 4,1,Wait(0.5) | ||
+ | exten => 4,n,Goto(chaosfon-erfas,s,1) | ||
+ | exten => 4,n,Wait(2) | ||
+ | exten => 4,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 5: Datenschleuder | ||
+ | ;; - gleich Voicemail | ||
+ | ;; | ||
+ | exten => 5,1,Wait(0.5) | ||
+ | exten => 5,n,Playback(chaosfon_datenschleuder) | ||
+ | exten => 5,n,Voicemail(s05@chaosfon-voicemail) | ||
+ | exten => 5,n,Wait(2) | ||
+ | exten => 5,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 6: Office | ||
+ | ;; - nur Ansage | ||
+ | ;; | ||
+ | exten => 6,1,Wait(0.5) | ||
+ | exten => 6,n,Playback(chaosfon_office) | ||
+ | exten => 6,n,Wait(2) | ||
+ | exten => 6,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; *: Voicemailabfrage | ||
+ | ;; | ||
+ | exten => *,1,VoiceMailMain(@chaosfon-voicemail) | ||
+ | exten => *,n,Wait(2) | ||
+ | exten => *,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; #: Ausgang | ||
+ | ;; | ||
+ | exten => #,1,Hangup | ||
+ | |||
+ | |||
+ | include => chaosfon-catchall | ||
+ | |||
+ | |||
+ | |||
+ | [chaosfon-erfas] | ||
+ | ;; | ||
+ | ;; Erfakreis-Durchwahlmenue | ||
+ | ;; | ||
+ | |||
+ | ;; | ||
+ | ;; s: Intro und Menue | ||
+ | ;; | ||
+ | exten => s,1,Answer | ||
+ | exten => s,n(menue),Set(heard_menu=yes) | ||
+ | exten => s,n,Background(chaosfon_erfas_start) | ||
+ | exten => s,n,Background(chaosfon_erfas_auswahl) | ||
+ | exten => s,n,Background(chaosfon_bitte_waehlen) | ||
+ | exten => s,n,WaitExten | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; 0: Ansage wiederholen | ||
+ | ;; | ||
+ | exten => 0,1,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Durchwahlen & Voicemail fuer Erfas | ||
+ | ;; | ||
+ | exten => 10,1,Macro(chaosfon-call,10,hamburg) | ||
+ | exten => 10,n,Wait(2) | ||
+ | exten => 10,n,Goto(s,menue) | ||
+ | |||
+ | exten => 11,1,Macro(chaosfon-call,11,berlin) | ||
+ | exten => 11,n,Wait(2) | ||
+ | exten => 11,n,Goto(s,menue) | ||
+ | |||
+ | exten => 12,1,Macro(chaosfon-call,12,koeln) | ||
+ | exten => 12,n,Wait(2) | ||
+ | exten => 12,n,Goto(s,menue) | ||
+ | |||
+ | exten => 13,1,Macro(chaosfon-call,13,bielefeld) | ||
+ | exten => 13,n,Wait(2) | ||
+ | exten => 13,n,Goto(s,menue) | ||
+ | |||
+ | exten => 14,1,Macro(chaosfon-call,14,dresden) | ||
+ | exten => 14,n,Wait(2) | ||
+ | exten => 14,n,Goto(s,menue) | ||
+ | |||
+ | exten => 15,1,Macro(chaosfon-call,15,erlangen) | ||
+ | exten => 15,n,Wait(2) | ||
+ | exten => 15,n,Goto(s,menue) | ||
+ | |||
+ | exten => 16,1,Macro(chaosfon-call,16,karlsruhe) | ||
+ | exten => 16,n,Wait(2) | ||
+ | exten => 16,n,Goto(s,menue) | ||
+ | |||
+ | exten => 17,1,Macro(chaosfon-call,17,hannover) | ||
+ | exten => 17,n,Wait(2) | ||
+ | exten => 17,n,Goto(s,menue) | ||
+ | |||
+ | exten => 18,1,Macro(chaosfon-call,18,ulm) | ||
+ | exten => 18,n,Wait(2) | ||
+ | exten => 18,n,Goto(s,menue) | ||
+ | |||
+ | exten => 19,1,Macro(chaosfon-call,19,wien) | ||
+ | exten => 19,n,Wait(2) | ||
+ | exten => 19,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; *: Voicemailabfrage | ||
+ | ;; | ||
+ | exten => *,1,VoiceMailMain(@chaosfon-voicemail) | ||
+ | exten => *,n,Wait(2) | ||
+ | exten => *,n,Goto(s,menue) | ||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; #: Zurueck ins Hauptmenue | ||
+ | ;; | ||
+ | exten => #,1,Goto(chaosfon-menue,s,menue) | ||
+ | |||
+ | |||
+ | include => chaosfon-catchall | ||
+ | |||
+ | |||
+ | |||
+ | [macro-chaosfon-call] | ||
+ | ;; | ||
+ | ;; - ~45s Anwahlversuch | ||
+ | ;; - dann Voicemail | ||
+ | ;; - kein Hangup! | ||
+ | ;; | ||
+ | ;; ARG1: Voicemail-Nummer | ||
+ | ;; ARG2: Ziel fuer Dial() @chaosfon-dialout | ||
+ | ;; | ||
+ | ;; TODO: - Queues fuer Erfas? | ||
+ | exten => s,1,Answer | ||
+ | exten => s,n,Playback(chaosfon_dialout2) | ||
+ | exten => s,n,Playback(chaosfon_voicemail) | ||
+ | ;exten => s,n,Dial(Local/${ARG2}@chaosfon-dialout,45,htm(chaosmix)A(chaosfon_anruf)) | ||
+ | exten => s,n,Dial(Local/${ARG2}@chaosfon-dialout,45,htm(chaosmix)) | ||
+ | exten => s,n,Playback(chaosfon_vm-intro) | ||
+ | exten => s,n,Voicemail(s${ARG1}@chaosfon-voicemail) | ||
+ | |||
+ | |||
+ | |||
+ | [chaosfon-catchall] | ||
+ | ;; | ||
+ | ;; Falsche Eingabe: zurueck zum Start des jeweiligen Menues | ||
+ | ;; | ||
+ | exten => i,1,Background(invalid) | ||
+ | exten => i,n,Wait(2) | ||
+ | exten => i,n,Goto(s,menue) | ||
+ | |||
+ | ;; | ||
+ | ;; Timeout: Abwechselnd "Bitte waehlen" und Menue | ||
+ | ;; TODO: Das Menue zweimal ansagen, dann auflegen | ||
+ | ;; | ||
+ | exten => t,1,GotoIf($["${heard_menu}" != "yes"]?s,menue) | ||
+ | exten => t,n,Set(heard_menu=no) | ||
+ | exten => t,n,Background(chaosfon_bitte_waehlen) | ||
+ | exten => t,n,WaitExten | ||
+ | |||
+ | |||
+ | |||
+ | [chaosfon-dialout] | ||
+ | ;; | ||
+ | ;; Nummern fuer Weiterleitung an Erfas und Callback-Logins | ||
+ | ;; z.Zt. noch Baustelle | ||
+ | ;; TODO: ergaenzen und absichern | ||
+ | ;; | ||
+ | |||
+ | exten => 800,1,Goto(phones,zentrale,chaosfon) | ||
+ | ;exten => 827,1,Goto(phones,alx,chaosfon) | ||
+ | ;exten => 828,1,Goto(phones,packbart,chaosfon) | ||
+ | ;exten => 877,1,Goto(phones,ali,chaosfon) | ||
+ | |||
+ | exten => 04041165291,1,Goto(dialout-isdn,${EXTEN},1) | ||
+ | exten => 04024828724,1,Goto(dialout-isdn,${EXTEN},1) | ||
+ | |||
+ | exten => _829!,1,Set(SWITCHTO=packbartvpnhome) | ||
+ | exten => _829!,n,GotoIf($["$["${EXTEN:3}" != ""]" != ""]?tochaos_iax,${EXTEN:3},1:tochaos_iax,s,1) | ||
+ | |||
+ | |||
+ | exten => 920,1,Goto(koeln,1) | ||
+ | exten => 930,1,Goto(berlin,1) | ||
+ | exten => 940,1,Goto(hamburg,1) | ||
+ | |||
+ | exten => hamburg,1,Goto(phones,zentrale,chaosfon) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;; | ||
+ | ;; Utils | ||
+ | ;; | ||
[macro-echotest] | [macro-echotest] | ||
+ | ;; | ||
+ | ;; Der beliebte Echotest | ||
+ | ;; | ||
+ | |||
exten => s,1,Playback(tt-weasels) | exten => s,1,Playback(tt-weasels) | ||
exten => s,2,Playback(demo-echotest) | exten => s,2,Playback(demo-echotest) | ||
Line 537: | Line 1,087: | ||
exten => s,4,Playback(demo-echodone) | exten => s,4,Playback(demo-echodone) | ||
exten => s,5,Hangup | exten => s,5,Hangup | ||
+ | |||
+ | |||
+ | |||
+ | [mailfax] | ||
+ | ;; | ||
+ | ;; Fax2Mail mit OCR | ||
+ | ;; | ||
+ | |||
+ | exten => _X.,1,SetVar(CALLEDFAX=${EXTEN}) | ||
+ | exten => _X.,2,Answer | ||
+ | exten => _X.,3,SetVar(FAXFILE=/var/spool/asterisk/fax/${CALLEDFAX}-${CALLERIDNUM}-${UNIQUEID}) | ||
+ | exten => _X.,4,rxfax(${FAXFILE}.tif) | ||
+ | |||
+ | exten => h,1,system(/usr/local/bin/mailfax "${FAXFILE}" "${EMAIL}" "${CALLERIDNUM}" "${CALLEDFAX}") | ||
+ | |||
+ | include => catchall | ||
+ | |||
+ | |||
+ | |||
+ | [mailfax_fancy] | ||
+ | ;; | ||
+ | ;; Fax2Mail mit OCR | ||
+ | ;; Baustelle fuer Erweiterungen | ||
+ | ;; | ||
+ | |||
+ | exten => _X.,1,SetVar(CALLEDFAX=${EXTEN}) | ||
+ | exten => _X.,2,Answer | ||
+ | exten => _X.,3,SetVar(FAXFILE=/var/spool/asterisk/fax/${CALLEDFAX}-${CALLERIDNUM}-${UNIQUEID}) | ||
+ | exten => _X.,4,rxfax(${FAXFILE}.tif) | ||
+ | |||
+ | exten => h,1,system(/usr/local/bin/mailfax_fancy ${FAXFILE} ${EMAIL} ${CALLERIDNUM} ${CALLEDFAX}) | ||
+ | |||
+ | include => catchall | ||
[catchall] | [catchall] | ||
+ | ;; | ||
+ | ;; Extensions, die in keinem Kontext fehlen sollten | ||
+ | ;; | ||
+ | |||
exten => s,1,NoOp | exten => s,1,NoOp | ||
Line 562: | Line 1,149: | ||
− | [ | + | [tochaos_iax] |
− | exten => _!,1,Set(CALLERID(name)=CCCHH,CALLERID(number)=940) | + | ;exten => _!,1,Set(CALLERID(name)=CCCHH,CALLERID(number)=940) |
− | exten => _!, | + | exten => _!,1,Goto(switch_${SWITCHTO},${EXTEN},1) |
+ | |||
+ | |||
+ | [tochaos_sip] | ||
+ | exten => s,1,Set(TIMEOUT(digit)=3) | ||
+ | exten => s,n,WaitExten | ||
+ | |||
+ | include => catchall | ||
+ | |||
+ | ;exten => _X.,1,Set(CALLERID(name)=CCCHH,CALLERID(number)=940) | ||
+ | exten => _X.,1,Dial(SIP/${SWITCHTO}/${EXTEN},,T) | ||
;; IAX-Switches | ;; IAX-Switches | ||
− | [switch_ccchh] | + | ;[switch_ccchh] |
− | exten => s,1, | + | ;exten => s,1,WaitExten |
− | ;; | + | ;;; |
− | ;; manchmal tritt ein merkwürdiges Phänomen auf: | + | ;;; manchmal tritt ein merkwürdiges Phänomen auf: |
− | ;; wir bekommen die komplette Durchwahl inkl. 9X in diesem Context | + | ;;; wir bekommen die komplette Durchwahl inkl. 9X in diesem Context |
− | exten => _94.,1,Set(EXTEN=${EXTEN:2}) | + | ;exten => _94.,1,Set(EXTEN=${EXTEN:2}) |
− | ;; | + | ;;; |
− | switch => IAX2/ccchh | + | ;switch => IAX2/ccchh:[ccchh]@ccchh |
[switch_packbartvpnhome] | [switch_packbartvpnhome] | ||
− | exten => | + | exten => h,1,Hangup |
− | + | switch => IAX2/ccchh:[ccchh]@packbartvpnhome | |
− | switch => IAX2/ | + | |
+ | [switch_alivpnlardass] | ||
+ | switch => IAX2/ccchh:[ccchh]@alivpnlardass | ||
+ | |||
+ | [switch_metarheinmain] | ||
+ | switch => IAX2/ccchh:[ccchh]@metarheinmain | ||
</pre> | </pre> | ||
Revision as of 01:48, 11 March 2006
Contents
Hilfreiche Doku
Asterisk und misdn unter Debian
Software, Treiber
- Debian Stable/Sarge, mit Addons von Haegar/debian.sdinet.de
- Linux 2.6.15 aus Haegars Tree (svn, 2.6.15.1+ubuntu+sdinet6)
- misdn-Treiber so wie im Kernel vorhanden
misdn Konfiguration
/etc/misdn_init.conf
# # Configuration file for your misdn hardware # # Usage: /etc/init.d/misdn-init start|stop|restart|config|scan|help # # # Card Settings # card=1,hfcpci card=2,hfcpci # # Port settings # # Syntax: <port_type>=<port_number>[,<port_number>...] # # <port_type> te_ptp - TE-Mode, PTP # te_ptmp - TE-Mode, PTMP # nt_ptp - NT-Mode, PTP # nt_ptmp - NT-Mode, PTMP # <port_number> port that should be considered # # Karte 1 (unten) extern = PTP, TE-Modus te_ptp=1 # Karte 2 (oben) intern = PTMP, NT-Modus nt_ptmp=2 # # Port Options # # keine ...
/etc/asterisk/misdn.conf
[general] debug=4 method=standard tracefile=/var/log/misdn.trace appnd_digits2exten=yes bridging=no [default] context=pbx-trunk language=de nationalprefix=0 internationalprefix=00 rxgain=0 txgain=0 dialplan=0 ; interner ISDN-Bus (PTMP = Mehrgeraeteanschluss) [internal1] context=pbx-trunk ports=2 msn=* ; externer ISDN-Bus (PTP = Anlagenanschluss) [wall] context=wall-trunk ports=1 msn=*
Nebenstellenfreizeichen mit misdn
Das von chan_misdn erzeugte Freizeichen ist in isdn_lib.c hardkodiert. Ich habe folgenden Patch geschrieben, der ein Nebenstellenfreizeichen (drei kurze Töne, Pause) erzeugt. -- packbart 16:27, 20 Feb 2006 (CET)
--- isdn_lib.c 2005-12-02 16:15:56.000000000 +0100 +++ isdn_lib.c 2006-02-15 04:07:51.000000000 +0100 @@ -148,6 +148,13 @@ #define TONE_BUSY_CNT 20 /* ? */ #define TONE_BUSY_SILENCE_CNT 48 /* ? */ +#define TONE_DIAL_CNT 7 +#define TONE_DIAL_SILENCE_CNT 14 +#define TONE_DIAL_CNT2 21 +#define TONE_DIAL_SILENCE_CNT2 28 +#define TONE_DIAL_CNT3 35 +#define TONE_DIAL_SILENCE_CNT3 77 + static int entity; static struct misdn_lib *glob_mgr; @@ -1800,17 +1807,23 @@ switch(bc->tone) { case TONE_DIAL: - { - frm->len = TONE_425_SIZE; - memcpy(&buf[mISDN_HEADER_LEN], tone_425_flip,TONE_425_SIZE); - - r=mISDN_write(stack->midev, buf, frm->len + mISDN_HEADER_LEN, TIMEOUT_1SEC); - if (r<frm->len) { - perror("Error written less than told bytes :(\n"); + bc->tone_cnt2++; + + if ((bc->tone_cnt2 <= TONE_DIAL_CNT) || (bc->tone_cnt2 > TONE_DIAL_SILENCE_CNT && bc->tone_cnt2 <= TONE_DIAL_CNT2) || (bc->tone_cnt2 > TONE_DIAL_SILENCE_CNT2 && bc->tone_cnt2 <= TONE_DIAL_CNT3)) { + frm->len = TONE_425_SIZE; + memcpy(&buf[mISDN_HEADER_LEN], tone_425_flip,TONE_425_SIZE); + r=mISDN_write(stack->midev, buf, frm->len + mISDN_HEADER_LEN, TIMEOUT_1SEC); + if (r<frm->len) { + perror("Error written less than told bytes :(\n"); + } + } else if ((bc->tone_cnt2 <= TONE_DIAL_SILENCE_CNT) || (bc->tone_cnt2 > TONE_DIAL_CNT2 && bc->tone_cnt2 <= TONE_DIAL_SILENCE_CNT2) || (bc->tone_cnt2 > TONE_DIAL_CNT3 && bc->tone_cnt2 <= TONE_DIAL_SILENCE_CNT3)) { + frm->len = TONE_SILENCE_SIZE; + memcpy(&buf[mISDN_HEADER_LEN], tone_silence_flip ,TONE_SILENCE_SIZE); + r=mISDN_write(stack->midev, buf, frm->len + mISDN_HEADER_LEN, TIMEOUT_1SEC); + } else { + bc->tone_cnt2=-1; } - } - break;- + break; case TONE_ALERTING: bc->tone_cnt2++;
Asterisk Konfiguration
/etc/asterisk/extensions.conf
;; ;; vermittlung.hamburg.ccc.de ;; $Id$ ;; ;; ;; TODO: ;; - MeetMe funktioniert nur mit Zaptel-Timer ;; - ztdummy installieren ;; - Voicemail richten ;; - stdexten Macro ;; - chaosfon-dialout ;; - Verbindungen ueber das VPN ausbauen ;; [general] ;; ;; http://www.voip-info.org/wiki/index.php?page=Asterisk+Dialplan+General ;; static=yes writeprotect=yes autofallthrough=yes clearglobalvars=yes priorityjumping=no [globals] ;; ;; http://www.voip-info.org/wiki/index.php?page=Asterisk+Dialplan+Globals ;; ;; Gruppenrufe ;; Folgendes funktioniert nicht ganz, da wir intern nur 2 B-Kanaele haben ;; Wir koennten auf der DECT-Anlage einen Gruppenruf einrichten ;ZENTRALE_EXTERN=Local/office-isdn@phones&Local/office-dect@phones&SIP/zentrale ;ZENTRALE_INTERN=Local/office-isdn@phones&Local/office-dect@phones&Local/packbart@phones&Local/alx@phones&Local/pirx@phones&Local/ali@phones&Local/bayer@phones ; -23 klingelt auch auf -26 und -27: ZENTRALE_EXTERN=Local/office-isdn@phones ZENTRALE_INTERN=Local/office-isdn@phones&SIP/zentrale&Local/packbarthome@phones ZENTRALE_INTERN2=Local/office-isdn@phones&SIP/zentrale&Local/packbart@phones&Local/alx@phones&Local/pirx@phones&Local/ali@phones ZENTRALE_MAILBOX=800@default PRESSE=Local/ali@phones PRESSE2=Local/ali@phones ;PRESSE2=Local/ali@phones&misdn/g:wall/<somewhereelse> PRESSE_MAILBOX=601@default ;KASSE=Local/bayer@phones ;; FreeWorldDialup Account FWDNUMBER=714542 FWDCIDNAME=ccchh ;; Passwort fuer Amtsholung aus dem VPN DIALOUTPW=2423 ;; ISDN_WALL=misdn/g:wall ISDN_INTERNAL=misdn/g:internal1 ;; ;; Eingehende Verbindungen ;; [wall-trunk] ;; ;; Anrufe von aussen ;; include => catchall exten => 4018010,1,Goto(phones,zentrale,extern) ;; Zentrale ueber -800 abfangen ;exten => 401801800,1,Goto(phones,zentrale,extern) ;; Wir haben hier noch ein Problem: ;; Rufe kommen erst an der Anlage an, wenn 401801X gewaehlt wurde und ;; erreichen niemals die s Extension. Bei langsam waehlenden Telefonen ;; springt das Goto zu kurz. exten => _401801!,1,GotoIf($["${EXTEN:6}" != ""]?extensions,${EXTEN:6},1:extensions,s,1) ;; Wir braeuchten ein "include" mit Praefix ;include => extensions ;; oder einen [extensions-wall] Kontext ;include => extensions-wall [pbx-trunk] ;; ;; Anrufe von innen ;; include => catchall include => dialout include => extensions [vpn-trunk] ;; ;; Anrufe aus dem VPN ;; ohne Dialout ;; ;; Klappt leider nicht so, wie es soll und verschluckt ;; manchmal eine Ziffer: ;exten => s,1,Background(chaosvpn_hamburg_willkommen) exten => s,1,NoOp exten => i,1,Answer exten => i,n,Playback(chaosvpn_hamburg_hamwanich) exten => i,n,PlayTones(info) exten => i,n,Hangup exten => 0,1,Goto(phones,zentrale,intern) exten => zentrale,1,Goto(phones,zentrale,intern) include => catchall include => extensions ;; Todo: Einen [named-extensions] o.ae. ([extensions-named?]) context anlegen, um ;; genauer definieren zu koennen, welche Namen erreichbar sind. ;; ;; Alle Namen aus [phones] sind erreichbar include => phones [vpn-trunk-dialout] ;; ;; Anrufe aus dem VPN ;; mit Dialout ;; ;; Dialout via ISDN ;; Todo: 110 + 112 + die ueblichen Verdaechtigen sperren exten => _10!,1,Authenticate(${DIALOUTPW}) exten => _10!,n,GotoIf($["${EXTEN:2}" != ""]?dialout-isdn,${EXTEN:2},1:dialout-isdn,s,1) include => vpn-trunk include => dialout [sip-trunk] ;; ;; Anrufe an SIP/irgendwer@hamburg.ccc.de ;; ohne Dialout ;; exten => i,1,Answer exten => i,n,Playback(chaosvpn_hamburg_hamwanich) exten => i,n,PlayTones(info) exten => i,n,Hangup exten => 0,1,Goto(phones,zentrale,extern) include => catchall include => extensions ;; Todo: Einen [named-extensions] o.ae. context anlegen, um ;; genauer definieren zu koennen, welche Namen erreichbar sind. ;; ;; Alle Namen aus [phones] sind erreichbar include => phones [fromiaxfwd] ;; ;; Eingehender Anruf ueber FreeWorldDialup ;; exten => ${FWDNUMBER},1,Goto(phones,zentrale,extern) include => catchall [guest] ;; ;; Eingehende IAX-Verbindungen unbekannter Peers ;; exten => i,1,Answer exten => i,n,Playback(chaosvpn_hamburg_hamwanich) exten => i,n,PlayTones(info) exten => i,n,Hangup exten => 0,1,Goto(phones,zentrale,extern) include => catchall include => extensions ;; Todo: Einen [named-extensions] o.ae. context anlegen, um ;; genauer definieren zu koennen, welche Namen erreichbar sind. ;; ;; Alle Namen aus [phones] sind erreichbar include => phones ;; ;; ;; [extensions] ;; ;; allgemeine Durchwahlen. Von aussen, innen und uebers Internet/VPN erreichbar ;; http://wiki.hamburg.ccc.de/index.php/VOIP:Durchwahlen ;; ; * 1 ; * 2 exten => 23,1,Goto(phones,office-isdn,1) exten => 26,1,Goto(phones,office-dect,1) ; * 3 ;; alte Voicebox - Nummer aufheben ;exten => 31,1,NoOp ; * 4 Funktionsbereich offizielle Clubnummern exten => 40,1,SetVar(EMAIL=mail@ccc.de) exten => 40,n,Goto(mailfax,${EXTEN},1) ;exten => 41,1,Goto(phones,papierfax,1) !!!! Abgeklemmt solange das Fax abgeklemmt ist !!! exten => 41,1,SetVar(EMAIL=office@ccc.de) exten => 41,n,Goto(mailfax,${EXTEN},1) exten => 42,1,SetVar(EMAIL=mail@ccc.de) exten => 42,n,Goto(mailfax,${EXTEN},1) exten => 4300,1,Goto(phones,chaosfon,1) exten => 43010,1,Goto(phones,chaosfon-logout,1) exten => 43011,1,Goto(phones,chaosfon-login,1) exten => 4601,1,Goto(phones,presse,1) exten => 4666,1,Goto(phones,frollein,1) ; * 5 Funktionsbereich Faxnummern exten => 50,1,SetVar(EMAIL=mail@hamburg.ccc.de) exten => 50,n,Goto(mailfax,${EXTEN},1) exten => 51,1,SetVar(EMAIL=zahlstelle@ccc.de) exten => 51,n,Goto(mailfax,${EXTEN},1) exten => 52,1,SetVar(EMAIL=vorstand@ccc.de) exten => 52,n,Goto(mailfax,${EXTEN},1) exten => 53,1,SetVar(EMAIL=pressesprecher@ccc.de) exten => 53,n,Goto(mailfax,${EXTEN},1) exten => 54,1,SetVar(EMAIL=ds@ccc.de) exten => 54,n,Goto(mailfax,${EXTEN},1) exten => 55,1,SetVar(EMAIL=anonymizer@ccc.de) exten => 55,n,Goto(mailfax,${EXTEN},1) exten => 5601,1,SetVar(EMAIL=presse@hamburg.ccc.de) exten => 5601,n,Goto(mailfax,${EXTEN},1) exten => 5666,1,SetVar(EMAIL=frollein@vermittlung.hamburg.ccc.de) exten => 5666,n,Goto(mailfax,${EXTEN},1) exten => 57,1,SetVar(EMAIL=packbart@hamburg.ccc.de) exten => 57,n,Goto(mailfax,${EXTEN},1) ;; 58xx den Nummern von 8xx anpassen exten => 5801,1,SetVar(EMAIL=bayer@hamburg.ccc.de) exten => 5801,n,Goto(mailfax,${EXTEN},1) ; * 6 Funktionsbereich Voicemail exten => 6000,1,VoiceMailMain() exten => 6000,n,Hangup() ;; 61XXX fuer Erweiterungen? ;; 6NXX den Nummern von 8xx anpassen ;; (827 -> alx, 828 -> packbart, etc.) exten => _6NXX,1,Voicemail(${EXTEN:1}@default) exten => _6NXX,n,Hangup() ; * 7 Funktionsbereich Verschiedenes/Spielzeuge ; ** 71 Konferenz exten => 7100,1,MeetMe(${EXTEN:2}) exten => _711XX,1,MeetMe(${EXTEN:3}) exten => _71NX,1,MeetMe(${EXTEN:2}) ; ** 7701 Spielzeug: Labyrinth ueber IAX - klickstu http://www.astrastudio.de/ exten => 7701,1,Dial(IAX2/home.astrastudio.de/2088@default) exten => 7701,2,Hangup ; ** 78 Streams exten => 7806,1,Answer exten => 7806,n,Goto(phones,stream-nerdsonair,orange) exten => 7807,1,Answer exten => 7807,n,Goto(phones,stream-cradar,radiodarmstadt) exten => 7901,1,Macro(echotest) ; * 8 Funktionsbereich Mitgliedertelefone exten => 800,1,Goto(phones,zentrale,intern) ;; Alx exten => 827,1,Goto(phones,alx,1) ;; vorruebergehend noch die -27 [spaetestens 2006-03 raus] exten => 27,1,Goto(phones,alx,1) ;; ;; Ali exten => 877,1,Goto(phones,ali,1) exten => _877X!,1,Set(SWITCHTO=alivpnlardass) exten => _877X!,n,Goto(tochaos_iax,${EXTEN:3},1) ;; Hauke exten => _828,1,Goto(phones,packbart,1) ;; ohne TIMEOUT(digit) tut das nicht ohne Blockwahl: exten => _828X!,1,Set(SWITCHTO=packbartvpnhome) exten => _828X!,n,Goto(tochaos_iax,${EXTEN:3},1) exten => 829,1,Answer exten => 829,n,MusicOnHold(chaosmix) ;exten => 829,1,Dial(IAX2/packbart@openchaos.org) ;exten => 829,1,Dial(SIP/packbart@openchaos.org) exten => _829!,1,Set(SWITCHTO=packbartvpnhome) exten => _829!,n,GotoIf($["$["${EXTEN:3}" != ""]" != ""]?tochaos_iax,${EXTEN:3},1:tochaos_iax,s,1) ;; Bayer exten => _830,1,Goto(phones,bayer,1) ; * 9 Funktionsbereich Chaos-VPN ;exten => _92!,1,Set(SWITCHTO=cccc) ;exten => _92!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) ;exten => _93!,1,Set(SWITCHTO=cccb) ;exten => _93!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) ;exten => _94!,1,Set(SWITCHTO=ccchh) ;exten => _94!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) exten => _96!,1,Set(SWITCHTO=metarheinmain) exten => _96!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_sip,${EXTEN:2},1:tochaos_sip,s,1) ;exten => _96!,n,GotoIf($["${EXTEN:2}" != ""]?tochaos_iax,${EXTEN:2},1:tochaos_iax,s,1) include => catchall ;; ;; ;; [phones] ;; ;; Benamste Rufempfaenger (Funktionen, Telefone, Personen, Dinge) ;; ;; ;; Zentrale ;; ;; Diese Prio sollten eigentlich nur SIP- und IAX-Anrufe ;; an "zentrale" erreichen. Behandeln wie extern. exten => zentrale,1,Goto(extern) ;; Zentrale von aussen: 20s Office klingen lassen, dann abwimmeln exten => zentrale,n(extern),Dial(${ZENTRALE_EXTERN},20,t) exten => zentrale,n,Playback(cccansage) exten => zentrale,n,Hangup ;; Zentrale von innen/aus dem VPN: 20s Office klingeln lassen, ;; dann 35s Office + Mitglieder anklingeln, dann Voicemail exten => zentrale,n(intern),Dial(${ZENTRALE_INTERN},20,t) exten => zentrale,n,Dial(${ZENTRALE_INTERN2},35,t) exten => zentrale,n,Voicemail(${ZENTRALE_MAILBOX}) exten => zentrale,n,Hangup ;; Zentrale ueber 0700-CHAOSFON: Office klingeln lassen, ;; keine eigene Voicemail exten => zentrale,n(chaosfon),Dial(${ZENTRALE_EXTERN}) exten => zentrale,n,Hangup ;; ;; Pressefon ;; exten => presse,1,Dial(${PRESSE},20,t) exten => presse,n,Dial(${PRESSE2},20,t) exten => presse,n,Voicemail(${PRESSE_MAILBOX}) exten => presse,n,Hangup ;; ;; 0700-CHAOSFON ;; exten => chaosfon,1,Goto(chaosfon-menue,s,1) ;debug: exten => chaosfon-login,1,AgentCallbackLogin(,,${CALLERIDNUM}@chaosfon-dialout) exten => chaosfon-logout,1,AgentCallbackLogin(,,@chaosfon-dialout) ; ;; ;; 0900-CHAOSFON ;; ;; I dare to dream ;exten => windowssupport,1,Answer ;exten => windowssupport,n,SetMusicOnHold(cashcows) ;exten => windowssupport,n,Background(cashcows-welcome) ;exten => windowssupport,n,Queue(cashcows) ;exten => windowssupport,n,Hangup ;; ;; Telefone ;; exten => office-isdn,1,Dial(misdn/g:internal1/23) exten => office-dect,1,Dial(misdn/g:internal1/26) exten => papierfax,1,Dial(misdn/g:internal1/41) ;; ;; Loide ;; ;; packbart: 45s DECT + daheim + SIP klingen lassen, dann Voicemail exten => packbart,1,Dial(misdn/g:internal1/28&IAX2/packbartvpnhome/0&SIP/packbart,45) exten => packbart,n,Voicemail(828@default) exten => packbart,n,Hangup exten => packbarthome,1,Dial(IAX2/packbartvpnhome/0) ;; Alx: 45s DECT, dann Voicemail exten => alx,1,Dial(misdn/g:internal1/27,45) exten => alx,n,Voicemail(827@default) exten => alx,n,Hangup ;; Ali: 45s daheim + SIP klingen lassen, dann Voicemail exten => ali,1,Dial(IAX2/alivpnlardass/88177799) ;exten => ali,1,Dial(IAX2/alivpnlardass/88177799&SIP/ali,45) exten => ali,n,Voicemail(666@default) exten => ali,n,Hangup ;; Bayer: Siemens-Support anrufen ; das macht er bitte von zuhause oder wo auch immer aus! ; der club hat kein geld ;exten => bayer,1,Dial(misdn/g:wall/082472810) ;exten => bayer,n,Hangup ;; ;; Dinge ;; ;exten => stream-chaosradio,1,Answer ;exten => stream-chaosradio,n(vishnu),MP3Player(http://vishnu.netfilter.org:2342/chaosradio-lq.mp3) ;exten => stream-chaosradio,n,Hangup exten => stream-nerdsonair,1,Answer exten => stream-nerdsonair,n(orange),MP3Player(http://orange-01.live.sil.at:8000/) exten => stream-nerdsonair,n,Hangup exten => stream-cradar,1,Answer exten => stream-cradar,n(radiodarmstadt),MP3Player(http://213.202.240.45:8000/) exten => stream-cradar,n,Hangup exten => echotest,1,Macro(echotest) ;; ;; Konferenzen ;; exten => freifunken,1,MeetMe(1201,cds) exten => freifunken,n,Playback(vm-goodbye) exten => freifunken,n,Hangup include => catchall ;; ;; Abgehende Verbindungen ;; [dialout] ;; ;; Anwahl nach aussen ueber verschiedene Provider ;; ;; Dialout via ISDN exten => _0!,1,GotoIf($["${EXTEN:1}" != ""]?dialout-isdn,${EXTEN:1},1:dialout-isdn,s,1) ;; Dialout via ChaosVPN exten => _10!,1,GotoIf($["${EXTEN:2}" != ""]?dialout-chaosvpn,${EXTEN:2},1:dialout-chaosvpn,s,1) ;; Dialout via FreeWorldDialup exten => _12!,1,GotoIf($["${EXTEN:2}" != ""]?dialout-iaxfwd,${EXTEN:2},1:dialout-iaxfwd,s,1) [dialout-isdn] ;; ;; misdn/g:wall ;; exten => s,1,ChanIsAvail(misdn/g:wall,j) exten => s,n,PlayTones(dial) exten => s,n,WaitExten exten => s,102,Playback(all-circuits-busy) exten => s,n,PlayTones(congestion) exten => s,n,Congestion exten => _X!.,1,ChanIsAvail(misdn/g:wall,j) exten => _X!.,n,StopPlayTones exten => _X!.,n,Dial(misdn/g:wall/${EXTEN},,T) exten => _X!.,102,Playback(all-circuits-busy) exten => _X!.,n,PlayTones(congestion) exten => _X!.,n,Congestion include => catchall [dialout-chaosvpn] ;; ;; IAX2/fnord - Baustelle, noch nicht fertig ;; ;exten => s,1,ChanIsAvail(IAX2/packbartvpnhome,j) ;exten => s,n,PlayTones(dial) ;exten => s,n,WaitExten ;exten => s,102,Playback(all-circuits-busy) ;exten => s,n,PlayTones(congestion) ;exten => s,n,Congestion exten => _!.,1,ChanIsAvail(IAX2/packbartvpnhome,j) exten => _!.,n,StopPlayTones exten => _!.,n,Dial(IAX2/packbartvpnhome/10${EXTEN},,T) exten => _!.,102,Playback(all-circuits-busy) exten => _!.,n,PlayTones(congestion) exten => _!.,n,Congestion include => catchall [dialout-iaxfwd] ;; ;; IAX2/iaxfwd (FreeWorldDialup) ;; exten => s,1,ChanIsAvail(IAX2/iaxfwd,j) exten => s,n,Set(TIMEOUT(digit)=3) ;exten => s,n,PlayTones(dial) exten => s,n,WaitExten exten => s,102,Playback(all-circuits-busy) exten => s,n,PlayTones(congestion) exten => s,n,Congestion exten => _X.,1,ChanIsAvail(IAX2/iaxfwd,j) exten => _X.,n,StopPlayTones exten => _X.,n,Set(CALLERID(name)=${FWDCIDNAME},CALLERID(number)=${FWDNUMBER}) exten => _X.,n,Dial(IAX2/iaxfwd/${EXTEN}) exten => _X.,102,Playback(all-circuits-busy) exten => _X.,n,PlayTones(congestion) exten => _X.,n,Congestion include => catchall ;; ;; 0700-CHAOSFON ;; [chaosfon-menue] ;; ;; Startmenue ;; ;; ;; s: Intro und Menue ;; exten => s,1,Answer exten => s,n,Background(chaosfon_menue_intro) exten => s,n(menue),Set(heard_menu=yes) exten => s,n,Background(chaosfon_menue_dienste) exten => s,n,Background(chaosfon_menue_auswahl) exten => s,n,Background(chaosfon_bitte_waehlen) exten => s,n,WaitExten ;; ;; 0: Ansage wiederholen ;; exten => 0,1,Goto(s,menue) ;; ;; 1: Hackerethik ;; exten => 1,1,Wait(0.5) exten => 1,n,Playback(chaosfon_hackerethik) exten => 1,n,Wait(2) exten => 1,n,Goto(s,menue) ;; ;; 2: Allgemeine Anfragen ;; - ~45s Anwahlversuch ;; - dann Voicemail ;; exten => 2,1,Wait(0.5) exten => 2,n,Playback(chaosfon_allgemein) exten => 2,n,Playback(chaosfon_voicemail) exten => 2,n,Playback(chaosfon_dialout) exten => 2,n,Queue(chaosfon-allgemein,tn) exten => 2,n,Playback(chaosfon_vm-intro) exten => 2,n,Voicemail(s02@chaosfon-voicemail) exten => 2,n,Wait(2) exten => 2,n,Goto(s,menue) ;; ;; 3: Presse ;; - ~45s Anwahlversuch ;; - dann Voicemail ;; exten => 3,1,Wait(0.5) exten => 3,n,Playback(chaosfon_presse) exten => 3,n,Playback(chaosfon_dialout2) exten => 3,n,Playback(chaosfon_voicemail2) exten => 3,n,Queue(chaosfon-presse,tn) exten => 3,n,Playback(chaosfon_vm-intro) exten => 3,n,Voicemail(s03@chaosfon-voicemail) exten => 3,n,Wait(2) exten => 3,n,Goto(s,menue) ;; ;; 4: Erfakreis-Menue ;; exten => 4,1,Wait(0.5) exten => 4,n,Goto(chaosfon-erfas,s,1) exten => 4,n,Wait(2) exten => 4,n,Goto(s,menue) ;; ;; 5: Datenschleuder ;; - gleich Voicemail ;; exten => 5,1,Wait(0.5) exten => 5,n,Playback(chaosfon_datenschleuder) exten => 5,n,Voicemail(s05@chaosfon-voicemail) exten => 5,n,Wait(2) exten => 5,n,Goto(s,menue) ;; ;; 6: Office ;; - nur Ansage ;; exten => 6,1,Wait(0.5) exten => 6,n,Playback(chaosfon_office) exten => 6,n,Wait(2) exten => 6,n,Goto(s,menue) ;; ;; *: Voicemailabfrage ;; exten => *,1,VoiceMailMain(@chaosfon-voicemail) exten => *,n,Wait(2) exten => *,n,Goto(s,menue) ;; ;; #: Ausgang ;; exten => #,1,Hangup include => chaosfon-catchall [chaosfon-erfas] ;; ;; Erfakreis-Durchwahlmenue ;; ;; ;; s: Intro und Menue ;; exten => s,1,Answer exten => s,n(menue),Set(heard_menu=yes) exten => s,n,Background(chaosfon_erfas_start) exten => s,n,Background(chaosfon_erfas_auswahl) exten => s,n,Background(chaosfon_bitte_waehlen) exten => s,n,WaitExten ;; ;; 0: Ansage wiederholen ;; exten => 0,1,Goto(s,menue) ;; ;; Durchwahlen & Voicemail fuer Erfas ;; exten => 10,1,Macro(chaosfon-call,10,hamburg) exten => 10,n,Wait(2) exten => 10,n,Goto(s,menue) exten => 11,1,Macro(chaosfon-call,11,berlin) exten => 11,n,Wait(2) exten => 11,n,Goto(s,menue) exten => 12,1,Macro(chaosfon-call,12,koeln) exten => 12,n,Wait(2) exten => 12,n,Goto(s,menue) exten => 13,1,Macro(chaosfon-call,13,bielefeld) exten => 13,n,Wait(2) exten => 13,n,Goto(s,menue) exten => 14,1,Macro(chaosfon-call,14,dresden) exten => 14,n,Wait(2) exten => 14,n,Goto(s,menue) exten => 15,1,Macro(chaosfon-call,15,erlangen) exten => 15,n,Wait(2) exten => 15,n,Goto(s,menue) exten => 16,1,Macro(chaosfon-call,16,karlsruhe) exten => 16,n,Wait(2) exten => 16,n,Goto(s,menue) exten => 17,1,Macro(chaosfon-call,17,hannover) exten => 17,n,Wait(2) exten => 17,n,Goto(s,menue) exten => 18,1,Macro(chaosfon-call,18,ulm) exten => 18,n,Wait(2) exten => 18,n,Goto(s,menue) exten => 19,1,Macro(chaosfon-call,19,wien) exten => 19,n,Wait(2) exten => 19,n,Goto(s,menue) ;; ;; *: Voicemailabfrage ;; exten => *,1,VoiceMailMain(@chaosfon-voicemail) exten => *,n,Wait(2) exten => *,n,Goto(s,menue) ;; ;; #: Zurueck ins Hauptmenue ;; exten => #,1,Goto(chaosfon-menue,s,menue) include => chaosfon-catchall [macro-chaosfon-call] ;; ;; - ~45s Anwahlversuch ;; - dann Voicemail ;; - kein Hangup! ;; ;; ARG1: Voicemail-Nummer ;; ARG2: Ziel fuer Dial() @chaosfon-dialout ;; ;; TODO: - Queues fuer Erfas? exten => s,1,Answer exten => s,n,Playback(chaosfon_dialout2) exten => s,n,Playback(chaosfon_voicemail) ;exten => s,n,Dial(Local/${ARG2}@chaosfon-dialout,45,htm(chaosmix)A(chaosfon_anruf)) exten => s,n,Dial(Local/${ARG2}@chaosfon-dialout,45,htm(chaosmix)) exten => s,n,Playback(chaosfon_vm-intro) exten => s,n,Voicemail(s${ARG1}@chaosfon-voicemail) [chaosfon-catchall] ;; ;; Falsche Eingabe: zurueck zum Start des jeweiligen Menues ;; exten => i,1,Background(invalid) exten => i,n,Wait(2) exten => i,n,Goto(s,menue) ;; ;; Timeout: Abwechselnd "Bitte waehlen" und Menue ;; TODO: Das Menue zweimal ansagen, dann auflegen ;; exten => t,1,GotoIf($["${heard_menu}" != "yes"]?s,menue) exten => t,n,Set(heard_menu=no) exten => t,n,Background(chaosfon_bitte_waehlen) exten => t,n,WaitExten [chaosfon-dialout] ;; ;; Nummern fuer Weiterleitung an Erfas und Callback-Logins ;; z.Zt. noch Baustelle ;; TODO: ergaenzen und absichern ;; exten => 800,1,Goto(phones,zentrale,chaosfon) ;exten => 827,1,Goto(phones,alx,chaosfon) ;exten => 828,1,Goto(phones,packbart,chaosfon) ;exten => 877,1,Goto(phones,ali,chaosfon) exten => 04041165291,1,Goto(dialout-isdn,${EXTEN},1) exten => 04024828724,1,Goto(dialout-isdn,${EXTEN},1) exten => _829!,1,Set(SWITCHTO=packbartvpnhome) exten => _829!,n,GotoIf($["$["${EXTEN:3}" != ""]" != ""]?tochaos_iax,${EXTEN:3},1:tochaos_iax,s,1) exten => 920,1,Goto(koeln,1) exten => 930,1,Goto(berlin,1) exten => 940,1,Goto(hamburg,1) exten => hamburg,1,Goto(phones,zentrale,chaosfon) ;; ;; Utils ;; [macro-echotest] ;; ;; Der beliebte Echotest ;; exten => s,1,Playback(tt-weasels) exten => s,2,Playback(demo-echotest) exten => s,3,Echo exten => s,4,Playback(demo-echodone) exten => s,5,Hangup [mailfax] ;; ;; Fax2Mail mit OCR ;; exten => _X.,1,SetVar(CALLEDFAX=${EXTEN}) exten => _X.,2,Answer exten => _X.,3,SetVar(FAXFILE=/var/spool/asterisk/fax/${CALLEDFAX}-${CALLERIDNUM}-${UNIQUEID}) exten => _X.,4,rxfax(${FAXFILE}.tif) exten => h,1,system(/usr/local/bin/mailfax "${FAXFILE}" "${EMAIL}" "${CALLERIDNUM}" "${CALLEDFAX}") include => catchall [mailfax_fancy] ;; ;; Fax2Mail mit OCR ;; Baustelle fuer Erweiterungen ;; exten => _X.,1,SetVar(CALLEDFAX=${EXTEN}) exten => _X.,2,Answer exten => _X.,3,SetVar(FAXFILE=/var/spool/asterisk/fax/${CALLEDFAX}-${CALLERIDNUM}-${UNIQUEID}) exten => _X.,4,rxfax(${FAXFILE}.tif) exten => h,1,system(/usr/local/bin/mailfax_fancy ${FAXFILE} ${EMAIL} ${CALLERIDNUM} ${CALLEDFAX}) include => catchall [catchall] ;; ;; Extensions, die in keinem Kontext fehlen sollten ;; exten => s,1,NoOp exten => h,1,Hangup exten => i,1,PlayTones(!950/330,!1400/330,!1800/330,0) exten => i,2,Hangup exten => t,1,PlayTones(!950/330,!1400/330,!1800/330,0) exten => t,2,Hangup ;; ;; Noch unsortierter Krams, Baustelle fuer VPN ;; [tochaos_iax] ;exten => _!,1,Set(CALLERID(name)=CCCHH,CALLERID(number)=940) exten => _!,1,Goto(switch_${SWITCHTO},${EXTEN},1) [tochaos_sip] exten => s,1,Set(TIMEOUT(digit)=3) exten => s,n,WaitExten include => catchall ;exten => _X.,1,Set(CALLERID(name)=CCCHH,CALLERID(number)=940) exten => _X.,1,Dial(SIP/${SWITCHTO}/${EXTEN},,T) ;; IAX-Switches ;[switch_ccchh] ;exten => s,1,WaitExten ;;; ;;; manchmal tritt ein merkwürdiges Phänomen auf: ;;; wir bekommen die komplette Durchwahl inkl. 9X in diesem Context ;exten => _94.,1,Set(EXTEN=${EXTEN:2}) ;;; ;switch => IAX2/ccchh:[ccchh]@ccchh [switch_packbartvpnhome] exten => h,1,Hangup switch => IAX2/ccchh:[ccchh]@packbartvpnhome [switch_alivpnlardass] switch => IAX2/ccchh:[ccchh]@alivpnlardass [switch_metarheinmain] switch => IAX2/ccchh:[ccchh]@metarheinmain
/etc/asterisk/modules.conf
[modules] autoload=yes noload => pbx_gtkconsole.so noload => pbx_kdeconsole.so noload => app_intercom.so noload => chan_alsa.so ;load => chan_modem.so ; pirx: res_features vor chan_misdn laden (vgl. http://www.voip-info.org/wiki-Asterisk+mISDN+channels) load => res_features.so load => chan_misdn.so load => res_musiconhold.so ; pirx: app_rxfax, app_txfax sind manuell zu installieren (s.u.) load => app_txfax.so load => app_rxfax.so [global] ;chan_modem.so=yes chan_msidn.so=yes
Fax
libtiff
Vor allen Weiterungen benötgen wir libtiff 3.7.1 (neue Versionen sollen teilweise nicht richtig funktioneren).
wget ftp://ftp.remotesensing.org/pub/libtiff/old/tiff-3.7.1.tar.gz tar xvfz tiff-3.7.1.tar.gz cd tiff-3.7.1 ./configure --prefix=/usr make make install
spandsp
Zur Faxkonfiguration wird zunächst spandsp benötigt [[1]].
wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre23/spandsp-0.0.2pre23.tar.gz ./configure --prefix=/usr make make install
Asterisk Applikationen
cd /usr/src/asterisk/apps wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre23/asterisk-1.2.x/app_rxfax.c wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre23/asterisk-1.2.x/app_txfax.c wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre23/asterisk-1.2.x/apps_Makefile.patch patch -p0 < apps_Makefile.patch cd .. make make install