Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Application Dispatch tables

There are two AD tables that are used to determine which application should be dispatched when a call arrives on a particular channel:

DNIS and ANI ranges

A range is considered most specific if it contains (or matches) only one number. A range is considered least specific if it contains (or matches) any possible number. The notation for DNIS and ANI ranges is a:b, where a and b are positive integers and a <= b. Ranges can completely contain other ranges, but ranges cannot overlap to prevent ambiguity across the overlap ranges. For example, the set of ranges 4000:4000,3500:6000,0000:9999 is valid. But given the previous set of ranges, the range 4500:8000 is invalid because it overlaps the range 3500:6000.

The IRA_STR_RANGE structure contains the DNIS and ANI range information.

The iraSetStrRange(3IRAPI-AD) function sets the contents of this structure. Some AD-API functions take pointers to this structure as arguments.

Initializing AD tables

The AD tables are initialized at system startup. Typically, application developers should not initialize the AD tables themselves, but several functions are supplied if they are needed. The iraInitADTables function initializes both the AD Channel and DNIS/ANI tables, while the iraInitADChannel and iraInitADDnisani functions initialize only the AD Channel table or only the AD DNIS/ANI table, respectively. After initialization, all applications in the AD Channel table are set to NULL and the AD DNIS/ANI table is empty. Any previously existing application assignments are lost.The global parameter IRP_AD_MODE must be set to IRD_AD_READWRITE to initialize the AD tables; otherwise, the functions return an IRER_PERMISSION error.

Querying AD tables

The iraQueryADTables and iraQueryADDnisani functions can determine which application should be started in response to a new call arrival. The iraQueryADTables function uses both the AD Channel table and the AD DNIS/ANI table to determine the application, while the iraQueryADDnisani function only uses the AD DNIS/ANI table.

A parameter passed into the iraQueryADTables function influences its behavior. If the parameter is IRD_AD_STARTUP, the iraQueryADTables function looks at the startup application in the AD Channel table for the particular channel. If the application is not null and not ``*DNIS_SVC,'' it then returns this application. If the application is ``*DNIS_SVC,'' then the iraQueryADTables function searches the AD DNIS/ANI table to the find first entry that matches the DNIS and ANI for this call. If it finds an entry whose DNIS and ANI ranges match those of the call, it returns the application associated with the entry; otherwise, it returns an error. If the startup application is null, the iraQueryADTables function looks at the standard application for the channel.

If the parameter is IRD_AD_STANDARD or if the startup application is null for a particular channel, the iraQueryADTables function looks at the standard application for the channel. If the application is not null and not ``*DNIS_SVC,'' it then returns this application. If the application is "*DNIS_SVC'' or null, then the iraQueryADTables function searches the AD DNIS/ANI table to find the first entry that matches the DNIS and ANI for this call. If it finds an entry whose DNIS and ANI ranges match those of the call, it returns the application associated with the entry; otherwise, it returns an error.

Reading AD tables

Applications can read the contents of the AD Channel and DNIS/ANI tables by using the iraReadADChannel and iraReadADDnisani functions, respectively. The iraReadADDnisani function reads the AD DNIS/ANI table in order and return each entry one at a time. Subsequent calls to iraReadADDnisani returns the next entry. The iraRewindADDnisani function is used to reset (or rewind) the list, so that the next call to iraReadADDnisani returns the first entry in the list.

Changing AD tables

Applications can be assigned to a particular channel or for a particular DNIS/ANI range by using the iraAddADChannel and iraAddADDnisani functions. The global parameter IRP_AD_MODE must be set to IRD_AD_READWRITE to make changes to the AD tables; otherwise, the functions return an IRER_PERMISSION error.

© 2006 Avaya Inc. All Rights Reserved.