forked from hselasky/chan_capi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathextensions.conf.sample
278 lines (252 loc) · 7.89 KB
/
extensions.conf.sample
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
;
; example "extensions.conf" (Also see "capi.conf" example)
;
; FreeBSD: /usr/local/etc/asterisk/extensions.conf
; NetBSD: /usr/pkg/etc/asterisk/extensions.conf
; Linux: /etc/asterisk/extensions.conf
;
[isdn_in_te]
; exten => _0.,1,NoOp(Invalid incoming call ${EXTEN})
; exten => _X.,1,Goto(isdn_in,${EXTEN},1)
[isdn_in_nt]
;
; Override the caller ID that the telephone
; provided.
;
; exten => _X.,1,SetCallerID(004711111111)
;
; Go to next context with the current
; telephone number.
;
; exten => _X.,2,Goto(isdn_in,${EXTEN},1)
;
; Alternative way to handle DID.
; Set "isdnmode=msn" in "capi.conf".
; Requires that the phone generates
; DTMF.
;
; exten => s,1,Wait,1
; exten => s,2,Answer
; exten => s,3,DigitTimeout,5
; exten => s,4,ResponseTimeout,10
[isdn_in]
;
; The following lines will forward calls for numbers
; starting with '0' to the external ISDN network, and accept
; additional digits, due to the '.'. The ':1' will cause the
; '0' to be removed from the destination telephone number.
; When one dials 0333, 333 will be dailed. When one dails
; 0222, 222 will be dailed, and so on. Remove ':1' if that is
; not desired. Explanation of the '/bo' options: 'b' means
; early-B3 and 'o' means overlap sending. 'l' means want late
; inband signalling.
;
; IMPORTANT: if the caller-id is not valid, then override
; it using the "SetCallerID()" application, or insert
; "01234:" before "${EXTEN:1}" below, where "01234" is
; your telephone number. Else the telephone network might
; reject the call! A single ":" before "${EXTEN:1}" will
; also work.
;
; exten => _0.,1,Dial(CAPI/ISDN1/${EXTEN:1}/bl,60)
; exten => _0.,2,Hangup
;
; Pseudo-examples
;
; exten => _1.,1,Dial(CAPI/g<group>/[<callerid>:]<destination>[/<params>])
; exten => _1.,2,Dial(CAPI/contr<controller>/[<callerid>:]<destination>[/<params>])
; exten => _1.,3,Dial(CAPI/<interface-name>/[<callerid>:]<destination>[/<params>])
;
; Explanation:
;
; '<group>' - can be a value, comma separated list of values or a range
; using '-'. The according interface is found by searching a
; match with the 'group' specified in the capi.conf
; for each interface.
;
; '<callerid>' - this is optional and can be used to set the source telephone
; number withouth changing the initial channel's source
; telephone number.
;
; '<params>' - this is optional and is used to set parameters for a call.
; The parameters are a list of characters with the following
; meaning:
; 'b' : early B3 on progress.
; 'r' : early B3 on alert.
; 'l' : early B3 on disconnect.
; 'B' : no early B3 after disconnect (default).
; 'd' : use the default caller id which is
; set by 'defaultcid=' in 'capi.conf'
; 'o' : use overlap sending of number.
; (Useful if additional digits shall be send
; afterwards or together with 'b' to get
; dialtone and then send the number, e.g.
; if otherwise no progress tones are available)
;
; '<interface-name>' - this is mandatory and should not start with
; 'contr' or 'g', and should be specified in
; 'capi.conf'
;
; CAPI COMMANDS
; =============
;
; Call Deflection, forward an unanswerd call to another number:
;
; exten => s,1,Ringing
; exten => s,2,capiCommand(deflect|12345678)
; exten => s,3,Wait(2)
; exten => s,4,Hangup()
;
;
; Set holdtype. When the PBX wants to put the call on hold,
; use the specified method. Also see "capi.conf".
;
; No hold:
; exten => s,1,capiCommand(holdtype|local)
;
; CAPI hold:
; exten => s,1,capiCommand(holdtype|hold)
;
; Notify hold (not implemented yet):
; exten => s,1,capiCommand(holdtype|notify)
;
;
; Hold, put an answered call on hold
;
; exten => s,1,capiCommand(hold)
;
;
; Retrieve, get a held call back
;
; exten => s,1,capiCommand(retrieve)
;
;
; Malicious Call Identification, Report a call of malicious nature.
;
; exten => s,1,capiCommand(malicious)
;
;
; Receive FAX:
;
; exten => s,1,capiCommand(receivefax|/tmp/${UNIQUEID}|+49 6137 555123|Asterisk)
;
; The following lines will forward calls for 456 to someone
; running the IAX2 protocol:
;
; exten => _456,1,Dial(IAX2/[email protected],60,Tt)
; exten => _456,2,Hangup
;
; The following lines will forward calls for 457 to someone
; running the SIP protocol:
;
; exten => _457,1,Dial(SIP/[email protected],60,Tt)
; exten => _457,2,Hangup
;
; The following lines will forward calls for 37041111,
; to the "demo" context after 9 seconds:
;
; exten => _37041111,1,Wait(9)
; exten => _37041111,2,Goto(demo,s,1)
;
; The following lines will set the display
; variable, which is a message that should
; be displayed on the ISDN phone:
;
; exten => s,1,Set(_DISPLAY="My friend")
; exten => s,2,Dial(CAPI/ISDN2/37042222/,60)
;
;
; The following lines will set the alert timeout
; variable, which gives the maximum time in seconds
; which will be spent waiting for the ALERT indication.
; A value of zero means use defaults.
;
; exten => s,1,Set(_ALERTTIMEOUT="120")
; exten => s,2,Dial(CAPI/ISDN2/37042222/,60)
;
;
; The following lines will forward various destinations to
; the internal ISDN network:
;
; exten => _37042222,1,Dial(CAPI/ISDN2/37042222/,60)
; exten => _37043333,1,Dial(CAPI/ISDN2/37042222/,60)
; exten => _38324444,1,Dial(CAPI/ISDN2/38324444/,60)
; exten => _38355555,1,Dial(CAPI/ISDN2/38324444/,60)
;
; The following lines will forward all 7-digit numbers
; starting with '2' to an external SIP network:
;
; exten => _2XXXXXX,1,NoOp(Outgoing call to ${EXTEN})
; exten => _2XXXXXX,2,SetCallerID(2000201)
; exten => _2XXXXXX,3,Dial(SIP/${EXTEN}@other_network.com,60,Tt)
; exten => _2XXXXXX,4,Hangup
;
; The following lines will forward an incoming call to
; multiple devices at the same time, separated by '&'
; in the 'Dial(' string:
;
; exten => 82834,1,NoOp(Call to 82834)
: exten => 82834,2,SetAccount(2000000)
; exten => 82834,3,Dial(CAPI/ISDN2/50/b&SIP/2000000&CAPI/ISDN1/0107801791111111111/bl)
;
;
; The following lines will playback a message
; for all invalid extensions:
;
; exten => i,1,Playback(invalid)
; exten => i,2,Wait(5)
; exten => i,3,Playback(invalid)
; exten => i,4,Wait(5)
; exten => i,5,Hangup
;
[out_isdn]
;
; The following lines will forward calls to numbers
; starting with '0' to the external ISDN network:
;
; This line is used for debugging and will print
; a message on the Asterisk console:
; exten => _0X.,1,NoOp(Dialing ${EXTEN})
;
; This line sets the calling number:
; exten => _0X.,2,SetCallerID(82834)
;
; This line will hide the calling number:
; exten => _0X.,3,SetCallerPres(prohib_not_screened)
;
; This line allows presentation of the calling number (default):
; exten => _0X.,4,SetCallerPres(allowed)
;
; This line dials the external number:
; NOTE: if the destination number is not complete,
; one should use the '/bol' options instead of '/bl'
; exten => _0X.,5,Dial(CAPI/ISDN1/${EXTEN}/bl,60)
;
; This line will tell asterisk to hangup:
; exten => _0X.,6,HangUp
;
; This line shows no early B3 and fake ring indication:
; exten => _X.,1,Dial(CAPI/ISDN1/${EXTEN},30,r)
;
; This line shows always early B3 and fake indicatons
; if the exchange does not provide any indications:
; exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/b,30,r)
;
;
; This line shows early B3 on success and fake indications
; if the exchange does not provide any indications:
; exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/B,30,r)
;
;
; For normal PBX usage one would use the 'b' parameter, always early B3.
;
;
; Overlap sending (a.k.a. real dialtone)
;
; By dialing an empty number the channel will come up at once and give
; one the dialtone it gets from the local exchange. At this point the
; channel is like a legacy phone, now one can send DTMF digits to
; dial.
;
; exten => s,1,Dial(CAPI/ISDN1//b)
;