
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
394
|
Chapter 17: Asterisk Reference
In this example, a credit card number is pulled from the Asterisk database. If its
length is 16, the system plays a thank you message. Otherwise, it plays an invalid
message and changes contexts.
Concatenating strings
As in Perl and PHP quoted string expressions, multiple strings can be concatenated
simply by putting them inline:
exten => 1,1,SetVar(wholename=DestinysEnd)
exten => 1,2,SetVar(firstword=${wholename:1:8})
exten => 1,3,SetCIDName("Gilneas ${firstword}")
; Caller ID Name is now "Gilneas Destiny"
exten => 1,4,SetCIDName("Gilneas${firstword}")
; Caller ID Name is now "GilneasDestiny"
Dial-Plan Command Reference
Each extension you define in the dial-plan can have one of many commands. These
commands are, as pointed out earlier, executed in order of their priority. Some of the
commands are dependent upon one another. Here is a list of the most commonly
used commands.
AbsoluteTimeout
AbsoluteTimeout(seconds)
Sets absolute maximum time of call, in seconds. Once this time elapses, the call will
be disconnected or handled by the
t special extension, if one is defined in extensions.
conf. Could be useful for calling card applications.
AddQueueMember
AddQueueMember(queue|[channel])
Adds the current channel as a member to a call queue as configured in /etc/asterisk/ ...