System information
The advantage to XMPP device state distribution is that it is possible to distribute state
to multiple physical locations, which is not possible with OpenAIS. The disadvantage
is that it is more complex to set up (since you need an external service running the
Tigase XMPP server) than the OpenAIS implementation.
More information about configuring distributed device states with XMPP can be found
in “Using XMPP” on page 314.
Multiple Queues, Multiple Sites
Now, let’s get creative and use the various tools we’ve discussed in the previous sections
to build a distributed queue infrastructure. Figure 22-8 illustrates a sample setup where
we have five Asterisk servers being fronted by another cluster used to distribute/route
the calls to the various queues we have set up. Our ITSP sends calls to the routing cluster
(which could be something like Kamailio, or even multiple Asterisk servers imple-
menting DUNDi or some other method to route and distribute calls), which then sends
the calls as appropriate to one of the three Asterisk systems we have our queues con-
figured on. Each server handles a different queue, such as sales, technical support, and
returns. These servers in turn use the agents located at two separate physical locations.
The agents’ devices are registered to their own local registration servers (which may
also perform other functionality).
We are not showing all aspects of the system, in order to keep the dia-
gram
simple, but in this case we would be using the XMPP distributed
device state system as we’re implying that the agents are distributed
across multiple physical sites.
All of the agents at the different locations can be loaded into one or more queues, and
because we’re distributing device state information, each queue will know the current
state of the agents in the queue and will only distribute callers to the agents as appro-
priate. Beyond that, we can configure penalties for the queues and/or for the agents in
order to get the callers to the best agents if they are available, and only use the other
agents when all the best agents are in use (for more information on penalties and pri-
orities, refer to “Advanced Queues” on page 283).
We can add more agents to the system by adding more servers to the cluster at either
the same location or additional physical locations. We can also expand the number of
queues we support by adding more servers, each handling a different queue or queues.
A disadvantage to using this system is the way the Queue() application has been devel-
oped. Queue() is one of the older applications in Asterisk, and it has unfortunately not
kept up with the pace of development in the realm of device state distribution, so there
is no way to distribute the same Queue() across multiple boxes. For example, suppose
you have sales queues on two systems. If a caller enters the sales queue on the first
Multiple Queues, Multiple Sites | 499
Downloa d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m >