text
stringlengths
0
152
Syntax 166
Examples of Dialplan Functions 167
Conditional Branching 168
The GotoIf() Application 168
Time-Based Conditional Branching with GotoIfTime() 172
GoSub 175
vi
|
Table of Contents
Defining Subroutines 175
Returning from a Subroutine 177
Local Channels 177
Using the Asterisk Database 181
Storing Data in the AstDB 181
Retrieving Data from the AstDB 182
Deleting Data from the AstDB 182
Using the AstDB in the Dialplan 182
Handy Asterisk Features 183
Conferencing with ConfBridge() 183
Handy Dialplan Functions 184
CALLERID() 184
CHANNEL() 185
CURL() 185
CUT() 185
IF() and STRFTIME() 186
LEN() 187
REGEX() 187
STRFTIME() 187
Conclusion 188
11. PBX Features, Including Parking, Paging, and Conferencing. . . . . . . . . . . . . . . . . . . . . 189
features.conf 189
The [general] Section 190
The [featuremap] Section 190
The [applicationmap] Section 191
Application Map Grouping 194
Parking and Paging 194
Call Parking 195
Paging (aka Public Address) 197
Places to Send Your Pages 199
Zone Paging 204
Advanced Conferencing 204
Video Conferencing 206
Conclusion 206
12. Automatic Call Distribution Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Creating a Simple ACD Queue 210
Queue Members 215
Controlling Queue Members via the CLI 216
Defining Queue Members in the queue_members Table 217
Controlling Queue Members with Dialplan Logic 218
Table of Contents
|
vii
Automatically Logging Into and Out of Multiple Queues 220
Advanced Queues 223
Priority Queue (Queue Weighting) 223
Queue Member Priority 224
Changing Penalties Dynamically (queuerules) 225
Announcement Control 226
Overflow 229
Using Local Channels 232
Queue Statistics: The queue_log File 235
Conclusion 237
13. Device States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Device States 239
Checking Device States 240
Extension States Using the hint Directive 241
Hints 241
Checking Extension States 242
SIP Presence 243
Using Custom Device States 244
Conclusion 245
14. The Automated Attendant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
An AA Is Not an IVR 248
Designing Your AA 248
The Greeting 250
The Main Menu 250
Timeout 252
Invalid 252
Dial by Extension 252
Building Your AA 252
Recording Prompts 253
The Dialplan 255
Delivering Incoming Calls to the AA 256
IVR 257
Conclusion 257
15. Relational Database Integration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Your Choice of Database 259