DIRECTORY BasicTime USING [ GMT --, nullGMT-- ], DESFace USING [ Key, nullKey ], GVBasics USING [ Password ], IV USING [ KeyTable ], Pup USING [ Address, nullAddress ], RefID USING [ ID, nullID ], Rope USING [ ROPE ], RPC USING [ Conversation, InterfaceName, unencrypted ] ; Thrush: CEDAR DEFINITIONS = { PartyID: TYPE = RefID.ID; SmartsID: TYPE = RefID.ID; nullID: RefID.ID = RefID.nullID; ConversationID: TYPE = Epoch; nullConvID: ConversationID = LOOPHOLE[LONG[0]]; VoiceSocket: TYPE = Pup.Address; NetAddress: TYPE = Pup.Address; noAddress: NetAddress = Pup.nullAddress; Epoch: TYPE = BasicTime.GMT; epoch: Epoch; -- things with this epoch in them were created during this incarnation ROPE: TYPE= Rope.ROPE; nullPassword: GVBasics.Password = ALL[0]; StateInConv: TYPE = { neverWas, -- has not been in conversation yet. idle, -- Not really in the conversation (ever, or any more.) failed, -- State to go into to make busy signals, error tones, and so on, when can't find requested party, or when called party rejects. reserved, -- TBD at party level; restrict some operations pending outgoing conn. parsing, -- TBD at party level; may restrict additional operations. initiating, -- You are the calling party; attempt to contact the other party is in underway. notified, -- You are the called party; you are deciding whether to bother your user. ringback, -- You are the calling party; an attempt to arouse the other user is in progress. ringing, -- You are the called party; you are attempting to arouse your user. canActivate, -- You may become active in this conversation whenever you can get out of the one you may already be active in. active, -- You are active in this conversation. inactive -- You have put this conversation on "hold." }; notReallyInConv: StateInConv = $failed; StateID: TYPE = NAT; Credentials: TYPE = RECORD [ partyID: PartyID _ nullID, smartsID: SmartsID _ nullID, convID: ConversationID_nullConvID, state: StateInConv _ $neverWas, stateID: StateID_0 ]; ConvEvent: TYPE = REF ConvEventBody; ConvEventBody: TYPE = RECORD [ self: Credentials, -- of the receiver of the report other: Credentials, -- of the initiator of the event; smartsID may be null time: BasicTime.GMT _ NULL, -- when the event causing this report occurred reason: Reason _ NIL, -- ($wontSay) for rejection, acceptance, or conditional acceptance comment: ROPE _ NIL -- any human-sensible comment associated with the event. ]; Reason: TYPE = ATOM; NB: TYPE = ATOM; CallUrgency: TYPE= ATOM; -- { $junk, $ifConvenient, $normal=NIL, $important, $urgent, $fire}; AlertKind: TYPE = ATOM; -- { $queryOnly, $standard=NIL, $intercom, $background, ... }; PartyType: TYPE = ATOM; -- { $individual, $telephone, $trunk, $service, ? }; InterfaceSpec: TYPE = RECORD [ -- See ThParty.RegisterActionInterface/LookupActionInterface interfaceName: RPC.InterfaceName, hostHint: NetAddress _ noAddress, serviceID: RefID.ID ]; ActionID: TYPE = LONG CARDINAL; -- supplied by requester, included in reports. ActionClass: TYPE = ATOM; -- { ActionType: TYPE = ATOM; -- { ActionReport: TYPE = RECORD [ self: Credentials, -- of the smarts being reported to other: Credentials, -- credentials of the reporting party requestingParty: Thrush.PartyID, -- original requestor. actionID: ActionID, actionClass: ActionClass _ NIL, -- $voiceRopePlay, $prosePlay, ... actionType: ActionType, -- $started, $finished, $abandoned, ... actionInfo: ROPE_NIL -- Optional human-sensible information, a function of class. ]; Tune: TYPE = INT; -- the index of a "tune" or similar utterance identification. nullTune: Tune = -1; newTune: Tune = -2; VoiceTime: TYPE = INT; -- A sample number or sample count. VoiceInterval: TYPE = RECORD [ start: VoiceTime_0, -- first sample within tune to play or record. length: VoiceTime_-1 -- number of samples: -1 to play to the end. -- ]; VoiceDirection: TYPE = { play, record }; IntSpecType: TYPE = { request, started, finished }; IntID: TYPE = RECORD [ stateID: StateID _ 0, -- supplied by ThParty as interval is accepted reqID: CARDINAL _ 0 -- supplied by requester to disambiguate intervals in the same rqst ]; nullIntID: IntID = []; IntervalSpec: TYPE = REF IntervalSpecBody; IntervalSpecBody: TYPE = RECORD [ tune: Tune_newTune, interval: VoiceInterval_[], keyIndex: [0..17B] _ 0, type: IntSpecType _ $request, direction: VoiceDirection, intID: IntID _ nullIntID, queueIt: BOOLEAN _ TRUE, changeNoted: BOOLEAN_FALSE -- For use by some clients. ]; IntervalSpecs: TYPE = LIST OF IntervalSpec; ProseSpec: TYPE = REF ProseSpecBody; ProseSpecBody: TYPE = RECORD [ prose: ROPE, type: IntSpecType _ request, direction: VoiceDirection, intID: IntID _ nullIntID, queueIt: BOOLEAN _ TRUE, changeNoted: BOOLEAN_FALSE -- For use by some clients. ]; ProseSpecs: TYPE = LIST OF ProseSpec; SHHH: TYPE = RPC.Conversation; unencrypted, none: SHHH = RPC.unencrypted; EncryptionKey: TYPE = DESFace.Key; nullKey: EncryptionKey = DESFace.nullKey; KeyTable: TYPE = IV.KeyTable; }. JThrush.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Last modified by D. Swinehart, June 2, 1986 8:24:41 am PDT Basic Thrush Types Parties, Smarts, Conversations Scalars Conversation State Values A party is a member of a conversation in one of the following states: reserved and parsing states are for Smarts benefit. At or below this, you're not really in the conversation. Sequence number of state transition within conversation. Used as an index into the conversation log, and as a unique id to control Smarts->Party interactions. The basic Smarts->Party informational packet. ConvEvent objects describe the progress of parties in conversations. They are used as informational values provided to Smarts in Progress reports to describe situations. { (Why things happened, among them) $wontSay=NIL, -- no reason needed. Non-rejections, ongoing $terminating, -- there was a reason for this connection, but it's over now, by me. $withdrawing, -- would like to leave, with right to return. $noAnswer, -- Alert only: we tried, honest. $substituting, -- Not really an event; a party substitution is being reported Rejections, of various degrees of severity $notFound, -- called party not found $busy, -- called party is active in another conversation and/or doesn't wish to accept this one. $absent, -- called party is known to be unavailable for extended period $notImportantEnough, -- connection rejected because claimed urgency was too low. $noCircuits, -- call rejected due to system resource overload $dying, -- one of the participating parties is being destroyed $noParticular, -- rejected for good reason, but can't say what it is. $error -- System problem caused rejection. -- }; Report success of Smarts->Party calls { $success, -- call succeeded, party may be in new state. Conversation-transition codes $stateMismatch, -- the most common problem; your information's out of date. $notInConv, -- you're not a party to this conversation, and call requires it. $noSuchConv, -- named conversation doesn't exist. $noSuchParty, -- named (own) party doesn't exist. $partyAlreadyActive, -- Not allowed to be active in two conversations $convIdle, -- not allowed to return to a conversation everyone has abandoned! $noSuchSmarts, -- get the drift? $noSuchParty2, -- second named (called) party doesn't exist. $narcissism, -- attempt to connect to self rejected <> $convNotActive, -- activity requested that is only satisfiable if requesting party active $convStillActive -- can't destroy it if remaining connections are not orphans., ..., Other codes -- initialization problems, mostly $noIdentSupplied, -- not enough information to turn name or number into party, and so on. $noEntryFound, -- no RName information found in white pages data base for named individual. $noTrunkParty, -- corresponding to supplied party $couldntAuthenticate, -- password verification problem during initialization $couldntConnect, -- interface import or other similar problem during initialization $noNameAvailable, -- can't find the name of a party $interfaceError, -- call had an invalid parameter or combination of parameters }; Conversation Guidance Values How important is this call? As parameters to ThParty.Alert and ThSmarts.Alert: queryOnly: is it likely that Alert would succeed? conversation argument can be null. standard: ring the phone, or whatever recipient would like. intercom: try to get through without ringing. whoKnows: TBD . . . it's early innings, yet. Party type identification, back door stuff Progress reports from sound-providing services. The Smarts implementations for services, such as the $recording or $text-to-speech service, need to be able to report the progress of requested actions (which are requested through specialized interfaces  see ThParty.RegisterActionInterface). Theoretically, a smarts for an interactive voice connection (i.e., a Lark or trunk) could issue reports, too, but no plans exist. Each report should include a unique identifier assigned by the original requestor; the same ID may appear in multiple reports. See ThParty.LookupActionInterface, ThParty.ReportAction, ThSmarts.ReportAction. serviceID (customarily a SmartsID) uniquely identifies the service-provider within a host, since the same interface (and code) can support multiple entities. The specific service interface should include this value as a parameter. $playback, $recording, $synthesized, ... }; $started, $finished, $abandoned, ... }; actionClass is optional, but recommended. It allows the client to make better use of the report. actionID was probably invented by the originating party, supplied to the service as a parameter to one of its procedures. It should be unique relative to the originating party and the conversation. Tunes: control of recording and playback Prose: control of text-to-speech-synthesis service Encryption types Swinehart, May 15, 1985 9:55:57 am PDT Cedar 6.0, addition of prose (text-to-speech) types. Swinehart, October 31, 1985 3:51:20 pm PST Many enumerated types become ATOMs, for extensibility changes to: DIRECTORY, NetAddress, StateInConv, ConvEventBody, Reason, NB, CallUrgency, AlertKind, PartyType, VoiceDirection, IntSpecType, RingEnable Swinehart, November 7, 1985 2:00:17 pm PST Pruned ConvEvent. Other values that used to be there may be obtained directly from databases or through new ThParty calls. changes to: ConvEventBody, StateInConv, AlertKind, NB Swinehart, May 9, 1986 3:23:48 pm PDT Cedar 6.1. changes to: DIRECTORY, VoiceSocket, NetAddress, noAddress, nullPassword Swinehart, May 30, 1986 10:06:15 am PDT Additions for reporting actions initiated or completed by voice services changes to: DIRECTORY, ROPE, ConvEventBody, ActionID, ActionClass, ActionType, ActionReport, ProseSpecBody, InterfaceSpec Swinehart, June 2, 1986 8:20:40 am PDT Move KeyTable definition to KeyTable module. changes to: KeyTable Κ˜šœ ™ Icodešœ Οmœ7™BJšœ:™:—Jšœ™J˜šΟk ˜ Jšœ žœžœΟc œ˜&Jšœžœ˜Jšœ žœ˜Jšœžœ˜Jšœžœ˜#Jšœžœžœ ˜Jšœžœžœ˜Jšžœžœ-˜6J˜J˜—Jšœžœ˜J˜šœ™J˜Jšœ žœ žœ˜Jšœ žœ žœ˜Jšœžœ˜ J˜Jšœžœ ˜Jšœžœžœ˜/J˜J˜—šœ™J˜Jšœ žœ˜ Jšœ žœ˜Jšœ(˜(J˜Jšœžœ žœ˜JšœŸF˜TJ˜Jšžœžœžœ˜Jšœ"žœ˜)J˜—šœ™J˜J™Ešœ žœ˜Jšœ Ÿ$˜/JšœŸ6˜>Jšœ Ÿ„˜Jšœ ŸF˜Qšœ Ÿ:˜DJ™3—Jšœ ŸP˜\Jšœ ŸJ˜UJšœ ŸQ˜[Jšœ ŸD˜NJšœ Ÿo˜|Jšœ Ÿ'˜0Jšœ Ÿ,˜6J˜—šœ'˜'J™8—J˜J™Ÿšœ žœžœ˜J˜—J™-šœ žœžœ˜Jšœ˜J˜Jšœ"˜"J˜J˜J˜—J™Jšœͺ™ͺJ˜Jšœ žœžœ˜$šœž œ˜JšœŸ ˜6JšœŸ6˜JJšœžœžœŸ.˜JJšœžœŸC˜YJšœ žœžœŸ8˜MJšœ˜J˜—šœžœžœ˜Jšœ™™!Jšœ žœŸ™"—J™™JšœŸCœ™RJšœŸ-™;Jšœ Ÿ ™+JšœŸ>™M—J™™*Jšœ Ÿ™$JšœŸY™`Jšœ Ÿ>™GJšœŸ;™PJšœ Ÿ0™=JšœŸ6™>JšœŸ6™EJšœŸ&™-—Jšœ™—J˜J™%šžœžœžœ˜Jšœ™Jšœ Ÿ-™9J™J™JšœŸ;™KJšœ ŸA™NJšœ Ÿ$™1JšœŸ#™1J™EJ™TJšœŸ™ JšœŸ-™™OJ™J™.J™YJ™[JšœŸ"™1JšœŸ6™LJšœŸB™SJšœŸ!™3J™NJ™J˜——šœ™J˜Jšœ™Jšœ žœžœŸD˜]J˜šœ žœžœŸ>˜Všœ2™2J™UJ™;J™-J™,——J™—™*J™Jšœ žœžœŸ4˜LJ˜—™/J™J™ΗJ™J™ηJ™šœžœžœŸ<˜[Kšœžœ˜!Kšœ!˜!Kšœž˜K˜K˜—Jšœ žœžœžœŸ/˜Nšœ žœžœŸ˜J™ J™ J™ J™J™—šœ žœžœŸ˜J™ J™ J™ J™J™J™—šœžœžœ˜KšœŸ"˜5KšœŸ%˜:Kšœ!Ÿ˜7Kšœ˜KšœžœŸ"˜BKšœŸ'˜?Kšœ žœžœŸ<˜QK˜KšΟo œV™aKš œΎ™Ζ—J˜—šœ(™(J˜šœžœžœŸ=˜OJšœ˜Jšœ˜—Jšœ žœžœŸ#˜:šœžœžœ˜JšœŸ.˜BJšœŸ/œ˜G—Jšœžœ˜(Jšœ žœ"˜3šœžœžœ˜JšœŸ.˜DJšœžœŸC˜WJ˜—J˜J˜Jšœžœžœ˜*šœžœžœ˜!J˜J˜J˜J˜Jšœ˜J˜Jšœ žœž˜Jšœ žœžœŸ˜6Jšœ˜—J˜šœžœžœžœ˜+J˜——šœ2™2J˜Jšœ žœžœ˜$šœžœžœ˜Jšœžœ˜ J˜Jšœ˜J˜Jšœ žœž˜Jšœ žœžœŸ˜6Jšœ˜—J˜šœ žœžœžœ ˜%J˜——šœ™J˜Jšžœžœžœ˜Jšœžœžœ ˜*Jšœžœ˜"J˜)J˜Jšœ žœ˜—J˜K™™&K™4—™*K™5Kšœ Οr‰™•—™*K™{Kšœ ‘)™5—K™K™K™™%K™ Kšœ ‘;™G—™'K™HKšœ ‘m™y—K™™&K™,Kšœ ‘™—K™—…—2π