TELECOMMUNICATION SWITCH HAVING PROGRAMMABLE NETWORK PROTOCOLS AND COMMUNICATIONS SERVICES

Abstract: A telecommunications protocol development environment which enables a user to define a separate finite state machine for each port provided by a programmable telecommunications switch. Protocols for various telecommunications applications and software layers may be developed.

Description: TELECOMMUNICATION SWITCH HAVING PROGRAMMABLE NETWORK PROTOCOLS AND COMMUNICATIONS SERVICES BACKGROUND OF THE INVENTION 1. Field of the Invention 5 The present invention relates generally to the field of telecommunications and, more specifically, to programmable telecommunication switches and controlling external computers supporting various telecommunications applications. 2. Discussion of the Prior Art o Programmable telecommunication switches are used in a wide variety of applications such as voice messaging, telemarketing services and the like. A programmable switch is usually controlled by a host device, which is typically a computer that runs a telecommunications application program. A customer may s either purchase a commercially available application program that is compatible with the host and switch hardware or may elect to write a custom program. In most applications, a programmable switch is connected to a public telephone network by one or more analog trunks or o digital spans (e.g., a Tl span) which are terminated at the switch. The switch may also terminate one or more "lines" which are connected to devices such as telephone sets. Communication over any given trunk, span or line is carried out in accordance with an assigned signalling protocol. 5 Throughout the world, there are numerous "standard" signalling protocols in use. Some protocols which are widely used at present are E&M wink start, loopstart, groundstart and international compelled R2 using DTMF/MFR1 or MFR2 address signalling. o In conventional programmable switches, the selection of which signalling protocol is used with respect to a particular trunk, span or line is generally made before the equipment is delivered to the customer. That is, the switch manufacturer configures the switch, which may involve aspects of hardware or firmware or both, usually in a manner which cannot easily or quickly be changed (i.e., through firmware stored in a PROM). 5 The manufacturer's configuration effectively assigns a particular signalling protocol for each trunk, span or line. Several problems arise, however, with such conventional configuration. First, there is the lack of flexibility for a user to configure the switch as desired for a particular o application. This is especially problematic where a need arises to customize, even infrequently, the specified signalling protocols after initial installation of the switch. Another problem with conventional programmable switches relates to their inability to dynamically change the signalling s protocol specified for a particular trunk, span or line. This problem may occur with some frequency in Europe where different compelled R2 signalling protocols are used in different countries or in any country where internationally originated calls are being generated through a tandem switching o arrangement. The undesirable result is that the switch will probably not be able to properly handle the incoming call. Another major disadvantage of conventional programmable switches is that they offer no capability for the user to easily develop and implement custom signalling protocols for 5 applications. Custom protocols may be desirable, if not necessary, in applications where the switch is connected between the public telephone network and other devices (e.g., a voice messaging system) . Because such devices may perform specialized functions and are not intended to connect directly o to the public telephone network, they do not typically adhere to standard signalling protocols. Thus, there is a need for the user to be able to control the programmable switch in such a fashion that proper communication is maintained both with the public telephone network and with other devices connected to 5 the switch. Yet another disadvantage of conventional programmable switches is that they require excessively frequent intervention by the host device in order to process calls. For example, in a conventional switch, host intervention (i.e., an exchange of messages between the switch and host device) is typically required to either transmit or receive digits. This is necessary because the host device must instruct the switch to apply appropriate, available resources for the task at hand. In this example, the host might instruct the switch to connect an available tone generator to a particular channel to send digits, or connect a tone receiver to receive digits. In the o context of an application where hundreds to possibly tens of thousands of calls per hour are processed by a switch, the number of messages that must be passed between the host and switch becomes quite large, which often results in reduced host and switch performance. 5 SUMMARY OF THE INVENTION In brief summary, the present invention provides a programmable telecommunication switch which provides a user with the ability to define and assign on a port-by-port basis a desired signalling protocol, either "standard" or custom in o nature, for handling either incoming or outgoing calls. Multiple signalling protocols may be simultaneously resident in the switch and the protocol assignment of a given port may be dynamically changed in real time. The invention provides a protocol development environment 5 which enables the user to define a separate finite state machine for each port provided by the switch. Each finite state machine may be independently defined by combining a series of elementary processing steps, called atomic functions, into primitives, which are in turn combined with states and o events to define the desired state machine. Such state machines may include wait states, which are preferably used to reduce the involvement of the host device in processing calls. Wait states may represent programmable timed periods which provide an opportunity for expected actions or events to occur 5 before the switch performs the next operation. In addition, the present invention may serve as a development tool for telecommunications applications such as personal communications services (PCS), 800/900 service, voice mail, telemarketing, among others. The present invention may also be used to control or manage a wide variety of communications services within a programmable switch, including conferencing, voice recorded announcements, tone generation, tone reception, call progress analysis, voice recognition, voice compression and fax encoding/decoding. BRIEF DESCRIPTION OF THE DRAWINGS This invention is pointed out with particularity in the appended claims. The above and further advantages of this invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which: Figure 1 is a block diagram of a programmable telecommunications switch which may be programmed by a user in accordance with a preferred embodiment of the present invention; Figure 2 is diagram which depicts the layers of software used to control the switch of Figure 1; Figures 3A and 3B depict some of the specific features and functions associated with each of the software layers 2-5 depicted in Figure 2; Figure 4 is a block diagram of a finite state machine development environment constructed in accordance with a preferred embodiment of the present invention; Figure 5 is a block diagram of a layer 3 (network layer) application in which finite state machines are used to assign desired network signalling protocols to various ports of a programmable switch; Figure 6A is a state diagram of a finite state machine for providing tone control in link layer 2 (link layer) application; Figure 6B is a diagram of the finite state machine of Figure 6A in which each series of atomic functions is defined as a primitive; Figure 6C is a group of tables which show the correspondence between the atomic functions, primitives and states of Figure 6B; Figure 7A is a state diagram of a finite state machine for processing the initial phase of call setup using international compelled R2 signalling in a layer 3 (network layer) application; Figure 7B is a diagram of the finite state machine of Figure 7A in which each series of atomic functions is defined as a primitive; Figure 7C is a group of tables which show the correspondence between the atomic functions, primitives and states of Figure 7B; Figure 8A is a state diagram of a finite state machine for processing the initial phase of call setup using Tl E&M wink start signalling in a layer 3 (network layer) application; Figure 8B is a diagram of the finite state machine of Figure 8A in which each series of atomic functions is defined as a primitive; Figure 8C is a group of tables which show the correspondence between the atomic functions, primitives and states of Figure 8B; Figure 9A is a state diagram of a finite state machine for providing interactive voice response to an incoming call in a layer 4 (call management layer) application; Figure 9B is a diagram of the finite state machine of Figure 9A in which each series of atomic functions is defined as a primitive; Figure 9C is a group of tables which show the correspondence between the atomic functions, primitives and states of Figures 9B; Figure 10A is a state diagram of a finite state machine for a layer 5 inbound application such as toll free (800) service; Figure 10B is a diagram of the finite state machine of Figure 10A in which each series of atomic functions is defined as a primitive; and Figure 10C is a group of tables which show the correspondence between the atomic functions, primitives and states of Figure 10B. DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT Figure 1 shows a commercially available personal computer (PC) 2 which includes a PC central processing unit (CPU) 4 and a hard disk drive 6 interconnected by a PC input/output (I/O) s bus 8 and a PC power bus 9. The PC 2 is preferably a PC-AT®, sold by International Business Machines, or a compatible thereof. Other personal computers having more memory or more powerful CPUs than the PC-AT® may also be used. The PC 2 preferably operates under an application-oriented operating o system, such as DOS® or UNIX®. The PC 2 consists of a chassis or housing in which a motherboard is mounted, along with the disk drive 6 and other optional assemblies such as floppy disk drives, modems and the like. The PC CPU 4 is mounted on the motherboard, which s includes a series of edge connectors into which other boards (cards) may be inserted and thereby connected to the PC I/O and power busses 8 and 9. A programmable telecommunication switch 10 resides within the PC 2. A CPU/matrix card 12 is inserted into one of the 0 slots on the motherboard and thus connected to the busses 8 and 9. The CPU/matrix card 12 is interconnected with a digital (Tl) line card 14, a digital (El) line card 15, a digital signal processing (DSP) card 16, a packet engine card 17, an analog (universal) line card 18 and a terminator card 19 by 5 four busses: an HDLC or interprocessor bus 20; a TDM bus 22; a line card (LC) status/control bus 24; and a timing/control bus 26. A battery/ring voltage bus 28 supplies battery voltage (48VDC) and ringing voltage (109VAC) to the analog line card 18. The terminator card 19 serves to physically terminate 0 busses 20, 22, 24, 26 and 28. The line cards 14, 15 and 18 and the DSP card 16 are all connected to and receive their basic operating power from the PC power bus 9. Although only one digital (Tl) line card 14, one digital (El) line card 15 and one analog line card 18 are 5 depicted, it should be understood that additional line cards of any type may be added subject to two physical limitations: (1) the maximum switching capacity of the CPU/matrix card 12, and (2) the physical space within the chassis of the PC 2. An external host 30, which may comprise a separate personal computer, workstation or other computer, may optionally be connected via a communication channel 32 to the CPU/matrix card 12. The CPU/matrix card 12 preferably includes a conventional RS-232 compatible interface for connecting the channel 32. The external host 30 preferably operates under an application-oriented operating system. If desired, the switch 10 can reside on a passive backplane (no PC CPU 4 or disk 6 present) from which its receives electrical power and be controlled by the external host 30. An external battery/ring voltage supply 31 is connected via a path 33 to the terminator card 19. Supply 31 may comprise, for example, a commercially available power supply. With the exception of the digital (El) line card 15, the DSP card 16 and the packet engine card 17, details regarding the construction of the various cards shown in Figure 1 are set forth in copending application serial no. 07/953,690, filed September 29, 1992, now issued as U.S. Patent 5,321,744, assigned to the assignee of the present application and which is hereby incorporated by reference. Digital (El) line card 15 is preferably constructed using similar hardware to that disclosed for Tl line card 14, except for differences in conventional circuitry which allow line card 15 to terminate El spans, as opposed to Tl spans. Details regarding the construction of the DSP card 16 and the packet engine card 17 are set forth in copending application serial no. 08/001,113, filed January 5, 1993, assigned to the assignee of the present application and which is hereby incorporated by reference. Figure 2 is a layer model of the software used to control the programmable switch 10 of Figure 1. The lefthand column of Figure 2 shows seven layers defined in the Open Systems Interconnection (OSI) reference model. The righthand column of Figure 2 shows five layers used to control switch 10 and their general correspondence to the OSI modal. Referring now to both Figures 1 and 2, the Application Layer 5, which corresponds generally with the Application layer of the OSI model, represents application software which typically runs on either the PC CPU 4 or the external host 30. Application Layer 5 software may be used to implement any of a number of desired telecommunications services such as toll free (800) service, voice mail, automatic call distribution (ACD), to name but a few. Call Management Layer 4, which corresponds generally with the Presentation, Session and Transport layers of the OSI model, represents software which runs on the CPU/matrix card 12. Call Management Layer 4 is responsible for performing centralized call processing functions and providing a common interface to Application Layer 5 regardless of the type or types of network signalling protocols which may be used within the switch 10. Typically, Call Management Layer 4 performs functions which .are required following call setup. Network Signalling Protocol Layer 3 corresponds generally with the Network layer of the OSI model. The software represented by Network Signalling Protocol Layer 3 runs either on the CPU/matrix card 12 or on line cards which include their own microprocessors, such as line cards 14 or 15 or packet engine card 17, and is responsible for in and out-of-band network signalling supervision as well as network protocol level control of incoming and outgoing calls. Link Layer 2 corresponds generally with the Data Link layer.of the OSI model. Link Layer 2 software runs on the CPU/matrix card 12, the line cards which include their own microprocessors, the DSP card 16 or the packet engine card 17 (each of which includes its own microprocessor) and is responsible for the detection as well as physical transfer of network signalling information across a network or line interface. Finally, the Physical Layer 1 corresponds to the Physical layer of the OSI model. Line cards 14, 15 and 18 provide physical Tl, El and analog electrical interfaces, respectively, to the switch 10. Figures 3A ard 3B is a tabular listing of representative features and functions provided by each of the software Layers 2-5 of Figure 2. The present invention may be used as a development tool to develop suitable software to implement any of the features and functions shown in Figures 3A and 3B. An illustrative example of the use of the present invention in the context of each of Layers 2-5 is described below in connection with Figures 6A-10C. Figure 4 is an overall block diagram of a finite state machine development environment, constructed in accordance with a preferred embodiment of the present invention, which enables a customer or user to create and define finite state machines for performing desired telecommunications functions. Before considering this Figure in detail, the definitions of certain terms should be addressed. As used herein, the term state refers to a number which represents the current "context" for a particular channel or port. In a preferred embodiment of the present invention, there are three types of states defined: normal, internal and blocking. Normal states can be wait states (i.e., a SEIZE ACK state, a condition in which further action is suspended until the occurrence of a particular event) or stable states (i.e., a conversation is taking place). Internal states are used to test conditions and effectively operate as decision branches. Normal and internal states may be specified by a customer or user, in accordance with present invention, to define a finite state, machine for performing a desired function. Blocking states are generated automatically by the present invention and are used, on a channel-by-channel basis, in connection with the management of off-board resources. An event is a number which identifies a condition which is accepted by a particular state. Data may be associated with an event. An atomic function is one which performs an elementary task such as setting a timer. User-specified data may be associated with an atomic function. A primitive is a predetermined sequence of atomic functions which is invoked upon the occurrence of a particular event. Users may create or define primitives from a library of available atomic functions. In a preferred embodiment, each primitive may contain up to 20 atomic functions. A state/event table defines the valid events for a particular state and the primitive which is invoked upon the occurrence of each such event. In a preferred embodiment, a state/event table may contain up to 100 states and up to 40 events per state. A primitive table defines the primitives which are used by a state/event table. In a preferred embodiment, a primitive table may contain up to 200 primitives. A protocol is defined as the association of a state/event table with a primitive table and is identified by a protocol ID (a number). A data block, such as those denoted by reference numbers 40a, 40n, is assigned for each channel (port) 0...n of the switch. Each data block 40a, 4On contains the following information pertaining to its respective channel: the current state of the channel; a pointer to an active state/event table; a pointer to an active primitive table; a pointer to an assigned state/event table; and a pointer to an assigned primitive table. In the case of channel 0, the active state/event table and active primitive table pointers are pointing, as indicated by the phantom lines, to tables which are associated with a resident protocol 0, denoted by reference number 42a. The assigned state/event table and assigned primitive table pointers for channel 0 are pointing to tables which are associated with a dynamically loaded, customer-defined protocol n+1, denoted by reference number 44a. Other protocols which are present and available for use are resident protocols l...n (42b, 42c) and downloaded, customer-defined protocols n+2...m (44b, 44c). The resident protocols 42a-42c represent preprogrammed or "standard" protocols, which are typically provided by a manufacturer with a switch. In contrast, the customer-defined protocols 44a-44c are created by a customer or user and may be completely "custom" or "proprietary" in nature. A layer dependent atomic function library 46 is connected to provide information to a state machine engine 48. State machine engine 48 is also connected to receive the active state/event table pointer and active primitive table pointer from each of data blocks 40a-40n. Also, as denoted by reference number 50, utilities are provided for layer dependent environment support. The function of the state machine engine 48 is to drive each channel in accordance with its assigned protocol, which is defined by the assigned state/event table and assigned primitive table. Upon the occurrence of a valid event for a normal state, a primitive is invoked in accordance with the entries in the assigned state/event table. The state machine engine 48 uses the atomic function library 46 to perform the atomic functions represented by the invoked primitive. The state machine engine 48 will drive through any necessary internal states, automatically generating appropriate blocking states, until the channel once again reaches a normal state. At that time, processing by the state machine engine 48 is complete until the occurrence of another valid event. Each channel is initially assigned one of the customer- defined protocols or one of the preprogrammed protocols. This is accomplished by the transmission of a message from the Application Layer 5 to the Call Management Layer 4, which in turn issues an appropriate message to Layer 3. The assigned state/event table pointer and assigned primitive table pointer point to the protocol which was last assigned. Thus, a customer may assign a desired one of the available protocols by simply specifying the protocol ID. In this fashion, the present invention advantageously permits the customer to assign, on a channel-by-channel basis, a desired protocol from among multiple protocols resident within a single switch. Alternatively, or if the customer elects not to assign protocols to some or all of the channels, default values are preferably provided so that each channel always has a valid protocol (e.g., one of the resident protocols 42a-42c) assigned to it. The active state/event table and active primitive table pointers, which are provided to the state engine machine 48, point to the protocol (active) which is currently controlling the channel. The active protocol used by a particular channel is not necessarily permanent and may be dynamically changed in real time in response to the occurrence of a specified event, as described in detail in connection with Figure 5. Further, because the atomic functions provided by the library 46 represent elementary functions, customers or users are . advantageously able to implement desired changes in protocols without substantial, or possibly any, changes to the underlying code. In addition, the environment support utilities are provided to simplify protocol development for the customer or user. The utilities provide ready-to-use resource management functions (e.g., timers) which greatly simplify the state machine logic required to implement desired protocols. Different utilities are preferably provided for each software layer since the resources required by each layer may be different. Figure 5 is a software diagram showing a representative use of the present invention in the context of the Network Signalling Protocol Layer 3. As mentioned above. Layer 3 software typically runs on either the CPU/matrix card 12, line cards-14 or 15 or packet engine card 17 of switch 2 (Figure 1). Data blocks 52a, 52n are assigned to each channel of the switch. In the case of channel 0, the active state/event table and active primitive table pointers are pointing, as indicated by the phantom lines, to tables which are associated with a resident out of service protocol 58a. The assigned state/event table and assigned primitive table pointers for channel 0 are pointing to tables which are associated with a downloaded, customer-defined network protocol n+1, denoted by reference number 60a. Other protocols which are present and available for use are resident network protocols 58b, 58c and downloaded, customer-defined network protocol 60b, 60c. A layer 3 atomic function library 54 is connected to provide information to the state machine engine 48. The Layer 3 environment support utilities 56 include: receive line signalling/scanning management; digital signal processing (DSP) function activation/management; alarm/out-of- service (OOS) management; timer management; and dynamic memory management. The active state/event table and active primitive table pointers, which are provided to the state engine machine 48, point to the protocol which is currently controlling the channel. Under normal operating conditions, the active protocol will be the same as the assigned protocol. However, in this figure, the active protocol is the out of service network protocol 0. This may have occurred, for example, because an alarm condition was detected on channel 0 and the channel automatically transitioned to the out of service network protocol 0. The active protocol used by a particular channel is not necessarily permanent and may be dynamically changed in real time in response to the occurrence of a specified event. For example, as shown in Figure 5, the assigned state/event table and assigned primitive table pointers for channel 0 are pointing to customer-defined network protocol 1 (60a). Assume that an incoming call is received on channel 0, but that the network signalling protocol of the incoming call is different than that of customer-defined network protocol 1 (60a). At this point, a message may be sent from Layer 3 to Layer 4 indicating that a change in the active protocol is needed in order to properly process the incoming call. In response, Layer 4 may simply reply with a message to Layer 3 to change the active protocol and proceed to process the incoming call, or may issue a message to Application Layer 5 to request instructions. Once the incoming call is terminated, the channel may be reassigned its original protocol (or any other which is available within the switch) through a similar series of messages or by an atomic function in the active protocol. A similar function may be performed in the case of an outgoing call. That is, if an available channel needed for an outgoing call is assigned a protocol which is not appropriate for the intended call (i.e., the dialed digits indicate that the call is destined for a foreign country which uses a different protocol), then the available channel's protocol may be dynamically changed by an appropriate message from Layer 4. Again, once the call is terminated, the channel may be reassigned its original or a different protocol as desired. In Figure 6A and those which follow, a state is depicted as a circle, an atomic function is depicted as a rectangular box, and an event is represented by a word abbreviation located along a path leading out of a state. Information shown in parentheses in an atomic function represents arguments or data that are associated with that function. Figures 6A-6C are an example of the application of the present invention in the context of Link Layer 2. The protocol begins with the associated channel in normal state 1 (NS1), which is the IDLE state 62. Upon the occurrence of the event of layer 3 to layer 2 setup for forward R2 signalling (L3_L2nSETUP_FOR_FWD_R2), a series of atomic functions are performed (af2, af3, af4, af5 and afl). Those atomic functions operate, respectively, to create an R2 reception node for a time slot, attach a DSP channel (e.g., a DSP chip acting as a tone receiver) for R2 decoding, send a layer 2 to layer 3 receiver attached message (L2_L3nRCVR_ATTACHED) , set a timer (timer 1) and then set the next state to normal state 2 (NS2) 64. Note that the arguments associated with atomic function af5 are preferably used to specify a desired timer ID and an index into an array of predetermined timer values. The arguments associated with atomic function afl are preferably used to specify the number of the next state and the type of the next state. If the next event is the expiration of timer 1 (TIMER1__EXPIRATI0N), then atomic functions aflO and afll.are performed and the channel is returned to the IDLE state 62. However, if the next event is the receipt of a message from a DSP indicating silence was received (DSP_L2nRCVED_SlLENCE), then atomic functions af5 (setting timer 1) and afl (setting the next state) are performed, after which the protocol advances to normal state 3 (NS3) 66 in which it waits for R2 forward signals. If the next event is the expiration of timer 1 (TIMER1_EXPIRATI0N) , then atomic functions aflO and afll are performed and the channel is returned to the IDLE state 62. If the next event is the receipt of a message to transmit backward R2 signals (L3_L2nXMIT_BWD_R2_SIG) , atomic function afl2 is performed, which queues the backward R2 signals for later transmission, followed by a return to NS3 66. If the next event is a message indicating the receipt of forward R2 signals (DSP_L2nRCVED_R2_FWD_SIG), the atomic functions af7 (sending a report of the R2 signal to Layer 3), af8 (test whether backward R2 signal is queued for transmission) and afl (set next state) are performed and the protocol advances to internal state 4 (IS4) 68. If the next event is a true internal event (L2_INT_EVENT_1) which indicates the backward R2 signal is queued, atomic function af9 (transmitting the queued backward R2 signal) is performed, followed by af5, afl and the protocol returns to state 64. If the next event is a false internal event (L2_INT_EVENT_0) which indicates the backward R2 signal is not queued, atomic function af5 (setting timer 1 ) is performed, followed by afl (setting the next state) and the protocol advances to normal state 5 (NS5) 70. Upon the receipt of a message to transmit backward R2 signals (L3_L2nXMIT_BWD_R2_SIG), atomic .junctions af9, af5 and afl are performed and the protocol returns to state 64. Referring now to Figure 6B, it may be seen that the each sequence of atomic functions shown in Figure 6A has been defined as a primitive (primitives 1-7). In effect, each primitive provides a shorthand way to identify a desired sequence of atomic functions to invoke. Figure 6C shows a primitive table which lists in tabular format the sequence of atomic functions for each primitive in Figure 6B, as well as a state/event table that defines th Ω relationships between the states, events and primitives of Figure 6B. In accordance with a preferred embodiment of the present invention, a customer wishing to create the protocol depicted in Figures 6A and 6B, would need only define the tables shown in Figure 6C. Those tables would then be downloaded to the switch 2 (Figure 1) through a series of messages from the host device. Figure 7A-7C are an example of the application of the present invention to a Network Protocol Layer 3 protocol for processing the initial phase of call setup using international compelled R2 signalling. The protocol begins with the associated channel in normal state 1 (NS1) 72, which is the IDLE state. Upon the occurrence of the event of receiving line signalling bits 0011 (which are the bit values that signal an inseizure), a series of atomic functions are performed (afl7, afl9, af21 and afl). Those atomic functions operate, respectively, to set the current inseize instruction list to the default switch list, set the current instruction index to 0, to test the current inseize instruction and then set the next state to internal state 2 (IS2) 74. If the next event is a layer 3 internal event 0 (L3_INT_EVENT_0), which signifies that the current inseize instruction was tested and found to be null, then atomic function af22 is performed, which purges the channel. However, if the next event is a layer 3 internal event 7 (L3_INT_EVENT_7), which signifies that the current inseize instruction is to generate an inseize acknowlege, then atomic function af30 is performed which checks to see if the next inseize instruction is to receive stage N digits, followed by atomic function afl which sets the next state to internal state 3 (IS3). If the next event is L3_INT_EVENT_0 or FALSE, which signifies that the next inseize instruction is not to receive stage N digits, then the protocol proceeds to perform atomic function af2 (transmitting a seizure acknowledge having bit values 1101). If the next event is L3_INT_EVENT_1 or TRUE, atomic function 31 is performed which is a setup for R2 forward digit reception, followed by atomic function af2 (transmitting seizure acknowledge). Setup for digit reception typically involves allocation of a DSP resource found on a DSP card 16 (Figure 1) . Next, atomic function af5 is performed, which sets a timer (timerl) to establish a waiting period for the expected first digit. This is followed by atomic function afl, which sets the next state to normal state 4 (NS4), which indicates that the inseizure has been acknowledged and that the channel is expecting to receive a Group 1 Forward MFR2 Signal. Again, as shown in Figure 7B, each sequence of atomic functions shown in Figure 7A may be defined as a primitive (1- 5). Figure 7C shows the corresponding primitive table and state/event table for Figure 7B. Figure 8A is another example of an application of the present invention in Network Protocol Layer 3 protocol for processing the initial phase of call setup using Tl E&M wink start signalling. The protocol begins in a normal state (NSl) 80. Upon the receipt of bit values 11, which represent an inseizure, the atomic function a 30 is performed, which tests whether collection of stage 1 digits is indicated. This is followed by atomic function afl, which sets the next state to internal state (IS2) 82. If the next event is L3_INT_EVENT_0 or FALSE, meaning that digit collection is not indicated, then the protocol performs atomic function af5 (setting timerl for a pre-wink delay), followed by afl to set the next state to normal state (NS3) 84. If the next event is L3_INT_EVENT_1 or TRUE, meaning that digit collection is indicated, atomic function 31 is performed which is a setup for MFRl digit reception, followed by af5 and afl. Upon the expiration of timerl (TIMER1_EXPIRATI0N), atomic function af2 is performed (wink on), followed by atomic functions af5 (setting a timer for the wink duration) and afl to set the next state to normal state (NS4) 86. Again, upon the expiration of timerl, atomic function af2 is performed (wink off), followed by af5 (setting timerl to wait for a digit string) and afl to set the next state to normal state (NS5) 88. Figure 8B shows the correlation of between the atomic functions shown in Figure 8A and primitives 1-5, and Figure 8C shows the corresponding primitive table and state/event table by which a user or customer may define the described protocol. Figure 9A is an example of an application of the present invention in Call Processing Layer 4. In this example, the present invention is used to implement a protocol for providing interactive voice response (IVR) to an incoming call. The protocol begins in an IDLE state (SI) 90. Upon the receipt of a setup message (L3_SETUP_INDICATION) , the atomic functions afl, af2, af3, af4 and af5 are performed. These atomic functions serve, respectively, to send an alerting message to Network Protocol Layer 3, to send a connect message (to answer the call) to Layer 3, to send a message to allocate a DSP resource for interactive digit string collection, to set timerl to wait for allocation of the DSP resource and to set the next state to normal (wait) state (NS2) 92. If the next event is the expiration of timerl (TIMER1_EXPIRATI0N), atomic function af6 is performed to reset the channel. If the next event is receipt of a message indicating that the DSP resource was allocated, atomic function af7 is performed, which connects the caller to a desired announcement, followed by af4 which sets timerl for digit wait, and af5 which sets the next state to normal state (S3) 94 to wait for digits. If the next event is the expiration of timerl, the protocol again performs atomic function 7 (replays the announcement to the caller) . If the next event is receipt of digits by the allocated DSP resource, the atomic functions af8 (informing Layer 5 that digits were received), af4 (setting timerl to wait for instruction from Layer 5) and af5 (setting the next state to normal state (S4) 96. Again, Figures 9B and 9C show the relationships between the states, events, atomic functions and pr itives which define the IVR protocol of Figure 9A. Finally, Figure 10A is an example of an application of the present invention in the context of Application Layer 5. In this example, a protocol for an inbound application such as toll free (800) service is described. The protocol begins in a normal state (SI) IDLE 98. Upon receipt of a request for service with digits message from Layer 4 (L4_REQ_F0R_SERV_WITH_DIGITS), atomic functions afl (send an acknowledge message to Layer 4), af2 (sending to Layer 5 Route Control (process) a message with a channel ID and digits), af4 (setting a timer to wait for a response from Layer 5 route control) and af5 (setting the next state to normal state (S2) 100) are performed. In state (S2) 100, if the next event is the expiration of timerl, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 5 route control to connect the channel which requested service, atomic function af7 is performed, which sends a message to Layer 4 to connect two channels. This is followed by af4, which sets a timerl to wait for an acknowledgement that the connection was made, and then af5 which sets the next state to normal (wait) state (S4) 104. In state (S4) 104, if the next event is expiration of timerl, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 4 acknowledging that a connection was made (L4_L5nCONNECT_ACK), atomic function af6 disables timerl, followed by af5 which sets the next state to normal state (S5) 106. Upon receipt of a message from Layer 4 indicating release of the channel, atomic function af3 is used to send an acknowledgement to Layer 4, followed by af5 which returns the channel to the IDLE state 98. With reference again to state 100, if the next event is a message from Layer 5 route control to queue the incoming call to a group, atomic function af9 is performed, which connects the caller to a recorded announcement. This is followed by atomic function af4, which sets timerl to wait for an acknowledgement from Layer 4, which is in turn followed by af5 to set the next state to normal state (S3) 102. In state (S3) 102, if the next event is the expiration of timer 1, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 4 acknowledging that a connection was made, af6 is performed to disable timerl and af4 is performed to set timer2 for possible replay of the recorded announcement. Thus, if channel remains in state (S3) 102 long enough for timer2 to expire, the protocol will again perform af9 and replay the announcement. If, however, in state (S3) 102 the next event is a message from Layer 5 route control to connect the channel which requested service, atomic function af6 is performed to disable timer2, followed by af7, which sends a message to Layer 4 to connect two channels. This is followed by af4, which sets a timerl to wait for an acknowledgement that the connection was made, and then af5 which sets the next state to normal (wait) state (S4) 104. Figures 10B and 10C show the relationships between the states, events, atomic functions and primitives which define the toll free service protocol of Figure 10A. The foregoing description has been limited to a specific embodiment of this invention. It will be apparent, however, that variations and modifications may be made to the invention, with the attainment of some or all of the advantages of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.

Claims: CLAIMS 1. A method for operating a programmable telecommunication switch, said switch comprising controllable-switching means for dynamically connecting or disconnecting communication paths between various ones of a plurality of channels in response to messages generated by a host device, said method comprising the steps of: defining one or more communication protocols for processing incoming or outgoing calls, each of said communication protocols being represented by a finite state machine; initially assigning at least one of said protocols to each of said channels, whereby different protocols may be assigned to different channels; and upon detection of an incoming call or origination of an outgoing call at one of said channels , determining whether the protocol presently assigned to said one of said channels is capable of processing said incoming or outgoing call and when said presently assigned protocols incapable of processing said incoming or outgoing call, dynamically selecting another of said protocols which is capable of processing said incoming or outgoing call and using said selected protocol to process said incoming or outgoing call. 2. The method as in claim 1 wherein each of said finite state machines is represented by a state/event table in conjunction with a primitive table, said state/event table defining a plurality of predetermined logical states and at least one predetermined event associated with each such state, said primitive table defining one or primitives each of which comprises a predetermined series of predetermined functions, whereby upon an occurrence of one of said predetermined events a predetermined primitive associated with the occurring event is invoked. 3. The method as in claim 2 wherein each of said channels is assigned a corresponding data block which includes information representing a current logical state and state type of the corresponding channel, a pointer to an active state/event table, a pointer to an active primitive table, a pointer to an assigned state/event table and a pointer to an assigned primitive table. 4. The method as in claim 3 wherein said finite state machines are interpreted by a state machine engine which operates in response to said pointers and a library which contains definitions of said predetermined functions. 5. The method as in claim 1 wherein one or more of said protocols is user-defined and downloaded for storage within said telecommunication switch. 6. The method as in claim 1 wherein one or more of said protocols is resident within said telecommunication switch. 7. A method for developing communication protocols to be used with a programmable telecommunications switch, said switch comprising controllabie-switching means for dynamically connecting or disconnecting communication paths between various ones of a plurality of channels in response to messages generated by a host device, said method comprising the steps of: creating one or more state/event tables each of which defines a plurality of predetermined logical states, at least one predetermined event associated with each logical state, and a primitive associated with each said event which is invoked upon an occurrence the associated event; creating one or more primitive tables each of which defines a predetermined series of predetermined functions for each said primitive; creating one or more communication protocols each of which is represented by a predetermined combination of one of said state/event tables and one of said primitive tables.; storing said one or more of said communication protocols within said programmable telecommunications switch; and assigning at least one of said communication protocols to each of said channels. 8. The method as in claim 7 wherein upon detection of an incoming call or origination of an outgoing call at one of said channels, determining whether the communication protocol presently assigned to said one of said channels is capable of processing said incoming or outgoing call and when said presently assigned protocol is incapable of processing said incoming or outgoing call, dynamically selecting another one of said protocols which is capable of processing said incoming or outgoing call. 9. The method as in claim 8 wherein each of said channels is assigned a corresponding data block which includes information representing a current logical state and state type of the corresponding channel, a pointer to an active state/event table, a pointer to an active primitive table, a pointer to an assigned state/event table and a pointer to an assigned primitive table. 10. The method as in claim 9 wherein said finite state machines are interpreted by a state machine engine which operates in response to said pointers and a library which contains definitions of said predetermined functions. 11. A programmable telecommunications switch comprising: controllable-switching means for dynamically connecting or disconnecting communication paths between various ones of a plurality of channels in response to messages generated by a host, including a time slot interchange for switching a plurality of time slots corresponding to said channels and means for processing said messages; one or more means connected in communicating relationship with said switching means for terminating either analog or digital lines or trunks which represent said channels; and means for storing one or more communication protocols, each of said channels having one of said communication protocols assigned thereto; means for detecting incoming calls or origination of outgoing calls on any of said channels and determining whether the protocols assigned to the channels on which said calls are 5 occurring are capable of processing said calls; and means, responsive to said detecting means, for dynamically selecting alternative protocols from among said resident and user-defined protocols which are capable of processing said calls when said assigned protocols are o incapable of processing such calls. 12. The switch as in claim 11 wherein each of said protocols is represented by a finite state machine. s 13. The switch as in claim 12 wherein each of said finite state machines is defined by a state/event table in conjunction with a primitive table, said state/event table defining a plurality of predetermined logical states and at least one predetermined event associated with each such state, said o primitive table defining one or primitives each of which comprises a predetermined series of predetermined functions, whereby upon an occurrence of one of said predetermined events a predetermined primitive associated with the occurring event is invoked. 5

Inventors: HEBERT MARK P, HEBERT, MARK, P.
Applicants: EXCEL IND, EXCEL, INC.
Application year: 1994
Main classification: H04L29
IPC codes: G06F13, H04L29, H04M3, H04Q3