PoachNotes.txt
Swinehart, January 5, 1986 11:54:53 pm PST
Copyright © 1985 by Xerox Corporation. All rights reserved.
Vital
January 3, 1986 10:28:54 am PST
Once a trunk party has been used for an outgoing calls, incoming calls look to it like outgoing, they report the last outgoing number, and they feep when you try to answer them. Fix by clearing outgoing field (and name field?) when using a trunk for incoming.
December 26, 1985 3:49:59 pm PST
January 3, 1986 1:28:43 pm PST
For some reason, NIL atoms are marshalled as atoms with a zero-length print name, unmarshalled without test. That's bogus. Should test NIL and not do MakeAtom on unmarshalling side. I think I'll fix it and release a version of RPCRuntime for me again, rather than trying to deal with all the non-NIL's. This will (eventually?) require a change to Lupine so that those who chose not to call the fixed routines won't get screwn.
 Fix: change LupineRuntime to marshal NIL atoms as NIL and to produce NIL as the result on the other side. Inform HThompson, if he does atoms. I've got such an RPCRuntime that I install as Basic.Loadees.
December 18, 1985 12:04:27 pm PST
I'm no longer convinced that queueing is needed in the Smarts at all. Probably one for the Lark keyboard, just to keep the characters flowing, but otherwise, now that conversation state is reported back for each call, it may not be necessary. Seems artificial every time I queue something. WaitForActive also has to do something like that, but a simple condition variable thing might well be good enough there; Progress is reported in its own process.
December 18, 1985 11:52:01 am PST
During connect attempt, if get "initiating" in but "notified" fails, should enter error state or something — all smarts.
December 18, 1985 11:52:35 am PST
Think about whether a common set of smarts implementations at some level would make sense.
December 13, 1985 2:37:34 pm PST
Feeping from Finch has been disabled, along with Prose. Needs to go back in sometime.
December 12, 1985 11:57:50 am PST
December 12, 1985 4:26:03 pm PST
Extensions handled wrong. Calling by number won't reach poacher as it stands. Once it does, the exotic (Finch but no Lark) stuff will get into a loop. Fix: $Extension[rName]=$number. Have a version of GetPartyFromNumber that will not follow the extension to an active party. Redefine the trunkOK bool to be trunkRequired.
November 26, 1985 4:09:21 pm PST
Call to self if poaching on somebody else reaches own office. Solution to this has to wait. Would be nice to nip all narcissism in the bud at GetParty time, but so far that's complicated. Wait.
December 11, 1985 3:21:51 pm PST
See Poachers message sent to VoiceProject^ this day to get the latest version of the switching design.
December 11, 1985 3:20:27 pm PST
January 3, 1986 1:28:22 pm PST
When somebody is running Finch but not an Etherphone, or doesn't have an Etherphone, another Etherphone caller should be able to call him or her, notifying the Finch of what's happening (almost -- it will look active while it's ringing) but using the back door. The easiest way is to set things up so that the callee is poaching on the caller's selected outgoing trunk. (Be careful about other calls arriving at that Finch while the first is in progress, but) Maybe the easiest way to do this is to have poaching be set up at GetParty time, computed anew, rather than at Create/Register time. Similarly, visiting, if that is retained as is. I'm going to attempt that. Poaching will be set up as a trunk is reserved for a calling party. You can do it only if the reservation succeeds. It shouldn't be changed if the present poachee is active (to prevent taking a connection away from somebody who already has it.) This sounds dangerous.
December 10, 1985 9:51:52 am PST
December 10, 1985 10:59:09 am PST
On-hook can now happen to an idle conversation, or when a call is ringing in. Ignore it!
December 9, 1985 10:10:35 am PST
December 10, 1985 9:51:45 am PST
both-tunes don't plug in octave thing right for back door call.
December 9, 1985 9:56:37 am PST
Verbatim, from a handwritten note: "Loop in deciding BY? Both smarts?"
December 2, 1985 2:12:13 pm PST
Holes in the present implementation:
Registration/Deregistration/Multiple services don't work right. Want trunk registration to be more independent. Now is the time to get registration/deregistration to work right.
Local trunk when remote not available: not sure it's implemented, probably doesn't work.
$Poaching not tested.
November 26, 1985 4:09:21 pm PST
Bug: Unsnarled a monitor lock when locked registering routine reported something via TU which uses DescribeParty which is locked, too. Unsnarl Deregistering stuff of a similar ilk. Why is DescribeParty locked anyhow?
November 26, 1985 4:09:21 pm PST
Throughout, must deal with trunks when front doors die and v/v. Or must we? Work briefly on decoupling them as much as possible, including in LarkOut.
November 26, 1985 4:09:21 pm PST
Bug: LarkSmartsImpl.DeregisterIfRegistered doesn't compute the right host atom. In fact, it needs to try various types out to be sure usages are not changing and screwing things up. As usual, the need for trunk and lark smarts to be in synch causes problems. Think the registration/deregistration/crash scene out again after things work. For now, presume that the types remain the same and that we're not registering multipled services.
November 26, 1985 4:09:21 pm PST
Don't take structures apart until all conversation-ending has been done? No need to delete parties if they can be revived.
November 26, 1985 4:09:21 pm PST
Do better job of idle party registering-deregistering-obtaining-deregistering when done.
November 26, 1985 4:09:21 pm PST
If called-party is running Finch but has no Etherphone, call via back door.
November 26, 1985 4:09:21 pm PST
Consider ways to deal with back door incoming calls while front-door busy. Every new ring now generates a new off-hook. If the callee hangs up, there might be time.
November 26, 1985 4:09:21 pm PST
January 3, 1986 1:29:23 pm PST
Progress report that doesn't encounter voice terminal needs to report to own trunk party, if there is one -- how?
 Through poaching link set up at GetParty time.
November 26, 1985 4:09:21 pm PST
How to deal with showstopper:
When finch smarts/party dies, zap smarts, but leave party and attached conversations and poachees.
When conv is dissolved, for each party, if it's got no smarts and no other convs, zap it.
November 26, 1985 4:09:21 pm PST
Figure out what party.numEnabled means now. Finch should maybe enable its party instantly? Maybe this should apply only to voice terminal smarts? Examine how used and come to terms with it. With multiple parties involved for one participant, so to speak, numEnabled is probably not a reasonable thing to look at anyhow.
November 26, 1985 4:09:21 pm PST
$poaching/$visiting chain must be followed backwards to zap when dying (see showstopper tho.)
November 26, 1985 4:09:21 pm PST
When dealing with showstopper, fix up cfRef stuff in places like IdleConversationsForParty in ThPartyInitImpl.
November 26, 1985 4:09:21 pm PST
P: need a way to tell a smarts that its party is gone for some reason.
November 26, 1985 4:09:21 pm PST
P: showstopper: when poacher smarts/party dies, how to represent it to conversation and other parties for duration of call; how to shut down when safe? Have to give up on finding out about calls in progress.
November 26, 1985 4:09:21 pm PST
Still need quicker timeout LarkSmarts->Lark. Party -> FinchSmarts can now take longer.
Done
December 10, 1985 11:00:19 am PST
December 10, 1985 11:00:21 am PST
No busy signal, new dial tone, or any of that.
November 26, 1985 4:09:21 pm PST
Revise connection spec stuff for conferences.
December 8, 1985 3:39:38 pm PST
RingTimeout needs to reschedule timeouts on maybe=>ring. Use InterpRingDetect differently.
December 8, 1985 2:16:57 pm PST
December 8, 1985 3:39:32 pm PST
info.phoneNumber doesn't get set up by anybody in LarkTrunkSmarts. Now get it as a variant of ThParty.DescribeParty. Alert trunk reserved test is bogus.
December 3, 1985 6:09:28 pm PST
December 4, 1985 8:57:19 am PST
Larks register as individuals instead of telephones. TUImpl still doesn't know about trunk parties, smarts, or smartsInfo. Fixed, but DoDescribeParty has a type bug.
Conferencing is not supported at low levels. Code is in such that if 3 or more parties show up at the conversation level, conferences will be built as they go active. If a third joins a first two, the conversation should switch from conference to regular, and vice versa.
Trunks completely unimplemented.
December 2, 1985 12:30:27 pm PST
Use RefID from CardTable.
November 27, 1985 2:37:33 pm PST
December 2, 1985 2:21:50 pm PST
Key table sent multiple times. Algorithms were todally bogus.
December 2, 1985 12:25:56 pm PST
December 2, 1985 12:30:19 pm PST
CheckIdle is now always queued on info.reports. It waits for n seconds and then kills an old conversation. During that time no further reports can be made. It's safe to FORK a process to kill the conversation after the n second wait. That will happen asynchronously with reports about other conversations. Argle.
November 30, 1985 4:43:48 pm PST
November 30, 1985 4:59:25 pm PST
info.haveKeys is bogus. Esp. when we begin alternating among conversations. Needs to be cDesc.keyTable and larkInfo.keyTable, and we need to send one whenever they differ. Also, active isn't working at all right. The test for same-hostness now must be made by comparing send and listen socket id's.
November 29, 1985 1:09:59 pm PST
November 30, 1985 4:59:19 pm PST
When one goes $idle, others may go $idle, too. Or into random other states. One must be willing to accommodate those reports, rather than complaining about impossible transitions. One needn't do anything in particular about them, though. This needs fixing quite soon. Worry only about the reportToAll states. Fix: when in $neverWas state, many transitions by others are no-ops.
November 29, 1985 1:09:57 pm PST
December 2, 1985 12:25:07 pm PST
Ring tune cache tests assume that, on Growler at least, NamesGV.GVGetAttribute is directly bound to the impl, not via RPC. Otherwise, have to do a rope compare for equality, not just a REF compare on the ropes. See LarkSmartsSupImpl.GetringTune. Turns out to work as expected. Also determine why we didn't even try to get a ring tune for Strowger (was a collection of trivial things).
November 27, 1985 2:37:33 pm PST
November 29, 1985 1:03:01 pm PST
EnterLarkState[idle] clears dial tone but doesn't clear the LED -- or it comes back on or something. Doesn't really seem to be going idle. InterpretHookState is switching from sPkr to std, moving tones to handset, just before going idle, in the case of onhook. Possibly could eliminate that transition, saving some time. The real bug is that the [hookswitch, disabled] event is not being interpreted right in the Lark parser. This EnterLarkState in InterpretHookState may be responsible for the blurp when you hang up sometimes that has plagued this system from day one. Also entering reserved=>parsing for no reason, but still shouldn't explain unwillingness to go idle. Main problem was that when conversations went idle, smartsInfo.currentConvID was being zeroed before a test for relevance that protected EnterLarkState from being called at the wrong time, in LarkSmartsSupImpl.NoteNewState. Saving the previous value and using that in the test fixes it. The other problems (spurious state transitions) should be eliminated, though. Recap — This is three problems: InterpretHookState is switching to handset mode when detecting the onhook; this is spurious (and ancient); solution is to do nothing on onhook. Parser is switching to Parsing mode when detecting the onhook; this is spurious, too, and might have an analog in the past; solution is to do nothing in that case. CheckIdle is waiting in-line, since it was originally designed to be called from an MBQueued routine. Solution: change Report to have FinishProc return both the report proc and what to report. Finish proc can return something that just checks idle, instead of full progress report, when it's the initiator.
November 27, 1985 2:33:57 pm PST
November 27, 1985 2:50:29 pm PST
info.currentConvID isn't set up when conversation is initiated from LarkSmarts. ThParty checks for all idle doesn't work when there is no associated posting (need to check at end of posting for all idle and no reports outstanding.)
November 26, 1985 5:58:06 pm PST
November 27, 1985 2:53:17 pm PST
In LarkSmartsImpl, if after creating a cDesc, something goes wrong, remove the cDesc from info.conversations. At least once, the credentials in the new cDesc were bogus (PostConvEvent wasn't doing the right thing about informing the caller.)
November 26, 1985 4:51:53 pm PST
November 26, 1985 4:57:04 pm PST
Niggles: RefAddr doesn't do the right thing about trunk party name (kpt). RefAddr doesn't do the right thing about smartsInfo's or smartsData's. show doesn't make the assignment to its second argument. Registration of function to print GMT's doesn't seem to work or something -- for "0". One way or another, conversationID's have to be readable! (didn't fix it this time.)
November 26, 1985 4:31:13 pm PST
November 26, 1985 5:09:29 pm PST
Bug: Reserved-transition from idle is completely bogus — doesn't call ThParty.CreateConversation. Besides, ThParty.GetCurrentParty doesn't seal up and return the result it has.
November 26, 1985 4:26:30 pm PST
November 26, 1985 4:27:18 pm PST
Bug: Test in verify was wrong for $noSuchParty.
November 26, 1985 4:23:35 pm PST
November 26, 1985 4:31:32 pm PST
Bug: smarts.enablesParty not set when party.enabled set? And vice/versa?
November 26, 1985 4:09:21 pm PST
November 26, 1985 4:15:04 pm PST
Bug: individual[ str.pt ] = strowger.lark instead of individual[ strowger.lark ] = str.pt.
November 26, 1985 4:09:21 pm PST
Must run RefIDImpl, CardTableImpl when running Thrush. See if RefIDImpl includes a copy of CardTableImpl. Probably shouldn't.
November 26, 1985 4:09:21 pm PST
Bug: How to dial version-mismatch: Parameters depends on Thrush.
November 26, 1985 4:09:21 pm PST
Bug: Check out an "Import failed"; use attended. Was making wrong test on whether to import or use interfaceRecord.
November 26, 1985 4:09:21 pm PST
Implement ThParty.GetKeyTable!
November 26, 1985 4:09:21 pm PST
$SmartsForHost[$"173#110#telephone"] = <larkSmarts>. $SmartsForHost connection must be able to distinguish trunk from front door, multiple smarts on the same machine, and the like. Or hair up the code that uses it to enumerate and distinguish.
November 26, 1985 4:09:21 pm PST
Change from tunea, tuneb, tunec to ringtune — simplify gv commands — count on text-file truth. Never need to update GV from caches, take that stuff out or don't use it.
November 26, 1985 4:09:21 pm PST
Find better place for SetupRingTunes stuff. Directly to database each time. tuneb, tunec disappear, as do limits on tune length.
November 26, 1985 4:09:21 pm PST
GVMake must set up both workstationhost and larkhost entries for people.
November 26, 1985 4:09:21 pm PST
Have to rethink whole socket stuff, make sure you understand how it works before finishing up connection stuff.
November 26, 1985 4:09:21 pm PST
ThParty: otherHost field is now a Machine, not CARDINAL.
November 26, 1985 4:09:21 pm PST
ThParty: Compute socket ID and conference host ID at the appropriate times. Supply what is claimed in the otherHost field.
November 26, 1985 4:09:21 pm PST
Make sure text-to-speech bit is still being set in LarkInfoBody.
November 26, 1985 4:09:21 pm PST
Connection can be computed at any time after both parties known. Should also record someplace convenient (in cDesc?) whether the connection involves two machines. Or just keep the connection around somewhere convenient. It should really be in the cDesc rather than in the info, though, since it can change from conv. to conv.
November 26, 1985 4:09:21 pm PST
LarkSmartsInitImpl and TrunkSmartsImpl must record smartsInfo back pointers. LarkOutImpl s/b changed not to accept sInfo argument any more.
November 26, 1985 4:09:21 pm PST
Ring tune gets to LarkOut via nth parameter.
November 26, 1985 4:09:21 pm PST
Subdued ring is just blurp. There can be other ring modes.
November 26, 1985 4:09:21 pm PST
Use MBQueue to distribute Progress, one per smarts! A timeout causes queue to be flushed. This prevents Progress from returning dispositions.
November 26, 1985 4:09:21 pm PST
Retain separate supervisor process if necessary to catch supervisory things? If needed.
November 26, 1985 4:09:21 pm PST
C-Rule: once a conversation is reported idle via Progress, no more ThParty calls may refer to it or to the other parties in the call.
November 26, 1985 4:09:21 pm PST
Deal with ABORTED and UNWIND in MBQueue stuff.
November 26, 1985 4:09:21 pm PST
C: document pulling all disposition stuff.
November 26, 1985 4:09:21 pm PST
Pull party.partyFailed and all that if not needed. Use enabled instead
November 26, 1985 4:09:21 pm PST
C: all the nb's returning from calls. Really need to point others at new ThParty and so on.
November 26, 1985 4:09:21 pm PST
C: document service-name-change business, or whatever you replace it with. Like trunks.
November 26, 1985 4:09:21 pm PST
C: $AssumedParty => $telephone/$service, $AuthenticatedParty => $individual,
$TrunkParty => $trunk -- in other words, use party type as name link to RName.
November 26, 1985 4:09:21 pm PST
C: $VoiceTerminal => $Smarts, $Manager => $Smarts. No more distinguishing.
November 26, 1985 4:09:21 pm PST
C: $Poachee => $Poaching.
November 26, 1985 4:09:21 pm PST
C: Host names represented as ropes or atoms are always in minimal form "3#333#" unless some other requirement dictates otherwise.
November 26, 1985 4:09:21 pm PST
D: Move ring-enable and all that to the database (White pages, eventually!) Include termination times! Subdued ringing is just a burp again.
November 26, 1985 4:09:21 pm PST
D: Have completely removed ring tune stuff from party level. Change it to use the GV data base directly at the smarts level. But based on RName information from current party.
November 26, 1985 4:09:21 pm PST
C: Interim step: don't do gvupdates: leave .lark entries dirty. Don't change non-lark entries through NamesGV.
November 26, 1985 4:09:21 pm PST
No: GVSetAttribute shouldn't mark dirty when nothing's changed? Maybe it doesn't matter any more.
November 26, 1985 4:09:21 pm PST
Q: partyData.partyFailed zapped?
November 26, 1985 4:09:21 pm PST
Probably **0 version of GetParty doesn't work now.
November 26, 1985 4:09:21 pm PST
Q: Eliminate $Extension link in favor of WP lookup? Nope, there's no index on phone number yet.
November 26, 1985 4:09:21 pm PST
Make sure initialization puts the type field in SmartsBody.
November 26, 1985 4:09:21 pm PST
No: Q: stateMismatch triggers progress report for all stateID's higher than own? May need that.
November 26, 1985 4:09:21 pm PST
C: Do office-of by allowing type=$telephone in GetParty calls.
November 26, 1985 4:09:21 pm PST
Use a separate stateID for each party in a conversation in ThPartyOpsImpl. There won't be stateMismatches due to lack of knowledge of other party's actions, only one's own. Makes them very rare.
November 26, 1985 4:09:21 pm PST
Don't allow transitions from $idle.
November 26, 1985 4:09:21 pm PST
Zap conversation some number of seconds after last party goes idle.
November 26, 1985 4:09:21 pm PST
stateMismatch => try again if trying to go $idle, else no-op?
Important
December 10, 1985 9:52:29 am PST
It would now be possible to treat a speakerphone click as a flash, and simplify the upswitch stuff, since calls all behave like spkr now.
December 8, 1985 4:51:20 pm PST
Humph. At the smarts level, larkInfo knows about both smartses, so one could get associated parties that way when calling? Think it through; the redundancy of how trunks and telephones are found feels funny.
December 2, 1985 2:12:13 pm PST
Holes in the present implementation:
Conferencing is not supported at high levels.
AssessDamage isn't implemented.
Bluejay completely unimplemented.
Finch hasn't been modified to match.
Prose, Intervals aren't anywhere.
$Visiting not implemented.
November 26, 1985 4:44:26 pm PST
Doc: what to put into LarkA.patches to set signalTimeout to FALSE in the Lark so that you can have breakpoints that don't cause the Lark to timeout. How to deal with Multicasting. Once and for all how to set up Etherphone connections (extract and extend from program comments.)
November 26, 1985 4:31:13 pm PST
Interface: Document meaning of ThParty.Enable carefully.
November 26, 1985 4:09:21 pm PST
Why is LarkFailed never mentioned in LarkSmartsSupImpl? And Deregister.
November 26, 1985 4:09:21 pm PST
Put radio, monitor mode back in. LarkInImpl, .....
November 26, 1985 4:09:21 pm PST
Want to be able to do *7, *1 (or *3, whichever is radio mode) on the fly. In radio mode, still route transmitter to DTMF.
November 26, 1985 4:09:21 pm PST
Monitor-lock what's necessary in Party/Smarts creation. Maybe everything.
November 26, 1985 4:09:21 pm PST
Add Thparty functions for obtaining old ConvEvent information. (started)
November 26, 1985 4:09:21 pm PST
Make sure there are routines for setting conversation attributes (subject, urgency, ...) after initial creation.
November 26, 1985 4:09:21 pm PST
Consider <conv>[<party>]=<convState> rather than <convState>[<conv>] = <party>; now all the parties and state to a conversation can be found by using the conversation as an attribute! The other searches are fast due to $Party attributes and so on. Sounds like a winner, but wait.
November 26, 1985 4:09:21 pm PST
Smarts: Don't really go idle (goingIdle is OK) until all prose reports have been made (at least an error one) and like that. Exception: when communications are down, still have to deal with that.
November 26, 1985 4:09:21 pm PST
Need to put Reports/Problems in the point of detection of each problem, and other strategic places. Some for normal flow, some for exceptions. Need to parameterize each appropriately; many now have just constant messages.
November 26, 1985 4:09:21 pm PST
Consider a way to get a busy test into Finch.
November 26, 1985 4:09:21 pm PST
Logging, statistics, performance measurement.
November 27, 1985 2:43:50 pm PST
In Finch, the initialization procedures are not protected by monitors or anything. During rollback, more than one reason for starting/stopping Finch can cause trouble, which has been experienced at least once.
November 26, 1985 4:09:21 pm PST
Cause $visiting to be inherited as parties die and resurface.
November 26, 1985 4:09:21 pm PST
P: more reasonable way for Finch to influence call progress without disposition.
 (only interesting time: notified. Finch can tell Thrush not to go into ringBack, or to reject an
 extra call, for some number of seconds. During that time Finch can make its own decisions.
 If the timeout ever occurs, this condition is removed. !!!!)
November 26, 1985 4:09:21 pm PST
Finch checks in once in a while, re-registers if gone.
November 26, 1985 4:09:21 pm PST
P: showslower: no good methodology for killing and reregistering Bluejay parties -- automatically, anyhow.
December 2, 1985 12:37:30 pm PST
Need to change NamesGV interface to use long ropes next time we're really changing what goes on the server. In general, examine all the RPC interfaces for RPC.ShortROPEs that should be Rope.ROPEs. Has to do with long tunes.
December 2, 1985 12:30:27 pm PST
Consider a command that clears all triples, flushes the RefID cache (hard), flushes the conversation cache, and any other state saving values. Then could restart even when per-each restart code didn't work.
Some Day
December 3, 1985 3:07:32 pm PST
Should go through and eliminate all NetAddress and Machine types in favor of PupTypes.something; similarly with Lark.VoiceSocket. Similarly a naming cleanup on ThParty.PartyInfo is already called for.
December 3, 1985 2:36:37 pm PST
There's a problem with multicasting: once a lark is listening on a multicasting port, it can't be reached unless the multicast forwarder stays accurate. Over a server or forwarder crash, this isn't guaranteed. Polle points out that one approach is to use stable storage to record the current state of forwarding, being careful about synchronization. The multicast-forwarder would be responsible for keeping the state of multicasting tracking that of the stable storage representation. There would be a reset function that would communicate with each Lark, setting it back to normal, and clearing the related entries. For now, will be as careful as possible in the server code and hope for the best during conferences.
November 26, 1985 4:09:21 pm PST
Reason, comment should be part of credentials? Seems to need to be replicated, too. Sigh.
November 26, 1985 4:09:21 pm PST
Make stateInConv an ATOM, change tables into refTabs or refTabs of refTabs, stored in separate source files, registered to ATOMs (can change them on the fly). Use phone number mappings as model. Still haven't found a reasonable way to do this.
November 26, 1985 4:09:21 pm PST
Compiler and so on: ROPE, Apply, VAL params.
November 26, 1985 4:09:21 pm PST
Determine degree of authentication possible for each type of registrant. Add data structures necessary to reflect authenticated/not. Use RPC-provided information where possible to be sure of authentication.
November 26, 1985 4:09:21 pm PST
In any session, authentication of a GVNames cache password should be renewed by client call supplying password. Present interface can handle it, but it's not presently done.
December 2, 1985 12:37:30 pm PST
Consider a setting, like attended, that puts off the destruction of old conversations. Perhaps in a loop until the setting is turned off. Good for anything?