-
Notifications
You must be signed in to change notification settings - Fork 3
/
extensions.conf
53 lines (46 loc) · 1.56 KB
/
extensions.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[globals]
SERVALD_AGI=[path]/servaldnaagi.py
SERVALD_BIN=[path]/servald
SERVALD_INSTANCE=[path]/instance
[macro-phone]
exten => s,1,Dial(SIP/${MACRO_EXTEN},25)
exten => s,n,Goto(${DIALSTATUS},1)
exten => ANSWER,1,Hangup
exten => CANCEL,1,Hangup
exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)
[stations]
exten => 10000,1,Macro(phone)
exten => 4242,1,VoicemailMain(default)
exten => 10411,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
[sip-out]
exten => _X.,1,Dial(SIP/VoIPProvider/${EXTEN})
[servald-out]
; Try and resolve using script which asks servald
exten => _X.,1,AGI(${SERVALD_AGI},${SERVALD_BIN},${SERVALD_INSTANCE},${EXTEN})
same => n,Verbose(AGI has run)
same => n,Goto(${AGISTATUS})
; Lookup failed (check servald is running etc)
same => n(FAILURE),Playback(tt-weasels)
same => n,Verbose(weasels)
same => n,Hangup()
; Lookup worked
same => n(SUCCESS),Verbose(lookup done)
same => n,Goto(${SDNAAGI_STATUS})
; Actually resolved something try and dial it
same => n(RESOLVED),Dial(${SDNAAGI_DEST},25)
same => n,Hangup()
; Couldn't find something for this DID
same => n(UNRESOLVED),Playback(ss-noservice)
same => n,Verbose(unresolved)
same => n,Hangup()
[servald-in]
include => stations
[users-out]
include => stations
include => servald-out