100 lines
3.3 KiB
Django/Jinja
100 lines
3.3 KiB
Django/Jinja
; Call routing
|
|
; see https://github.com/eventphone/yate/blob/master/conf.d/regexroute.conf.sample
|
|
|
|
[priorities]
|
|
; route: int: Priority of the routing message handler
|
|
route=90
|
|
|
|
[contexts]
|
|
; INBOUND CALLS:
|
|
${called}^1337$=inbound_fux
|
|
${called}^1008$=inbound_epvpn
|
|
${called}^04023830150$=inbound_fonial
|
|
${called}^fo370381tr317349_00$=inbound_fonial
|
|
;${called}.*=inbound
|
|
|
|
;^[0-9]\{4\}$=inbound ; Calls from 4 digit numbers: EPVPN
|
|
;^+\?[0-9]\{5,\}$=inbound ; Calls from longer numbers, optionally starting with +
|
|
;^*\{1,2\}[0-9]\{1,3\}$=inbound ; Internal fritzbox calls
|
|
|
|
; OUTBOUND CALLS:
|
|
^[0-9]\{3\}=outbound
|
|
^[a-z0-9]\{4,\}=outbound ; calls from internal users
|
|
|
|
^.*$=fallback ; Whatever calls managed to not be handled yet
|
|
|
|
[default] ; unused
|
|
^.*$=echo [default]"\0"
|
|
|
|
[test] ; unused
|
|
^.*$=echo [test] "\0"
|
|
^99991001$=tone/dial
|
|
^99991002$=tone/busy
|
|
^99991003$=tone/ring
|
|
^99991004$=tone/specdial
|
|
^99991005$=tone/congestion
|
|
^99991006$=tone/outoforder
|
|
^99991007$=tone/milliwatt
|
|
^99991008$=tone/info
|
|
|
|
; DEBUG HELPER
|
|
; ^.*$=echo match \0 adr ${address} src ${callsource} form ${formats} id ${id} peer ${peerid} type ${type} user ${username} caller ${caller} called ${called}
|
|
|
|
^[0-9]\{1,2\}$=return;called=\0
|
|
|
|
|
|
[outbound] ; Calls from internal users
|
|
^.*$=echo [outbound] "\0" ${caller}->${called} ; log for debug
|
|
^[0-9]\{3\}$=jump internal
|
|
^[0-9]\{1,2\}$=jump z9 ; To internal -> z9
|
|
^.*$=echo [outbound] "\0" ${caller}->${called} ; log for debug
|
|
^.*$=line/\0;line=epvpn_ccchh ; Route everything (.*) to the specified accfile line
|
|
|
|
[inbound_epvpn]
|
|
^.*$=echo [inbound_epvpn] ${caller}->${called}
|
|
^.*$=return;callername=EPVPN ${caller};called=0 ; TODO which extension do we want to route to?
|
|
|
|
[inbound_fux]
|
|
^.*$=echo [inbound_fux] ${caller}->${called}
|
|
^.*$=return;callername=Door ${caller};called=0 ; TODO which extension do we want to route to?
|
|
|
|
[inbound_fonial]
|
|
^.*$=echo [inbound_fonial] ${caller}->${called}
|
|
^.*$=return;callername=Fonial ${caller};called=0 ; TODO which extension do we want to route to?
|
|
|
|
[inbound] ; Calls from EPVPN or outside world
|
|
^.*$=echo [inbound] "\0" ${caller}->${called} user:${user} callername:${callername} callsource:${callsource} ; log
|
|
^.*$=return;callername=EXTERN ${caller};called=0 ; set call recipient to 0 (shared alias between
|
|
; all clients in regfile.conf
|
|
|
|
[internal]
|
|
^.*$=echo [internal] "\0" ${caller}->${called}
|
|
^110$=line/110;line=fonial_ccchh
|
|
^112$=line/112;line=fonial_ccchh
|
|
^115$=line/040115;line=fonial_ccchh
|
|
^911$=line/112;line=fonial_ccchh
|
|
^999$=line/112;line=fonial_ccchh
|
|
; ^119$=line/01753288861;line=fonial_ccchh ; testing only stb cell number
|
|
^.*$=return;called=\0
|
|
|
|
[z9] ; Internal calls
|
|
^.*$=echo [z9] "\0" ${caller}->${called} ; log
|
|
|
|
; test service numbers
|
|
^91$=sip/sip:ha@10.31.208.10:5060; called=ha;format=opus ; Homeassistant
|
|
^98$=external/playrec/echo.sh ; Echotest
|
|
^99$=external/play/tts.sh;mode=text;text=Hallo Hallo Hallo ; TTS test
|
|
|
|
^.*$=return;called=\0 ; Any remaining internal calls to all
|
|
; Context: Calls to regfile.conf aliases are always
|
|
; handled directly and should never get here
|
|
|
|
|
|
[special]
|
|
^.*$=echo [special] "\0"
|
|
^.*$=tone/info
|
|
|
|
[fallback]
|
|
^.*$=echo [fallback] \0 adr ${address} src ${callsource} form ${formats} id ${id} peer ${peerid} type ${type} user ${username} caller ${caller} called ${called}
|
|
^*\{1,2\}[0-9]\{1,3\}$=jump outbound
|
|
^.*$=tone/busy
|