Channels

Inbound Channels

In order to receive inbound calls, your application must notify the LLC that it is willing to handle messages that arrive on inbound channels. You do not need to send messages to those channels until the application is notified of an inbound call. When a call arrives on an inbound channel, the LLC can route it to any application willing to handle that channel.

Thereafter, the application is able to send messages to that channel and to receive all messages concerning that channel. Through the sk_watchChannelGroup() function, the application notifies the LLC that it is willing to handle a channel group. If multiple applications watch the same channel group, load sharing occurs.

For example, if you create a channel group "All_Inbound" in your configuration file to receive incoming calls, your application must issue the following function call:

sk_watchChannelGroup("All_Inbound");

This function call tells the LLC that any calls on the channels associated with the group "All_Inbound" can be routed to your application.

The messages that are sent to your application include information about the channel they arrive on. Your application does not need to keep track of specific channels in the group it is watching. However, it is possible for the application to obtain specific information about the channels through other API messages.

Outbound Channels

Unlike inbound channels, your application must initiate the communication with outbound channels, rather than waiting for a message to arrive. Therefore, to obtain access to an outbound channel, your application must explicitly request a channel from an outbound channel group, which is usually done simultaneously with an outseizure. To do this use sk_requestOutseizedChannel().

Syntax for sk_requestOutseizedChannel()

int sk_requestOutseizedChannel (char *aChannelGroup, int aNumRetries, XL_OutseizeControl *anOutseizeMsg, void *aTag, HandlerFunc *aHandlerFunc);

Intelligent Channel Allocation

When your application requests a channel from a channel group, the LLC determines which channel to allocate, based on an intelligent channel allocation algorithm. The allocation is based on which subgroup of the requested channel group is most available.

If the switch has outbound trunks to multiple inter-exchange carriers, you can define one overall outbound channel group, called "outbound" that incorporates all outbound trunks. You can then define specific groups to Carrier A and Carrier B, called "outboundA" and "outboundB." The "outboundA" and "outboundB" groups are subgroups of the "outbound" group.

If an application requests an outseize on a port to a specific carrier, LLC finds an unused channel in the subgroup for that specific carrier that it can successfully outseize on, and provides the outseized channel to the application module.

However, if an application does not care which specific carrier it is outseized to, and requests a channel from group "outbound," the LLC determines which of "outboundA" or "outboundB" is less loaded, and returns a successfully outseized channel from that subgroup. The LLC always attempts to preserve the most limited channel group for the applications that require it.

Important! Channels can only be managed by either the CSP or SwitchKit. Do not attempt to use LLC channel management when using CSP routing.

Application Disconnection Functionality

When an application terminates, you can specify how the LLC handles the non-idle channels using the environment variable: SK_CHANNEL_RECOVERY_METHOD. If this variable is set to 0x01, channels will be released. If this variable is set to 0x02, channels will be taken out-of-service. If this variable is set to 0x00, no action is taken. If this variable is set to 0x03, all channels will be taken out-of-service within a group.

Channel Groups

In channel management, if an application specifies a channel group that was not configured in LLC using an AssociateChannelGroup API message, the LLC will create that group and assign no channels to the channel group. When AssociateChannelGroup is sent to the LLC, LLC will add the specified channels to that group.

 

If LLC receives a reference to a channel group that does not currently exist, it will make note of that fact in the maintenance.llc.log file. LLC also sets up this invalid channel group with a group name and zero channels. If an AssociateChannelGroup is sent later, that invalid channel group will get populated.