Chapter 14
Integration
Integration and the need for it were discussed in Chapter 3. To simplify parsing integration information that
comes back from the various phone switches, tAA came up with the concept of “patterns.” Patterns are
strings of characters—some characters with special meaning—that are matched with the information that
came back from the phone switch. If a pattern matches, the information is extracted from phone switch
data according to the pattern. This is very similar to the
scanf
strings in C.
Let’s look at an example. Some switches give back information in prefix notation. That is, the data comes
back like
reason arg. . .
For example, for a busy extension, the data may come back as
#A12
The “
#A
” says that the extension is busy and the “
12
” says that the extension that was busy is extension
12. We could create the pattern
#Abb
where “
bb
” has special meaning, in this case the extension that was busy. To handle a three digit extension,
we can have another pattern like
#Abbb
We can create a number of these patterns and have a function that takes a list of patterns and the integration
data and parses it out and returns the result. Since each switch may return the integration information
differently, different sets of patterns are stored for different switches in the Configuration Database. Here is
the definition of the command which performs the integration pattern parsing:
164