text stringlengths 0 152 |
|---|
Test this out. Listen to it count for a while, and then hang up. When you dial this |
extension again, it will continue counting from where it left off. The value stored in |
the database will be persistent, even across a restart of Asterisk. |
In the early days of Asterisk, the built-in database was essential. Today, however, it’s |
not as commonly used. It’s probably good for setting a few semaphores here and |
there, but for the most part, if you want to store data, use one of the relational data‐ |
base backends (we discuss relational database integration in later chapters). |
Handy Asterisk Features |
Now that we’ve gone over some more of the basics, let’s look at a few popular func‐ |
tions that have been incorporated into Asterisk. |
Conferencing with ConfBridge() |
The ConfBridge() application allows multiple callers to converse together, as if they |
were all in the same physical location. Some of the main features include: |
• The ability to create password-protected conferences |
• Conference administration (mute conference, lock conference, or kick off |
participants) |
• The option of muting all but one participant (useful for company announce‐ |
ments, broadcasts, etc.) |
• Static or dynamic conference creation |
• High-definition audio that can be mixed at sample rates ranging from 8 kHz to |
96 kHz |
Handy Asterisk Features |
| |
183 |
• Video capabilities, including the addition of dynamically switching video feeds |
based on loudest talker |
• Dynamically controlled menu system for both conference administrators and |
users |
• Additional options available in the confbridge.conf configuration file |
In this chapter we are focused on the dialplan, so we’re only going to demonstrate a |
basic audio conference bridge: |
$ sudo -u asterisk vim /etc/asterisk/confbridge.conf |
[general] |
[default_user] |
type=user |
[default_bridge] |
type=bridge |
After building the confbridge.conf file, we need to load the app_confbridge.so mod‐ |
ule. This can be done at the Asterisk console: |
*CLI> module load app_confbridge.so |
With the module loaded, we can build a simple dialplan to access our conference |
bridge: |
exten => 221,1,NoOp() |
same => n,ConfBridge(${EXTEN}) |
This is just the tip of the iceberg for conferencing. We’ve got the base configuration |
done, but there is much more functionality to be configured. We’ll cover it in a little |
more detail in Chapter 11. |
Handy Dialplan Functions |
We discussed functions earlier in this chapter, but there’s more to say. There are cur‐ |
rently around 150 dialplan functions provided by the Asterisk dialplan. Here is a |
small, curated list of a few worth experimenting with. |
CALLERID() |
CALLERID() supports many different datatypes, but you’ll find that you’ll typically use |
one of name or num. |
exten => 222,1,Noop(CALLERID function) |
same => n,Noop(CALLERID currently ${CALLERID(all)}) |
same => n,Set(CALLERID(num)=4169671111) |
same => n,Noop(CALLERID now ${CALLERID(all)}) |
same => n,Set(CALLERID(name)="Somename") |
184 |
| |
Chapter 10: Deeper into the Dialplan |
same => n,Noop(CALLERID now ${CALLERID(all)}) |
same => n,Hangup() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.