Universal state machine for use with a concurrent state machine space in a telecommunications network6260186Abstract A state machine space for concurrent state machines is provided for use in a telecommunications system. Universal State Machines (USMs) use a universal data structure (representing an event in the telecommunications system) as a way for the system architect to dynamically alter the how the events are handled. The USMs are designed to function concurrently with other USMs without requiring explicit knowledge of other USMs or their functionality. A USM definition (USMD) defines a state machine and contains configuration, states and transitions information. An instantiation of a USM includes a USM definition pointer, a current state indicator, a current event processor indicator, and optional lists of event processors and spawned child state machines (other USMDs). Other state machines may be hooked or referenced by a main state machine in its definition. Upon instantiation of the main state machine, other state machines may be hooked or referenced and processing control is transferred to the hooked or referenced state machines to perform functions. Claims What is claimed is: Description CROSS REFERENCE TO RELATED APPLICATIONS
UniversalDataStructure:: = EVENTS Events.sub.--
COMPONENTS Components.sub.--
ENUMS Enums.sub.--
DATA Data.sub.--
Events:: = [ Event Events .vertline. e
Event:: = NUMBER STRING ComponentPermissions DataPermissions
Components:: = [ Component ] Components .vertline. e
Component:: = NUMBER STRING EventPermissions DataPermissions
Enums:: = [ Enum ] Enums .vertline. e
Enum:: = NUMBER STRING ( EnumSymbols )
EnumSymbols:: = EnumSymbol .vertline.
EnumSymbol : EnumSymbols
EnumSymbol:: = NUMBER STRING
Data:: = [ Datum ] Data .vertline. e
Datum:: = NUMBER STRING DataType EventPermissions
ComponentPermissions
DataType:: = BOOL .vertline.
SCALAR .vertline.
ENUM NUMBER .vertline.
ARRAY
PermissionMarker:: = READ .vertline. WRITE .vertline. READWRITE
Permissions:: = Permission Permissions .vertline. e
Permission:: = PermissionMarker NUMBER
EventPermissions:: = Permissions
ComponentPermissions:: = Permissions
DataPermissions:: = Permissions
.COPYRGT. 1997 Northern Telecom Limited
Event definitions define the telephony events that are valid for a call-processing system. Which particular events are used is dependent upon the designer and the needs of the system. Shown below are examples of typical events in a telecommunications network that will be processed by the call processing system. As will be appreciated, the list of events below is not an exhaustive list but merely illustrates examples of events that may be processed in accordance with the present invention. The number and type of events for a given system is dependent on the design of the given system and the desired functionality. Event Definition:
id events
[ 0 "Error" ]
[ 1 "Time Alarm Occurred" ]
[ 2 "Message" ]
[ 3 "Interrupt" ]
[ 4 "Origination" ]
[ 5 "Origination Ack" ]
[ 6 "Ringing" ]
[ 7 "Answer" ]
[ 8 "Release" ]
[ 9 "Release Ack" ]
[ 10 "Termination" ]
[ 11 "Redirect" ]
[ 12 "Set Voice Path" ]
[ 13 "Billing" ]
[ 14 "Authorization Request` ]
[ 15 "Authorization Response` ]
[ 16 "Screening Request" ]
[ 17 "Screening Response" ]
[ 18 "Translation Request" ]
[ 19 "Translation Response" ]
[ 20 "Routing Request" ]
[ 21 "Routing Response" ]
[ 22 "Digits Request" ]
[ 23 "Digits Response" ]
[ 24 "Creation Request" ]
[ 25 "Creation Response" ]
[ 26 "Retrieval Request" ]
[ 27 "Retrieval Response" ]
[ 28 "Generic Processing Response" ]
[ 29 "Conference Unit Response" ]
[ 30 "Transfer Units Response" ]
.COPYRGT. 1997 Northern Telecom Limited
The event definitions are configurable and include an event identifier (ID number) and event name information (Name) (optional). The exact semantics of these events is determined by the system architect and the system architect's evaluation and determination of the functionality of the state machines and components of the system. The event definition provides configurability and may be altered at run-time. As will be appreciated, the event identification number may be an alphanumeric identification number, e.g., A334_Z, or some other symbol. However, integers are sufficient as shown above. Accordingly, a UDS will include in its event field an identification number to identify the event represented by the UDS. For example, if the UDS event field contains a "04", the UDS represents an origination event. Optionally, each event definition may also include information indicating which data values and/or components are valid for a particular event. This would allow an event (UDS) to "see" only the data that pertains to that particular event or vice versa. For example, it may be logical that a Timeout event does not need access to a called number and, as such, a Timeout event (UDS) should not have access to called number data. Likewise, it might not be desirable for a translation component to generate an origination event. One skilled in the art may use such restrictions in the system to prevent inconsistent accesses to data. Accordingly, the event definition may include additional data fields for indicating or identifying which component(s) within the system and/or which data are valid (or allowed) for a particular defined event, and for indicating version information. Component type definitions define which types of components in the system are capable of receiving and sending events. Which particular components are used is dependent upon the designer and the needs of the system. Shown below are examples of typical component types in a telecommunications network that provide functionality in a call processing system. As will be appreciated, the list of components below is not an exhaustive list but merely illustrates examples of components that may be utilized in a given system in accordance with the present invention. The number and type of components for a given system is dependent on the design of the given system and the desired functionality. Component Type Definition:
id component
[ 0 "Invalid" ]
[ 1 "Proxy" ]
[ 2 "Call" ]
[ 3 "Facility" ]
[ 4 "Call Segment" ]
[ 5 "Call Topology" ]
[ 6 "Billing Operations" ]
[ 7 "Operational Measurement & Logs" ]
[ 8 "Remote Event Handler" ]
[ 9 "Utility" ]
.COPYRGT. 1997 Northern Telecom Limited
The component type definition information is similar to event definition information, and includes at least a component type identifier (ID number) and component type name information (Name) (optional). Optionally, each component type definition may also include information indicating which events and data are accessible to that type of component, and may also contain a "component ID" if there is more than one component of that particular component type. Accordingly, the component definition may include additional data fields for indicating or identifying which event(s) and/or which data are valid (or allowed) for a particular defined component, and for indicating version information. Data definitions define which items of data are valid for the system. Which particular data used is dependent upon the designer and the needs of the system. Shown below are examples of data typically utilized in a telecommunications network for call processing control. As will be appreciated, the list of data fields below is not an exhaustive list but merely illustrates examples of data that may be utilized in a given system in accordance with the present invention. The type of data and number of data fields for a given system is dependent on the design of the given system and the desired functionality. Data Definition:
id data
[ 0 "Unused" SCALAR ]
[ 1 "NOC" SCALAR ]
[ 2 "USI" ARRAY ]
[ 3 "FCI" SCALAR ]
[ 4 "FCI 2" SCALAR ]
[ 5 "MFCSI" SCALAR ]
[ 6 "NSF" ARRAY ]
[ 7 "SI" SCALAR ]
[ 8 "Generic Digits" ARRAY ]
[ 9 "TNS" ARRAY ]
[ 10 "CPC" SCALAR ]
[ 11 "ChGNum NOA" SCALAR ]
[ 12 "ChGNum NPI" SCALAR ]
[ 13 "REL Cause" ARRAY ]
[ 14 "Calling Party Category" ENUM 8 ]
[ 15 "Information Transfer Capability" ENUM 9 ]
[ 16 "Coding Standard" ENUM 10 ]
[ 17 "Voice Path Information Transfer Rate" ENUM 11 ]
[ 18 "Voice Path Transfer Mode" ENUM 12 ]
[ 19 "Establishment" ENUM 13 ]
[ 20 "Configuration" ENUM 14 ]
[ 21 "Structure" ENUM 15 ]
[ 22 "Dest-Orig Information Transfer Rate" ENUM 11 ]
[ 23 "Symmetry" ENUM 16 ]
[ 24 "Bearer Capability" ENUM 26 ]
[ 25 "Multiplier or Layer ID" ENUM 18 ]
[ 26 "User Rate" ENUM 19 ]
[ 27 "Asynchronous" BOOL ]
[ 28 "Nature of Address" ENUM 20 ]
[ 29 "Numbering Plan Indicator" ENUM 21 ]
[ 30 "Called Number" ARRAY ]
[ 31 "Terminating Switch ID" SCALAR ]
[ 32 "Terminating Trunk Group" SCALAR ]
[ 33 "Calling Number" ARRAY ]
[ 34 "Screening Indicator" ENUM 22 ]
[ 35 "Presentation Restriction Indicator" ENUM 23 ]
[ 36 "Backward Charge Indicator" ENUM 24 ]
[ 37 "Backward Called Party Status" ENUM 25 ]
[ 38 "Backward Called Party Category" ENUM 26 ]
[ 39 "Backward End-to-End Method" ENUM 3 ]
[ 40 "Backward Interworking Indicator" BOOL ]
[ 41 "Backward ISDN User Part" ENUM 4 ]
[ 43 "Backward Reverse Holding" BOOL ]
[ 44 "Backward ISDN Access" ENUM 6 ]
[ 45 "Forward Call Special Indicator" SCALAR ]
[ 46 "Origination Trunk Group" ARRAY ]
[ 47 "Origination Switch ID" ARRAY ]
[ 48 "Time Stamp" SCALAR ]
[ 49 ""Access Transport" ARRAY ]
[ 50 "Current Call ID" ARRAY ]
[ 51 "Current Nodes Point Code" ARRAY ]
[ 52 "Charge Number" ARRAY ]
[ 53 "Orig TID" SCALAR ]
[ 54 "Orig TOD" SCALAR ]
[ 55 "Answ TOD" SCALAR ]
[ 56 "Term TOD" SCALAR ]
[ 57 "TSID TTG Indicator" BOOL ]
[ 58 "Dedicated Termination" BOOL ]
[ 59 "No CLI" SCALAR ]
[ 60 "MNO" BOOL ]
[ 61 "Spare Array 10" ARRAY ]
[ 62 "MCI FSCI" ARRAY ]
[ 63 "MCI BCSI" ARRAY ]
[ 64 "Spare Array 13" ARRAY ]
[ 65 "Spare Array 14" ARRAY ]
[ 66 "Spare Array 15" ARRAY ]
[ 67 "Spare Array 16" ARRAY ]
[ 68 "Spare Array 17" ARRAY ]
[ 69 "Spare Array 18" ARRAY ]
[ 70 "Spare Array 19" ARRAY ]
[ 71 "Spare Array 20" ARRAY ]
[ 72 "Spare Array 21" ARRAY ]
[ 73 "Spare Array 22" ARRAY ]
[ 74 "Spare Array 23" ARRAY ]
[ 75 "Spare Array 24" ARRAY ]
[ 76 "Spare Array 25" ARRAY ]
[ 77 "Spare Array 26" ARRAY ]
[ 78 "Spare Array 27" ARRAY ]
[ 79 "Originating Line Info" ARRAY ]
[ 80 "OSID OTG Spare" SCALAR ]
[ 81 "TCM Spare" SCALAR ]
[ 82 "Protocol" ENUM 24 ]
[ 83 "Screening Result" ENUM 25 ]
[ 84 "Translation Result" BOOL ]
[ 85 "Agent ID" SCALAR ]
[ 86 "Routing Result" ENUM 27 ]
[ 87 "Creation Result" BOOL ]
[ 88 "Retrieval Result" BOOL ]
[ 89 "Digits" ARRAY ]
[ 90 "Route Request Type" ENUM 28 ]
[ 91 "Auth ID" ARRAY ]
[ 92 "Auth Passcode" ARRAY ]
[ 93 "Auth Result" ARRAY ]
[ 94 "Information Indicator" SCALAR ]
[ 95 "Star Component" ENUM 29 ]
[ 96 "User Assigned ID" SCALAR ]
[ 97 "Generic Cause Value" ENUM 30 ]
[ 98 "Signalling Point Code" ARRAY ]
[ 99 "Network Call Identifier" ARRAY ]
[ 100 "Translation Type" ENUM 31 ]
[ 101 "Screening Type" ENUM 32 ]
[ 102 "Message Type" SCALAR ]
[ 103 "Incoming Voice Path State" ENUM 33 ]
[ 104 "Outgoing Voice Path State" ENUM 33 ]
[ 105 "Generic Processing Response Value" BOOL ]
[ 106 "Route List" ARRAY ]
[ 107 "Conference Unit Port List" ARRAY ]
[ 108 "IP Agent ID" SCALAR ]
[ 109 "Card Number" ARRAY ]
[ 110 "Number of Transfer Units" SCALAR ]
[ 111 "Trunk Group" SCALAR ]
[ 112 "Trunk Group Member" SCALAR ]
[ 113 "IP Called Party Number" ARRAY ]
[ 114 "Customer Number" SCALAR ]
.COPYRGT. 1997 Northern Telecom Limited
Each data definition requires at least a data identifier (ID number), data name information (Name) (optional), and data type indicator (Data Type). As with event and component definitions, each data definition may optionally contain information indicating which events and/or components are valid for this piece of data. Accordingly, the data definition may include additional data fields for indicating or identifying which event(s) and/or which component(s) are valid (or allowed) for particular defined data, and for indicating version information. The data type indicator may include range, symbols, and other information depending upon the data type. In the present invention, there are preferably four basic data types that are used to normalize call data in a telecommunications system: boolean ("bool"), scalar, array, and enum (enumeration). It will be understood that other data types may be used. In other systems, additional data types may be used such as strings and floating points, etc. The bool type represents a boolean value of true or false. The scalar type represents a scalar value within an optionally defined range. If no range is given, then the range defaults to whatever is maximal for the size of an integer for the implemented system. In a preferred embodiment, a specific range is given and, if not, then a single default range should be used consistently across platforms that may be using UDSs. The array type represents an array of scalar values. Minimum and maximum length values are optionally included with the array, and a range may be optionally applied to the values, as with the scalar type. The enum type represents a symbolic value that belongs to one of the enums defined in the enums part of the UDSD (described below). An enum is a named set of symbols, each of which is associated with a distinct scalar value. The enum type is provided to allow for non-contiguous range definition and value-symbol (or value-name) association on a scalar value. The enum type for a given data item is an ID or name indicating which particular enum definition, as defined in the enums definition part of the UDSD, the data item utilizes. The enum definition part of the UDSD defines valid enums for the system. Shown below are examples of enums that may be used in a telecommunications network. As will be appreciated, the list of enums below is not an exhaustive list but merely illustrates examples of enums that may be utilized in a given system in accordance with the present invention. The number and type of enums, and the data they represent, for a given system is dependent on the design of the given system and the desired functionality. Enum Definition:
id enums
[1 "continuity":
( 0 "continuity check not required":
1 "continuity check required":
2 "continuity check performed on previous circuit") ]
[2 "call indicator"
( 0 "national call":
1 "international call") ]
[3 "end to end method indicator"
( 0 "no end to end method available":
1 "pass along method available":
2 "SCCP method available":
3 "both methods available":
[4 "ISDN UP indicator"
( 0 "ISDN UP used all the way":
1 "ISDN UP not used all the way") ]
[5 "ISDN UP preference indicator"
( 0 "ISDN UP preferred all the way":
1 "ISDN UP not required all the way":
2 "ISDN UP required all the way":
[6 "ISDN access indicator"
( 0 "non ISDN access":
1 "ISDN access") ]
[7 "SCCP method indicator"
( 0 "no indication":
1 "connectionless method available":
2 "connection oriented method available":
3 "both methods available") ]
[8 "calling party category"
( 0 "unknown":
1 "french operator":
2 "english operator":
3 "german operator":
4 "russian operator":
5 "spanish operator":
10 "ordinary call subscriber":
11 "priority subscriber":
13 "test call":
15 "payphone":
16 "digital data call") ]
[9 "information transfer capability"
( 0 "speech":
8 "unrestricted digital information":
9 "restricted digital information":
16 "3.1 kHz audio":
24 "7 kHz audio":
18 "15 kHz audio") ]
[10 "coding standard"
( 0 "CCITT":
1 "other international":
2 "national") ]
[11 "info transfer rate"
( 0 "channel size":
1 "channel size":
16 "64 kbps":
19 "384 kbps":
21 "1536 kbps":
23 "1920 kbps") ]
[12 "vp transfer mode"
( 0 "circuit mode":
1 "packet mode") ]
[13 "establishment"
( 0 "on demand":
1 "permanent":
[14 "configuration"
( 0 "point to point":
3 "multipoint") ]
[15 "structure"
( 0 "default":
1 "8 kHz integrity":
4 "service data unit integrity":
7 "unstructured") ]
[16 "symmetry"
( 0 "bidirectional symmetric":
1 "bidirectional asymmetric":
2 "orig to dest":
3 "dest to orig":
[18 "multiplier or layer"
( 0 "bearer":
1 "user info layer 1":
2 "user info layer 2":
3 "user info layer 3") ]
[19 "user rate"
( 2 "1.2 kbps":
3 "2.4 kbps":
5 "4.8 kbps":
8 "9.6 kbps":
11 "19.2 kbps":
15 "56.0 kbps") ]
[20 "nature of address"
( 1 "subscriber number":
3 "national number":
4 "international number":
6 "abbreviated number":
113 "operator requested subscriber number":
114 "operator requested national number":
115 "operator requested international number":
116 "operator requested no number":
117 "cut through to carrier":
118 "950 call":
119 "test call":
120 "mci vnet":
122 "operator to operator":
123 "operator to operator outside USA":
124 "direct termination overflow") ]
[21 "numbering plan"
( 0 "unknown":
1 "ISDN":
3 "CCITT data":
4 "CCITT telex":
5 "private") ]
[22 "screening indicator"
( 0 "user provided not screened":
1 "user provided passed screen":
2 "user provided failed screen":
3 "network provided") ]
[23 "address presentation restriction"
( 0 "presentation allowed":
1 "presentation restricted":
2 "address unavailable") ]
[24 "protocols"
( 0 "Nortel ISUP":
1 "Nortel PRI") ]
[25 "screening results"
( 0 "complete":
1 "block":
2 "invalid calling card":
3 "invalid debit card") ]
[26 "bearer capability"
( 0 "Speech":
1 "Unrestricted 64 kps":
2 "Restricted 64 kps":
3 "Unrestricted 56 kps":
4 "3.1 kHz Audio") ]
[27 "routing results"
( 0 "success":
1 "failure":
2 "already allocated") ]
[28 "route request types"
( 0 "normal":
1 "vpn") ]
[29 "star components"
( 0 "invalid":
1 "proxy":
2 "star call":
3 "fop":
4 "csp":
5 "ctp":
6 "bop":
7 "omlp":
8 "remote event handler":
9 "star utility") ]
[30 "generic cause values"
( 0 "normal clearing":
1 "all routes busy") ]
[31 "translation types"
( 0 "invalid":
1 "nanp":
2 "tsid/ttg":
3 "operator":
4 "treatment") ]
[32 "screening types"
( 0 "invalid":
1 "nanp":
2 "calling card":
3 "debit card":
4 "long-distance phone-tag") ]
[33 "voice path states"
( 0 "active":
1 "inactive":
3 "no change") ]
.COPYRGT. 1997 Northern Telecom Limited
Each enum definition includes an enum identifier (Enum ID number) and a set of symbol-scalar value associations. For example, the data field named "calling party category" (data id=14) is defined to contain data of the type "enum 8" (see above). Accordingly, the data contained within the "calling party category" data field of a UDS will include one of the IDs to represent the identity of the calling party (see above). 2. Instantiated Universal Data Structure (UDS). The representation of an instantiated UDS (as defined by the foregoing UDSD) consists of the event value, the component value, and data values. The event value identifies the event represented by the UDS. The component value identifies the component that originated the event, if any. The data value includes the data for the UDS. The UDS consist of normalized data representing or relating to an "event." The event value identifies which of the n events defined in the UDSD is represented by the UDS. For example, if a call control component makes a translation request to a translation component, the call control component will instantiate a UDS, set the event value to "translation request", set the component value to "call control" (itself), fill the appropriate data values with information to be used for the translation, and relay the UDS to the translation component. Also, the translation component also requires a return address pointer (generated by the call control component, and not part of the UDS) identifying a location (i.e., component) to send the response, if any. The component value identifies which of the components of the system is originating the event. The component value includes the type of component and an identifier of some sort. For example, if a call control component is making a "translation request" to a translation component, the call control component would set "call control component" as the component type and some unique number for the component identifier. The translation component may treat the request differently than it would if it came from a routing processor. The component value provides components and information on state machines needed to alter functionality based upon from where events originate. In the preferred embodiment, the component value is not used as a return address, but it may be so used. Data values are the actual values held for data pertaining either to the event represented by the UDS or to the component, system, or sub-space that needs to maintain persistent data of some sort. The number of data values per UDS may range from zero to any finite number. As described above, the UDSD includes event, component type, data and enum definitions which are used to define UDS instantiations. The UDS consists of event, component and data values. Now referring to FIG. 4, there is illustrated a graphical example of the contents and relationships for the UDSD and UDS. The data storage for one or more UDSs is preferably implemented using pre-allocated memory within the system and the data values of the UDS point to the memory locations that actually store the data. For example, assuming there are N data fields defined in the UDSD, each data value in an instantiated UDS will include block information and byte information which points to a particular block and byte of memory that contains the actual data for that data field. Alternatively, other methods of implementation may be utilized whereby the data values consist of the actual data stored in memory, or a pointer to an address location, etc. A typical instantiated UDS may be represented in the form (04, 03, 30:block0/byte0, 33;block0/byteX, 14:block0/byteY, . . . , XX:block0/byteN). Referring back to the definitions above, the foregoing UDS would represent an origination event that was originated from the facilities component, and includes "called number" data residing (or beginning) at memory location block0/byte0, "calling number" data residing at memory location block0/byteX, "calling party category" data residing at memory location block0/byteY, and so on, for the particular data ID numbers associated with the UDS. The UDS may also be represented in serialized form, such as a bytestream, and may include appropriate markers. A UDS may contain information relating to all, or any number of, data fields defined. In addition, depending on the particular implementation, some of the designated memory locations may contain no information (i.e., a null memory location id may be used). In the case of a data field being defined as an "enum", the memory location would include data (a number or value) that represents one of the enum values possible for that particular enum. For example, assuming data field identified as "14" is defined as the enum "calling party category", then the memory location block0/byte3 would include a number from "0" to "n" to identify the calling party category data. This is because the system knows, by referring to the UDSD, that data field "14" contains enum data defined by "enum 8" which is defined to represent a plurality of possible data values identified by the ID (see above). One advantage of the UDS is its optional usage of information protective/hiding features. The ability to set permissions at the event-component-data level allows for information security. UDS information hiding can be applied to information security on at least two levels; first protecting information from the system and then protecting information from users. In the case of protecting information from the system, events are segregated according to component and data is segregated according to event and component. Especially in service design, it is advantageous for the service designer to know his or her informational limitations; what events and data to which the designer has access in a given component. For example, a facilities call processor should not know the calling card number of the caller, nor should it know what is a Screening Response event. Likewise, a Timeout event should not be able to contain, and thus change, the called number. In case of user information protection, there may be situations in which information needs to be protected for the user. For example, assume that the system is organized such that an FCP may be shared by two CSPs. On one CSP, there is a regular call feature running (the caller A is a consumer calling proprietor B). On another CSP, a credit card validation service C is connected to perform a purchase transaction, but in such a way that prevents A from getting any information about B's credit card (a private pin number, for instance). If we hide the "PIN" data item from the FCP, then we help prevent the PIN number from being stored in the FCP and thus help to keep it from being transferred easily to caller A's CSP. This type of information hiding may also be used to minimize the amount of data stored in active memory for a UDS at any given time. Another unique option is the ability to make use of "private" UDS definitions that are used non-globally by USMs. For instance, a particular Debit Card service may desire to keep track of information that applies only to its service. The Debit Card service provider may submit a "private" UDS definition along with its state machines and activation information. When the service is instantiated, an instance of the private UDS using its private UDS definition is instantiated alongside and is accessed only by that state machine. This helps to keep the global UDS (the main UDS that is necessary to provide inter-component communication) from getting cluttered with information that only applies to certain features in certain components. C. Universal State Machine (USM). The Universal State Machine (USM) of the present invention provides a mechanism to dynamically change the way events are handled in the telecommunications system. Events handled or processed by a USM are in the form of a UDS which permits consistent use of call data in call control. The USM is designed to be flexible, and methods are introduced to allow for various types of interaction with other state machines without having to have explicit knowledge of other existing state machines. Special services in a telecommunications environment can be developed using USMs in such a way that a service designer need only have limited knowledge of other state machines that may be operating on the system. A USM resides in a COSMAS Sub-Space (described further below) which handles service triggering and ensures safe USM interaction. In this way a service designer is able to concentrate more on the service defined by the state machine than on how the service may fit into the whole system. Use of USMs provides a convenient mechanism in the sense that a particular service defined by the USM is modular and is easily re-used by other USMs that desire to "reference" or "hook" it. Differentiation is made between the Universal State Machine definitional (USMD) and instantiated parts (USM). Definitional information is the definition of the state machine itself, including states, transitions, hooks, references to other USMDs, function call references, etc. Instantiated information identifies the USMD associated with the instantiated USM (i.e., a particular instance of state machine) and indicates the status of that particular instance of the state machine. If the USMD of the current USM hooks or references other USMs (each having its own associated USMD), the instantiated USM may include information identifying the hooked/referenced state machine that is active and may additionally identify the status or current state of the hooked/referenced state machine. USMD. However, the latter may not be preferable since the goal is to create a modular design. The USMD and USM are logical separations and do not have to exist in separate structures. 1. Universal State Machine Definition (USMD). Each USMD defines a state machine. The USMD contains configuration, states and transitions information. The configuration information includes general information about the USMD, such as name, attributes, etc. The states information includes information about the states within the particular state machine defined, including identification, name, etc. The transitions information includes information about transitions within the particular state machine as defined, including name, tail, head, criteria, etc. The following universal state machine definition file format grammar preferably provides an example of the USMD format in accordance with the present invention:
UniversalStateMachine:: = CONFIGURATION Configuration.sub.--
STATES States.sub.--
TRANSITIONS Transitions.sub.--
Configuration:: = NAME = STRING .vertline.
CSSD = STRING .vertline.
ABSORBING = BOOL .vertline.
ABSORBABLE = BOOL .vertline.
INTERRUPTABLE = BOOL .vertline.
REENTRANT = BOOL .vertline.
SHARED = BOOL .vertline.
PRIVATEADATA = NUMBER DEFAULT .vertline.
NUMBER LATEST .vertline.
NUMBER VERSION NUMBER NUMBER
States:: = [ State ] States .vertline. e
State:: = Stateitem State .vertline. e
StateItem:: = NUMBER = NUMBER .vertline.
LABEL = STRING .vertline.
TYPE = StateType .vertline.
REENTRY = ACTIVATE NUMBER .vertline.
REENTRY = DEACTIVATE NUMBER .vertline.
SPAWN = STRING NUMBER .vertline.
HOOKCMD = STRING STATE STRING .vertline.
HOOKCMD = STRING TRANS STRING .vertline.
X = NUMBER .vertline.
Y = NUMBER
StateType:: = NORMAL .vertline. HOOK STRING .vertline. REFERENCE
STRING
Transitions:: [ Transition ] Transitions .vertline. e
Transition:: = TransitionItem Transition .vertline. e
TransitionItem:: = FROMSTATE = NUMBER .vertline. e
TOSTATE = NUMBER .vertline.
TYPE = TransitionType .vertline.
NUMBER = NUMBER .vertline.
REENTRY = ACTIVATE NUMBER .vertline.
REENTRY = DEACTIVATE NUMBER .vertline.
SPAWN = STRING NUMBER .vertline.
HOOKCMD = STRING STATE STRING .vertline.
HOOKCMD = STRING TRANS STRING .vertline.
LABEL = STRING .vertline.
X = NUMBER .vertline.
Y = NUMBER .vertline.
H = NUMBER .vertline.
W = NUMBER .vertline.
EVENT = CriteriaMarker NUMBER .vertline.
ORIGCOMP = CriteriaMarker NUMBER .vertline.
ORIGCOMPID = CriteriaMarker NUMBER .vertline.
DATA = { Data } .vertline.
FUNCTIONS = { Functions }
TransitionType:: = NORMAL .vertline. DEFAULT .vertline. NULL
.vertline. HOOK STRING .vertline.
REFERENCE STRING
Data:: = [Datum] Data .vertline. e
Datum:: = NUMBER = DONT_CARE .vertline.
NOT_SET .vertline.
SET .vertline.
EQUAL .vertline.
NOTEQUAL .vertline.
GREATER .vertline.
LESS .vertline.
GREATER_EQUAL .vertline.
LESS_EQUAL .vertline.
e
DataValue:: = BOOL BOOL .vertline.
SCALAR NUMBER .vertline.
ENUM NUMBER .vertline.
ARRAYLEN NUMBER .vertline.
ARRAY (NUMBERLIST)
Functions:: = [ Function ] functions .vertline. e
Function:: = NUMBER = ( Function Parameters )
FunctionParameter:: = FunctionParameter FunctionParameters .vertline. e
FunctionParameter:: = BOOL NORMAL BOOL .vertline.
BOOL DATA Udsld Datald .vertline.
STRING NORMAL STRING .vertline.
NUMBER NORMAL NUMBER .vertline.
NUMBER EVENT_ID Udsld .vertline.
NUMBER COMPCLASS Udsid .vertline.
NUMBER COMPIID Udsld .vertline.
NUMBER DATA Udsld Datald .vertline.
NUMBER ARRAY_ITEM Udsld Datald NUMBER .vertline.
ARRAY NORMAL (NUMBERLIST) .vertline.
ARRAY DATA Udsld Datald
Udsld:: = NUMBER
Datald:: = NUMBER
.COPYRGT. 1997 Northern Telecom Limited
Configuration information consists of the name of the state machine, function set, and other attributes indicating how the state machine interacts with other state machines. The function set identifies the function set that is used by the state machine. Every USMD in the system has a unique name that may include versioning information. The name serves as an identifier and as such may be a number, name, version information, symbol or some combination thereof. The function set indicates which function set applies to this USMD. When a designer is creating a USMD, the designer needs to know which functions are callable by the USMD. The functions themselves are called within the system by the state machines via state machine interpreters and are system dependent. However, interface information is provided, and the designer must indicate which interface was used in the design. Generally, the function set corresponds to a particular function set defined for the COSMAS Sub-Space definition containing the USMD. The function set part of the configuration information consists of the function set name and/or ID. Each USMD has certain attributes which help to define how it is to interact with other USMDs. These attributes include information as to whether the USMD is absorbing (the USMD can absorb other USMDs), absorbable (the USMD can be absorbed by other USMDs), interruptable (the USMD can be interrupted), or shared (the USMD may be shared between contexts in a component). These attributes are described in detail below. These attributes are important when there is interaction among state machines. In telecommunications, this is especially important in cases of call merge and split. Attributes may be altered or changed dynamically at run time (i.e. dynamically programmable). Preferably, attributes are altered or changed dynamically by adding these attributes to the USMD whereby the attributes are set or unset according to the definition. Alternatively, a sub-space function call may be used. For example, the CSP may have a function called "Set USM Attribute" that takes an attribute id and a boolean value for setting that attribute. The function call will be initiated and called by the state machine upon a transition of the state machine (e.g., the USMD is defined to perform this function upon a transition. One reason for implementing dynamic changing of attributes is to provide protection for critical points within a state machine during which a state machine may desire to have the ability to refuse to be eliminated or interrupted. Absorbable: If a given state machine is absorbable, then the given state machine may be "commanded" by another state machine to exit. For example, in a call merge there is generally one side of a call that attempts to merge the other. Each side of a call has its own state machines, and if a merge occurs, there may be no reason to maintain all of the state machines from both sides of the call. Those state machines of one side of the call which are merged and marked "absorbable" will be exited (or deleted). Those state machines not marked "absorbable" are not removed and remain active, being utilized with the merging side of the call. Accordingly, the state machine designers may utilize this attribute when designing USMDs. Preferably, the default value for this attribute is "true". The term "commanded" may mean that another state machine actually commands the given state machine to exit. This term may also mean that when a conflict arises, the system examines the attribute information to determine the position (or state) of each state machine and whether or not a command to exit is appropriate for the state machine. The attribute, therefore, provides an implicit command. Absorbing: If a given state machine is absorbing, then the given state machine may "command" another state machine to exit. In the case of a call merge (see above), the merging state machines are in the command position and will implicitly command the merged call state machines to exit only if the merging state machines are absorbing. If the merging state machines are not absorbing, then control may transfer to the absorbing state machines in the merged call. Interruptable: A given state machine is interruptable when the given state machine may be put on "pause," thereby maintaining its current state and waiting to be reentered at a later time. There may a case in which another state machine may be in a position to absorb a call temporarily, during which time it may be more appropriate to simply put an absorbed state machine "on hold" until the absorbing state machine is done processing, rather than allowing the to-be-absorbed state machine to be consumed altogether. The last state of the interrupted state machine is kept for reentry, and interrupted state machine may be taken off hold directly or as a result of some other occurrence such as the releasing of a temporarily-absorbing state machine. Shared: A given state machine may be shared between contexts. A given component in the system may have different contexts of state machines for different components to which the given component may be connected or communicating. It may be desirable to share some state machines between such contexts. For example, a CSP may keep track of some number of other CSPs for one "call" in which it is involved, as well as other CSPs for another "call" in which it is involved. The CSP will keep different contexts for both calls and require its own unique state machines. However, call services may be split in such a way that the CSP will have state machines that control the context switching or provide a more base-layer of call service that is common to both calls. States information includes information as to the type of state for a particular state within the USMD. The types of states include entry, exit, reentry and regular states. An entry state defines a starting point and an exit state defines the ending point. A reentry state is optional and defines a reentry point (only used after state machine has been started). A regular state defines regular states in the state machine. Entry, exit, and reentry states are included in every USMD. Every state machine must have an entry point and an exit point. A reentry state is optionally added to allow for interrupts internal to the state machine once the state machine has started. For example, a desired function in the state machine may include, "if at any point HardwareFailure event occurs, then exit". The only restriction to these states with respect to transitions is that no transition may come from the exit state. These states may optionally contain condition information as described below with reference to the regular states. Regular states are defined and contain at least the following information, either explicitly or implicitly: ID, name (optional), type indicator, hook information (if a hook), reference information (if a reference), and verification condition information (optional). Whether or not hook and/or reference information is present in the data structure used to represent a state depends on the desired functioning of the USMD. The ID and name are used to identify a particular state. The addition of a name may be useful to the state machine designer. The type indicator indicates the state type: normal, hook, or reference. The hook information is utilized when the state type is a "hook," and likewise the reference information is used when the state is a reference, as indicated by the type. If a state is normal, then no additional information need be associated with the state. If the state is a hook, then other state machines (or an event processor) may be dynamically "hooked" into the state. If a state is a reference, then another state machine (or an event processor) is called whenever that state is reached. Verification conditional information may be optionally defined for each state and may be utilized for checking the integrity and interaction of a state machine before deployment (be it as an interpretive script or generated code such as C). This sort of conditional information includes pre-condition information and post-condition information. Pre-condition information indicates the conditions to meet before any transitions are traversed to the associated state. This may include information like, "data item X is greater than `n` and less than `m`", or "data item X is not in use by any prior state machine in the current sub-space instantiation". Post-condition information indicates what conditions are expected to be true if the given state is reached. Transition information identifies, either explicitly or implicitly, the tail and head states, and includes information about transition type, transition criteria, and function calls. The tail state is defined as the "from" state while the head state is defined as the "to" state. Transition type information describes the particular type of transition. Transition criteria includes the criteria to pass in order to traverse transition, if applicable. Function calls identifies the functions to call (i.e., perform) upon transition, if applicable. Tail state is the state from which the transition begins, and head state is the state to which the transition ends. References to states could be in the form of state name, ID, or some other form of reference. In any case, references to the "from" and "to" states are given in the transition. A transition may be one of five types: normal, default, null, hook or reference. A normal transition generally requires the occurrence of an event in order to be traversed. Criteria for the transition must be met by information related to the event. A default transition also requires an event, but is not considered for traversal unless none of the normal or null transition criteria are met. Additional checks for criteria may be provided in a default transition, allowing for there to be more than one default transition per state. A null transition may or may not require the occurrence of an event. It is provided for initialization and logical separation of portions of a state machine. When the transition is a hook or reference, it is important to have some default behavior. Moreover, a transition may be marked thereby indicating that the criteria may be changeable. That is, the state machine definition may be used as a template when designing other state machine definitions with the criteria modified by the designer. Transition criteria specifies the information to check for in the contents of a UDS representing an event. Items that can be checked include event type, component type, component ID, and data item values. Criteria can be specified as a logical statement combining the traditional logical operators: AND, OR, NOT; and/or the traditional comparison operators: GREATER THAN, LESS THAN, EQUAL, etc. Additional transition criteria may also be provided that include additional functions. These criteria may include "EventIsSet( )" that returns true if the event value has been set, "ComponentIsSet( )" that returns true if the originating component value has been set, and "DataIsSet(x)" that returns true if value of data item x has been set. Also, additional functions may include "Event( )" that returns the event value, "Component( )" that returns the originating component value, "Data(x)" that returns the data value for data item x, "ArrayCount(x)" that returns the count value of the array value designated by data id x, and "Value Valid(x, a)" that returns true if "a" is a valid value for data item x according to definition. As will be appreciated, the naming of these functions/operations may be dependent on the desires of the designer. Names described herein are for illustration purposes. Optionally, the negative versions of the functions may be utilized wherein, for example, a function DataIsNotSet(x) could easily serve the same purpose as DataIsSet(x) for determining whether or not the value of an item in the UDS event has been set. Furthermore, error conditions for these functions may be handled at the discretion of a person skilled in the art. The exact form of representation, and whether or not all logical operators are available, for the logical statements is design-specific and within the realm of a person of ordinary skill in the art. Such a person may desire to model the logical statements after Pascal syntax and exclude the logical operator OR since OR may be captured implicitly by using many transitions, or may add other operators and functions. Now referring to FIG. 5a, there is illustrated a graphical example of an generic call model using a hook state. A state machine (USMD) 500 includes an entry point or state 502, a pre-translation state 504, a screening state 506, a translation state 508, a routing state 510, a termination state 512, and an exit point or state 514. As the state machine 500 proceeds in accordance with its functionality and enters the screening state 506, hook information relating to the screening state 506 directs an event or events to be re-routed to an event processor 516. The event processor 516 then processes the event(s) for the screening state. Upon completion of its processing (or if some type of interrupt occurs), the event processor 516 returns control to the state machine 500. An "event processor" is defined as a hardware or software component that either performs a function or activates (initiates or runs) a state machine (i.e., an instantiated USM) in response to a data message (usually in the form of a UDS representing an event). A USM with a "hook" will hook an "event processor" that will perform a function or activate a state machine. If another state machine is hooked, the hooked state machine may be referred to as a hooked USM. In the preferred embodiment, if the event processor is to perform that function that is not necessarily a state machine, then the event processor should "act" like a state machine. To "act" like a state machine, the event processor receives a UDS as input and then returns status information (i.e., "complete," if the state machine or function is completed) either in the form of a UDS or simply a value or data indicating the status of the state machine or function. This is generally required because a hook or reference involves relinquishing processing control to the event processor. Hook information is simply a name (or ID) that is unique within the set of hook names given to regular states in the given USMD. If a state is a hook, then an event processor may be "hooked" into the state at instantiation time which is done dynamically at run time with a hook command. For example, if a designer wants to create a generic call model, he or she can place hooks in the call model into which event processors are placed. There may be hooks for the following: pre-translation, screening, translation, routing, termination, debit card calling, etc. Upon instantiation of the state machine, it may be given information of the sort "hook event processor named MyScreener into your hook named `screening`". During processing, when the call transitions to the `screening` state, the generic call model relinquishes event handling control to the MyScreener processor 516 until MyScreener processor 516 delivers it back. Likewise for other hook cases. This makes for good dynamic polymorphism, where a single USMD may be implemented many different ways via changes in what is hooked into hook. Different types of hooks may be utilized and designed into a state machine. One type of hook is defined as a "transition hook". A transition hook is used to hook an event processor while traversing from a first state to a second state. Now referring to FIGS. 5b thru 5d, there is illustrated a graphical representation of a transition hook. A state machine 520 includes a first state 522, a second state 524, and a transition hook 526 for "hooking" a state machine 530 when the hooking transition is met. FIG. 5b shows that the first state 522 of the state machine 520 has been reached. The state machine 520 remains at this state until a particular event is received. Now referring to FIG. 5c, a particular incoming event 528 in the form of a UDS event is received (the transition hook is waiting for this event in order to "hook"), the state machine 530 is "hooked," and the UDS is routed (or relayed) to the hooked state machine 530 for processing. The hooked state machine 530 typically includes an entry point (state) 532, one or more regular states (not shown), and an exit point (state) 534. Now referring to FIG. 5d, the hooked state machine 530 is processed until the exit state 534 is reached (or until some type of interrupt is received, such as a failure, etc.). Upon reaching the exit state 534 (or when the desired processing is completed by the hooked state machine 530), the hooked state machine 530 is exited, control (or processing) is returned to the original state machine 520, and the current state of the state machine 520 is now the second state 524. Another type of hook is defined as a "state hook". A state hook is used to hook an event processor when a state is reached. Now referring to FIGS. 5e thru 5f, there is illustrated a graphical representation of a state hook. A state machine 540 includes a state 542 and a state hook 544 for "hooking" a state machine 550 when the state 542 is reached. FIGURE Se illustrates that the state 542 of the state machine 540 has been reached. Once reached, the state machine 550 is hooked and processing continues in accordance with the hooked state machine 550. The hooked state machine 550 typically includes an entry point (state) 552, one or more regular states (not shown), and an exit point (state) 554. Now referring to FIG. 5f, the hooked state machine 550 is processed until the exit state 554 is reached (or until some type of interrupt is received, such as a failure, etc.). Upon reaching the exit state 554 (or when the desired processing is completed by the hooked state machine 550), the hooked state machine 550 is exited, control (or processing) is returned to the original state machine 540, and the state machine 540 remains in the state 542. Now referring to FIG. 6, there is illustrated an example of a call model definition (state machine) using a reference state. An state machine (USMD) 600 includes an entry point or state 602, a state (reference state) 604, and an exit point or state 606. As the state machine 600 proceeds in accordance with its functionality and enters the state 604, reference information relating to the state 604 directs an event or events to be re-routed to an event processor 608 specified by the definition. The event processor 608 then processes the event(s) for the state 604. Upon completion of its processing (or if some type of interrupt occurs), the event processor 608 returns control to the state machine 600. Reference information (part of the USMD) is described as more of a hard-coded reference to an event processor. The designer may desire to utilize a particular event processor for the "screening" portion of the call model and hook an event processor called Screener into the appropriate place. Referencing decreases the re-usability of the USMI being designed but is convenient when the designer desires to place strict restrictions on what is called (or referenced), or when the designer has knowledge of what is needed at the given point in the state machine. In addition to "hooked" and "referenced" event processors (including state machines), a state machine may also generate or "spawn" another state machine (sometimes referred to as a "spawned" or "child" state machine). Now referring to FIG. 15, there is illustrated a flow diagram 1500 of a state machine 1502 spawning another state machine 1504. The spawning state machine 1502 processes in accordance with its functionality and reaches a point where it generates or spawns the spawned state machine 1504. Spawning occurs upon reaching or leaving a state, or from a transition. After spawning, the spawning state machine 1502 continues processing in accordance with its functionality and the spawned state machine 1504 begins processing in accordance with its own functionality. When the spawned state machine 1504 completes processing and exits (or receives some sort of external interrupt) before the spawning (parent) state machine 1502 terminates its processing, an interrupt 1506 is sent to the parent state machine 1502 with parent-specified return information. If the parent state machine 1502 completes processing and exits (or receives some sort of external interrupt) before the child state machine 1504 terminates its processing (or exits), an interrupt 1508 is sent to the child state machine 1504 with return information. The interrupt may be in the form of a UDS. A debit card calling state machine would be an example of a type of state machine that may spawn another state machine. For debit card calling, a caller is allowed a predetermined amount of time for long-distance calling depending on the amount of pre--paid time purchased by the caller. For example, assuming the debit card calling state machine is activated, it will spawn a state machine that invokes a timer that times the amount of time the caller is connected to another party and reduces the amount of time available for the caller accordingly. If the caller runs out of time during the call, the spawned state machine (timer) will exit (i.e., completion) and send an interrupt to the debit card calling state machine (parent) and the appropriate action will be taken (most likely disconnect). If the caller disconnects before running out of time, the debit card calling state machine (parent) will send an interrupt to the spawned state machine informing it that the caller has disconnected and appropriate action may be taken (e.g. amount of time actually used may be sent to billing to reduce the caller's remaining debit card time). Now referring to FIG. 7a, there is illustrated a simplified diagram example of a 1-800 originating call model state machine 700 showing transition criteria. The state machine 700 waits for an Origination event (transition criteria) having a called number that is ten (10) digits long and begins with the number sequence "800". Upon receipt of the proper Origination event, the state machine 700 transitions from an entry point (state) 702 to a state 704. The state machine 700 remains at the state 704 until a positive Translation Response is received and then transitions from the state 704 to a state 706, remains at the state 706 until a positive Routing Response is received and then transitions from the state 706 to a state 708, and so on, as illustrated in FIG. 7a. At some point, a Release event will occur to end the call and transition to the exit state 714 for exiting the state machine 700. The state machine must be able to perform (or initiate) actions or functions. Each state machine is associated with a particular function set that corresponds with the functions or actions that may be called or performed by the component (i.e. processor) within which the state machine runs. A state machine that handles call protocol states will, most likely, call functions different from those called by a call service state machine. Each component has a function set that includes functions performable by the component. The function set includes an interface definition that defines the functions ids and parameter (and types) for each function within the set. A function call specifies values to pass to functions defined in the function interface, as with any function call. A function call consists of the function ID and/or name and function parameter values. The function set name/ID is already known as part of the USMD configuration. Now referring to FIG. 7b, there is illustrated the simplified diagram example (shown in FIG. 7a) of the 1-800 originating call model 700 showing function calls. The function calls are written in high level pseudocode to indicate the functions that are called if the respective transitions are traversed. As will be appreciated, a state machine defined by a USMD is a finite state machine, but may be programmable with the use of hooks and references. 2. Instantiated Universal State Machine (USM). Instantiation refers to a specific instance of a state machine, the state machine being defined by the USMD. In this regards, an instantiated universal state machine in accordance with the present invention is referred to as a USM. The functioning of a particular USM depends on how it is defined in the USMD. Instantiation information indicates where the current instantiation is in the state machine, or, if the state machine hooks or references other event processors, which event processor is currently handling events. An instantiated USM is a data structure (consisting of data) that includes a pointer to a state machine (defined by the USMD), and includes other information as described below. The USM may also be said to be a particular instance of the state machine defined by the USMD. Each instantiated USM is associated with a specific USMD. Each instantiated USM may differ in functionality if the USMD contains hooks. Hooks do not have to be filled. If a USMD contains hooks or references, then it may be advantageous, in some instances, to make sure the respective event processors can be instantiated (or connected to) before allowing the state machine to continue. Now referring to FIG. 8, there is illustrated an example of a USMD 800 and examples of three different instantiated USMs 810, 812, 814 each containing a hook to a processor (either 820, 822, or 824). The USMD "MyStateMachine" 800 includes an entry state 802, an exit state 806, and at least one additional state 804 which is a hook called "MyHook". The first, second and third instantiations (USM) 810, 812, 814 of the state machine 800 hook the "EventProcessorX" 820, the "EventProcessorY" 822, and the "EventProcessorZ" 824, respectively, into the "MyHook" hook. The instantiation of a USM and the determination of what function (or component) is hooked into the USM is determined by the COSMAS Sub-Space (CSS) through a mapping process. The CSS and how it handles and performs instantiation are described later. A USM instantiation includes a USMD reference or pointer, a current state indicator, a current event processor indicator, an optional list of event processors, a list of spawned child state machines (other USMDs), and may include a portion of the USM interpretation algorithm (see FIG. 9a). The USMD pointer identifies the state machine (as defined by the USMD) associated with the instantiated USM. The current state indicator indicates which state (of the state machine) is the cur-rent state. This may be designated by the state ID or name. The current event processor indicator identifies which event processor is currently handling events. A specific value is reserved to indicate that the current event processor is the state machine itself. Otherwise, the value of the current event processor indicator is the ID or name of an event processor in the event processor list (described below), or a pointer to an object of base class "EventProcessor", or some other form of indicator. Typically, there should be at most one event processor handling events in any given state machine. However, event processors called by a state machine may call other event processors. The list of hooked or referenced event processors may be organized in different ways, but the list includes hooked or referenced processors that are called, or may be called, within the state machine of the instantiated USM. The hooked or referenced event processor, if a state machine, may be instantiated when processing of the instantiated USM reaches the hook or reference state, or alternatively, pre-instantiated when the USM is first instantiated (i.e. instantiated at or near time of instantiation of the hooking or referencing USM). When the event processor is a distributed object of some sort, it may attempt to establish communications before the state machine begins and generate an error if it cannot. An instantiated USM may also include information identifying or pointing to other instantiated USMs (instantiated child state machines) that have been spawned by the current instantiated USM. Some service applications may include an additional state machine (child) that runs concurrently with the main state machine (parent) in response to certain criteria. Optionally, the instantiated USM includes software code for interpreting the particular state machine (USMD) associated with the instantiated USM. The interpretation code determines whether an incoming event matches the criteria of any of the transitions from the current state, returns an indication of its progress (including exit status), updates the current state of the USM, and handles spawning, reentry activation, and hook commands. Now referring to FIG. 9a, there is shown an example, in block diagram form, of an instantiated USM 900 illustrating its contents. The USM 900 includes a USMD pointer (or indicator) 902, a current state indicator (or pointer) 904, a current event processor indicator (or pointer) 906, an optional list of hooked/referenced event processors 908, a list of spawned child state machines (other USMDs) 910, and optional interpretation code 912. The USMD pointer 902 contains information that identifies or points to the USMD (state machine) associated with the USM. The current state indicator 904 indicates the current state of the USMD (state machine). The current event processor indicator 906 indicates which processor is currently processing events (the state machine itself or another processor). The list of hooked/referenced processors identifies or points to other processors (hooked or referenced) while the list of child state machines identifies or points to other USMs spawned). As will be appreciated, interpretation code may reside in the instantiated USM, the COSMAS sub-space associated with the USM, or a separate software module, or any combination thereof. The interpretation code simply runs/processes the state machine. For example, and as depicted in FIG. 9a, the USMD pointer 902 is shown pointing to a USMD 920 and the current state indicator is shown pointing to a State B of the USMD 920. Similarly, a first USM (hooked) 922, a second USM (hooked) 924 and a USM (referenced) 928 are all pointed to (or identified) by the information in the list of hooked/referenced processors 908, and a spawned USM (child) 926 is pointed to (or identified) by information in the list of child state machines 910. As will be appreciated, the hooked and reference USMs 922, 924, 928 illustrated in FIG. 9 may alternatively be event processors that perform the desired function, and therefore, not necessarily USMs. Now referring to FIG. 9b, there is illustrated a more detailed logical relational view of an exemplified instantiated USM. The dashed lines represent some sort of indicator, whether it be a name, ID, pointer, or some other type. In FIG. 9b, there is a USMD 940 for a state machine called "MyCallModel" that provides the template (or definition) for the corresponding instantiation. The USMD 940 contains a hook state labelled "MyHook" and a reference state labelled "MyRef". The state machine shown is instantiated with an event processor 942 hooked into "MyHook" and the "MyRef" state associated with a pointer to an event processor 944. A particular USM may either be interpreted, or compilable code may be generated from it. The present invention includes an interpreter that receives events and utilizes the USM to determine what to do with the events. If compilable code is used, the functionality of the interpreter may be used as a template, and so any functioning of a USM can be defined in terms of interpretation with the underlying assumption that any interpreted instance of a USM can be translated into any common language such as C or Pascal for execution. The interpreter accepts events, utilizes the instantiated USM to determine what to do with the events, and performs functions and/or relays function information to the COSMAS Sub-Space (described later) and possibly subsequently to a component for execution. The interpreter runs the state machine. The interpreter takes a UDS event as input and returns its status, including whether or not the state machine has reached its exit state (for the COSMAS Sub-Space). The USM or event processor (as indicated by variables in the USM) indicates that certain functions need to be performed. The interpreter executes these functions immediately, or, since many states may be traversed as the result of a single event, the interpreter caches all the functions until it is done processing the one event before executing them. Additionally, functions may be executed directly by the interpreter or via its parent COSMAS Sub-Space or by the component. As will be appreciated, the interpreter preferably consists of software with a portion thereof included within, and executed as part of, the instantiated USM. The remaining portion of the interpreter is included within, and executed as part of, the instantiated COSMAS Sub-Space or component. Alternatively, the interpreter may reside functionally wholly within, and executed as part of, the instantiated USM, the instantiated COSMAS Sub-Space, or some other functional component of the system, or combination thereof. The following pseudocode exemplifies a basic algorithm/procedure for interpreting a USM. Typically, assume that the interpretation algorithm is entered at "main" upon receiving an event. Process return values include (1) processing ok (event was processed; processing normal), (2) no transition (no transitions were traversed in the state machine; event was ignored), and (3) exited (the state machine was exited). Each return value also contains a modifier expressing whether or not the event was consumed.
USM INTERPRETATION ALGORITHM
main:
if currently processing an event
queue event
otherwise
for every state machine in the sub-space
process event
if exited
remove state machine from sub-space
if event was consumed
break out of for loop
perform functions returned from state machines processing event
process queued events
process event:
process reentry transitions
if no transition
process hooks and references
if no transition
process normal transitions
if no transition
process default transitions
return process return value
do transition:
set return value to false
set process null transitions flag to false
if transition type is hook or reference
if get hooked/referenced state machine
set hooked/referenced state machine as a current state machine
process hooks and references
if processing ok
set current state id to the to-state of the given transition
set return value to true
otherwise if exited
set current state id to the to-state of the given transition
set return value to true
set process null transitions flag to true
otherwise if transition type is normal default or null
if event possesses transition criteria
if processing reentry flag is true and to-state of the given
transition is flagged
to say in current state
do not change the current state
otherwise
change current state to the to-state of the given transition
add the given transition's functions to the function list
set the return value to true
set the process null transitions flag to true
if return value is set to true
if the given transition or new state indicates to activate any reentry
transitions
activate the indicated reentry transitions
if the given transition or new state indicates to spawn any other state
machines
spawn the indicated state machines
if the given transition or new state indicates to hook/reference any
other state machines
hook/reference the indicated state machines in the given places
if process null transitions flag is true
process null transitions
return return value
process default transitions:
for each default transition from current state
if do transition
if at exit state
return exited
otherwise
return processing ok
return no transition
process hooks and references:
if state machine is currently hooked/referenced in
have that state machine process the current event
if processing ok
return processing ok
if no transition
release hooked/referenced state machine
return to current state in this machine
return to transition
if exited
release hooked/referenced state machine
return to current state in this machine
process null transitions
if processing ok or no transition
return processing ok
if exited
return exited
return no transition
process normal transitions:
for all normal transitions from current state
if do transition
if at exit state
return exited
otherwise
return processing ok
return no transition
process null transitions:
for all null transitions from current state
if do transition
if at exit state
return exited
otherwise
return processing ok
return no transition
process reentry transitions:
set processing reentry flag to true
for all active reentry transitions
if do transition
if at exit state
set processing reentry flag to false
return exited
otherwise
set processing reentry flag to false
return processing ok
set processing reentry flag to false
return no transition
.COPYRGT. 1997 Northern Telecom Limited
In the preferred embodiment, the "process event" function of the "main" algorithm is performed as part of the USM, the code section identified as starting with "for every state machine in the sub-space" in the main algorithm is performed as part of the Sub-Space, and the remainder of the main algorithm is performed by the component. Resolution of hooks and references and whether or not they are resolved by the USM interpreter or the COSMAS Sub-Space is implementation dependent. If any event processing results in the indication that functions should be called either by traversing a transition or via feedback from an event processor, then whether or not the functions are processed immediately, cached and processed at the end of the event processing cycle, or processed some other way is also implementation dependent. It is suggested that functions should not be cached over more than one event processing cycle. Hook resolution, reference resolution, and functions processing are implicit in the above algorithm. D. Concurrent State Machine Space (COSMAS) Sub-Space. Differentiation is made between the Concurrent State Machine Space (COSMAS) Sub-Space definitional (CSSD) and instantiated (CSS) parts. Definitional information is the definition of the sub-space, including a set of USMDs, instantiation decision information (mapping), and a function set interface definition. Instantiated information is the generation of a COSMAS Sub-Space (CSS) that contains one or more instantiated USMs for processing. The CSS is generated in response to an event. The CSSD and CSS are logical separations and do not have to exist in separate structures. 1 . COSMAS Sub-Space Definition (CSSD). A COSMAS Sub-Space Definition (CSSD) is provided for each component that runs state machines within the system. A CSSD includes three major components: a set of USMDs (i.e. a set of state machines), a mapping definition, and a function set interface definition. The mapping definition contains information and related data for instantiating appropriate USMs in response to UDS information (from a UDS) and the set of USMDs in the CSSD. Now referring to FIG. 10, there is illustrated in block diagram form the COSMAS 1000 in accordance with the present invention. The COSMAS 1000 includes a plurality of CSSDs 1002, 1004, 1006, 1008--one for each relevant component within the processing system 120. There may be any number of such components, as desired. Illustrated in FIG. 10 is the CSSD 1002 for the CSP 204 (see FIG. 2) that includes a set of USMDs 1010, an activation mapping definition 1012 and a function set interface definition (FSID) 1014. The set of USMDs 1010 includes a plurality of state machine definitions 1016 each defining a state machine (e.g. State Machine A, State Machine B, State Machine (N)). Also included with the COSMAS 1000 of the present invention are the CSSD 1004 (for the component FCP 202) and the CSSD 1006 (for the component semantics SPP 208). The COSMAS may include up to "n" number of CSSDs depending on the number of components desired (the CSSD 1008 is associated with the component "n"). The following COSMAS Sub-Space definition file format grammar preferably provides an example of the CSSD format in accordance with the present invention:
CosmasSubSpace :: = CONFIGURATION Configuration.sub.--
USMDS Usmds.sub.--
MAPPINGS Mappings.sub.--
Configuration:: = ConfigurationItem Configuration .vertline.
Configuration Item :: = NAME = STRING
Usmds:: = [Usmd] Usmds .vertline. e
Usmd:: = NUMBER STRING
Mappings:: = [Mapping] Mappings .vertline. e
Mapping:: = USMDS = {NUMBERLIST}
Hooks
EVENTS - {EventCriteria}
SETEVENT = {EventSettings}
Hooks:: = Hook Hooks .vertline. e
Hook:: = HOOK = NUMBER INTO NUMBER AT
TRANS STRING
HOOK = NUMBER INTO NUMBER AT
STATE STRING
EventCriteria:: = EventCriterium Event Criteria .vertline. e
EventCriterium:: = EVENT = NUMBER .vertline.
EVENT = ANY .vertline.
COMPCLASS = NUMBER .vertline.
COMPCLASS = ANY .vertline.
COMPIID = NUMBER .vertline.
COMPIID = ANY .vertline.
DATA = [NUMBER = DataVal] .vertline.
DATA = [NUMBER = ANY]
DataVal:: = BOOL BOOL .vertline.
SCALAR NUMBER .vertline.
ENUM NUMBER .vertline.
ARRAY (NUMBERLIST)
EventSettings:: = EventSetting EventSetting .vertline. e
EventSetting:: = EVENT = NUMBER .vertline.
COMPCLASS = NUMBER
COMPIID = NUMBER
DATA = [NUMBER = DataVal]
.COPYRGT. 1997 Northern Telecom Limited
Now referring to FIG. 11, there is represented a hierarchial view of the activation mapping definition 1012 within one of the CSSDs (as shown in FIG. 10). The mapping definition 1012 utilizes information from a UDS event and a set of decisional trees to identify a subset of USMDs (state machines) within the set of USMDs 1010 that will most likely be activated/processed in response to the UDS event. Each tree in the set represents a mapping from a UDS data value to some output data (in this case a sub-set of USMDs and hook information, if any). Mapping from event identification (e.g. origination, termination, answer, etc.) or component identification (e.g. CSP1, CSP2) to the output data can be represented as a mapping from a scalar value. The mapping process produces a subset (one or more) of USMDs within the set of USMDs 1010 that will result in instantiations (as USMs) of the identified subset. Once identified, USMs are instantiated that correspond to the selected USMDs. The USMs are instantiated within what is identified as an "instantiated" COSMAS Sub-Space (CSS). CSSD maps are organized as sets of trees (optionally scoped), with each tree representing a mapping from either an event, component or data item to some set of activation information. The set of activation information may contain any desired activation criteria and information for the activation of state machines. In the preferred embodiment, the CSSD maps contain information identifying the set of state machines that may be activated by the event, component or data item, and the state machines that should be hooked and where. (The currently-used USM also includes information for setting event information). Given an event, the information yielded by the overall mapping is the result of some set of operations performed upon the results of individual mappings of the event id, the component id, and each data item in the event. If scoping is used, then the information yielded by the overall mapping is the result of some set of operations performed upon the result of scoped mappings (based upon combinations of items) which is the result of the application of some set of operations performed upon the result of individual mappings of the event id, the component id, and each data item in the event for that particular scoping. Best-match searches may be performed on the trees (i.e., the data item 2145551212 will yield the result associated with 214555 if 214555 is the best-match for 2145551212). The following provides an example mapping algorithm (assume an event is being handled):
get/create full list referring to all possible USMDs for this component
(sub-space) called USMDS
get/create full list of hook information called HOOKS
get result of mapping for given event id
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
get result of mapping for given component type
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
for every data item in the given event, get result of mapping
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
return USMDS and HOOKS
.COPYRGT. 1997 Northern Telecom Limited
The information returned from the mapping algorithm is used to instantiate the USMs and perform whatever actions are specified in the mapping. The following provides a scoped version of the mapping algorithm:
get/create full list referring to all possible USMDs for the component
(sub-space) called USMDS
get/create full list of hook information called HOOKS
get result of mapping for given event id
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
get result of mapping for given component type
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
get/create empty scope context, containing no data in mappings
if scope set exists for given event id then
union mapping context with the set of data mappings that fall
under the scoping of given event id
union mapping context with the set of data mappings that are not scoped
by any event id
if scope exists for given component type then
union mapping context with the set of data mappings that fall
under the scoping of given component type
for every data item in the given event, get result of mapping in the
current
scope context
if success then
intersect resulting USMD list with USMDS
intersect resulting hook information list with HOOKS
return USMDS and HOOKS
.COPYRGT. 1997 Northern Telecom Limited
The use of scoping depends on the desired data management, and also is internal to the mappings and superficial to the grammar of mapping specification. Scoping allows the mapping specifier to be more specific about the event and components which might contain a certain data item. In other words, the called number in an Origination event from the FCP vs. CSP might be completely different and require different sets of state machines altogether. Non-scoping may be described as follows: If O is the set of state machines that may be activated by an Origination event, F is the set of state machines that may be activated by an FCP, C is the set of state machines that may be activated by a CSP, and N be the set of state machines that may be activated by called number N, then N must contain all the possibilities in O, F, and C which may be quite numerous, requiring a mapping entry for each possibility. Scoping may be described as follows: If O is the set of state machines that may be activated by an Origination event, F is the set of state machines that may be activated by an FCP, C is the set of state machines that may be activated by a CSP, and N be the set of state machines that may be activated by called number n scoped by O and C, then N must contain only the possibilities in O and C, requiring a mapping entries for only those possibilities in O and C. Therefore, use of scoping may reduce the number of mapping entries needed to specify activation in the system. Scoping may or may not be used. Now referring back to FIG. 11, an example of the function set interface definition (FSID) 1014 within the CSSD 1002 (i.e. the function set definition for the CSP 204) is set forth below. CSP Function Set Definition:
id function
0 UDS_CLEAR (uds_id)
1 UDS_COPY_ALL (dest_uds_id, src_uds_id)
2 UDS_SET_EVENT (uds_id, event_id)
3 UDS_SET_DATA (uds_id, data_id, dataval)
4 UDS_SET_ARRAY_DATA (uds_id, data_id, offset,
data_val)
5 UDS_RELAY (uds_id, component_class,
component_instance_id)
6 UDS_NEWTEMP ( )
10 SU_DIGITS_COLLECT (mindigs, maxdigs, timeout)
11 SU_DIGITS_MONITOR (digit)
12 SU_TRANSLATE (uds_id)
13 SU_SCREEN (uds_id)
14 SU_IP-PLAYMESSAGE (trkmem, user_id, msgnum)
15 SU_ROUTE (uds_id)
16 SU_IP_COLLECTDIGITS (trkmem, maxdigs, timeout)
17 SU_AUTH_VERIFYACCOUNT (vendor_id, card_number,
calling_number)
18 SU_AUTH_TRANSFERUNITS (vendor-id, card_number,
calling_number,
called_number)
19 SU_IP_PLAYMESSAGE_NUM (trkmem, user_id, msgnum,
number)
20 CTP_PARTY_ADD ( )
21 CTP_PARTY_HOLD ( )
22 CTP_PARTY_REMOVE ( )
30 CSP_ASSOCIATE (agent_id)
31 CSP_DISASSOCIATE (agent_id)
32 CSP_TIMESLARM_SET (seconds)
33 CSP_TIMEALARM_CANCEL ( )
.COPYRGT. 1997 Northern Telecom Limited
Use of the term "function" denotes a function performable by the processing system. The present invention defines a set of functions (FSID) associated with a particular component of the system. Within the function set are functions performable by the component. Moreover, these functions are callable (or selectable) by a state machine designer when designing state machines for that particular component. Accordingly, the function set interface definition (FSID) associated with a particular component contains interface information for the set of all functions performable by that particular component. For example, the functions performable by the CSP 204 may include collect digits, translate, route, etc. (see above list of example functions for the CSP 204). An instance of COSMAS may contain any number of "sub-spaces". In general, COSMAS contains the set of all possible state machines (USMDs) for a given system. The set may be partitioned according to the function set used by the respective USMDs. To define the sub-spaces, S may be used to denote the set of all USMDs in an instance of COSMAS for a given system. For every function set F (for each component) defined in the system, there is a partition (sub-space) P of state machines (USMDs) in S. For any state machine s in partition P, state machine s uses only those functions in the corresponding function set (associated with a particular component, i.e., FCP, CSP, etc.). A given function may also be within the function set for the CSP and also in the function set for the FCP. It may be possible that a given function is performable by two or more components. In addition, a given state machine (USMD) may be included in each partition P for two or more components. However, this is not desirable unless the state machine uses functions that are identical for the components. An example of a function set interface definition (FSID) 1024 within the CSSD 1004 (i.e. the function set definition for the FCP 202) is set forth below. FCP Function Set Definition:
id function
0 UDS_CLEAR (uds_id)
1 UDS_COPY_ALL (dest_uds_id, src_uds_id)
2 UDS_SET_EVENT (uds_id, event_id)
3 UDS_SET_DATA (uds_id, data_id, data_val)
4 UDS_SET_ARRAY_DATA (uds_id, data_id, offset,
data_val)
5 UDS_RELAY (uds_id, component_class,
component_instance_id)
6 UDS_NEWTEMP ( )
10 SU_PSM_HANDLE_EVENT (uds_id)
20 SET_VOICE_PATH (incoming_vpstate,
outgoing_vpstate)
.COPYRGT. 1997 Northern Telecom Limited
An example of a function set interface definition (FSID) within the CSSD 1006 (i.e. the function set definition for the SPP 208) is set forth below. SPP Function Set Definition:
id function
0 UDS_CLEAR (uds_id)
1 UDS_COPY_ALL (dest_uds_id, src_uds_id)
2 UDS_SET_EVENT (uds_id, event_id)
3 UDS_SET_DATA (uds_id, data_id, data_val)
4 UDS_SET_ARRAY_DATA (uds_id, data_id, offset, data_val)
5 UDS_RELAY (uds_id, component_class,
component_instance_id)
6 UDS_NEWTEMP ( )
.COPYRGT. 1997 Northern Telecom Limited
It will be understood that three components (CSP, FCP, SPP) have been illustrated in accordance with the present invention to each include a set of USMDs, activation mapping, and a function set interface definition. Additional components may be similarly designed and utilized in the system in accordance with the present invention (such as the routing processor, translation processor, etc.) for running state machines. for example, the routing processor may simply perform a function in response to a function call from a state machine (in the form of a UDS event or some other type of information such as a function id), or once called, the routing processor may perform the function utilizing one or more state machines instantiated by the routing processor. 2. Instantiated COSMAS Sub-Space (CSS). As described above, after the mapping process identifies one or more appropriate USMDs, a COSMAS Sub-Space is instantiated that includes a corresponding instantiated USM (as described above) for each of the selected USMDs (one or more may be selected). The following provides an example of a typical algorithm that may be used to generate or activate a Sub-Space. The Sub-Space activation algorithm starts at "main" and it is assumed that this algorithm starts when a component receives an event.
main:
if there is no active sub-space
get sub-space
if failure
if there are any inactive sub-spaces
activate the inactive one with highest priority
otherwise
exit main
(USM Interpretation Algorithm goes here)
if exited
remove active sub-space
if there are any inactive sub-spaces
activate the inactive one with highest priority
get sub-space:
ask sub-space definition for activation mapping information for the given
event
if success
instantiate the indicated state machines
if there is hook/reference information
instantiate the state machines to be hooked or referenced
associate the new state machines with their hooks or references
if there is event altering information
set the indicated event information in the given event
return success
return failure
.COPYRGT. 1997 Northern Telecom Limited
Versioning information is an option in the present invention and may be used as part of the UDSD, USMD, function set definitions, CSSD, etc. E. Operation. Now referring to FIGS. 12-14, there is illustrated the operation of the present invention in response to an external event. In this example, the external event is an origination event (i.e. an origination call in a telecommunications system). Now referring to FIG. 12, an origination event 1200 is received by the interface 200 of the SI unit 132 (or SI unit 134, 136 or 138, depending on the location of origination). It | ||||||
