Subject: [Sipping] Questions concerning KPML support for multiple simultaneous subscriptions

From: "Kamitses, Jerry" <[email-masked]>
Date: Mon, 1 Mar 2004 11:44:49 -0500

SIP experts ...
 
We are trying to clear up some confusion regarding KPML support for multiple 
simultaneous subscriptions and how event quarantining is intended to work 
in this case.  Hopefully this is the correct forum for such a discussion. 
 
In the questions below I have included snippets from the spec, 
draft-ietf-sipping-kpml-02 ; February 2, 2004; Expires: August 2, 2004 ,
to provide a focus for specific questions.

The concept of quarantining appears to be defined in Section 4.1 KPML Request
 
   KPML messages are independent.  Thus it is not possible for the
   current document to know if a following document will enable barging
   or want the digits flushed.  Therefore, the user device MUST
   quarantine all digits detected between the time of the report and the
   interpretation of the next script, if any.  If the next script
   indicates a buffer flush, then the interpreter MUST flush all
   collected digits from consideration from KPML documents received on
   that dialog with the given event id.  If the next script does not
   indicate flushing the quarantine digits, then the interpreter MUST
   apply the collected digits (if possible) against the digit maps
   presented by the script's <regex> tags.  If there is a match, the
   interpreter MUST follow the procedures in Section 3.7.2  If there is
   no match, the interpreter MUST flush all of the collected digits.
 
Is it correct to conclude that quarantining is applied separately 
per "dialog with the given event id", or should it be only per dialog
(which we assume here means SUBSCRIBE-initiated dialog -- correct?), 
or only at the user device level?   
 
Regarding the last two sentences,  "If there is a match ..." and " If there 
is no match ...", is it correct to assume that there is also the third implied
possibility:
 
    If the collected digits provide partial match for one or more 
    of the digit maps then the user device waits for additional 
    input.
 
Correct ?
 
When user device has multiple simultaneous subscriptions, what is supposed 
to happen during the quarantine period for one of these subscriptions? 
According to 4.1.6 (Multiple, Simultaneous Subscriptions)
 
   Some end devices may support multiple key press event notification
   subscriptions at the same time.  In this situation, the end device
   honors each subscription individually and independently.
 
   A SIP user agent may request multiple subscriptions on the same
   SUBSCRIBE dialog, using the id parameter to the kpml event request.
 
   One or more SIP user agents may request independent subscriptions on
   different SIP dialogs.  In the body of the SUBSCRIBE is a leg
   parameter that indicates which leg to monitor.  Section 3.2 describes
   the dialog addressing mechanism in detail.
 
How is quarantining supposed to happen in  these different scenarios?
While events are being quarantined on one subscription should the user
device continue to process them on the additional subscriptions ?
 
How does quarantining work in the case of persistent subscriptions? 
According to 2.3 Operation:
 
   A KPML request can be persistent or one-shot.  Persistent requests
   are active until either the dialog terminates, including normal
   subscription expiration, the client replaces them, the client deletes
   them by sending a null document on the dialog, or the client deletes
   the subscription by sending a SUBCRIBE with an expires of zero (0).
 
So, does that mean that when a match occurs and a NOTIFY is generated,
then the user device immediately re-starts processing events on this 
subscription, sending the next NOTIFY(s) whenever needed ? 
 
How does quarantining work in the case of on-shot subscriptions?
Again, according to  2.3 Operation:
 
   One-shot requests terminate themselves once a match occurs.
 
Then, in 3.7.7 One-Shot vs. Persistent Requests
 
   A one-shot kpml subscription is one that the KPML document does not
   mark as persistent.  If the end device detects a key press stimulus
   that triggers a one-shot KPML event, then the end device (notifier)
   MUST set the "Subscription-State" in the NOTIFY message to
   "terminated".  At this point the end device MUST consider the
   subscription destroyed.  The end device MUST quarantine digits per
   the controls specified in Section 4.1.
 
Section 4.1 doesn't have anything specific to say about one-shot vs. 
persistent.  The only references to quarantine in this section are:
 
   If the user presses a key not matched by the <regex> tags, the user
   device MUST discard the key press from consideration against the
   current or future KPML messages.  However, as described above, once
   there is a match, the user device quarantines any key presses the
   user entered subsequent to the match.
 
and
 
   KPML messages are independent.  Thus it is not possible for the
   current document to know if a following document will enable barging
   or want the digits flushed.  Therefore, the user device MUST
   quarantine all digits detected between the time of the report and the
   interpretation of the next script, if any.  If the next script
   indicates a buffer flush, then the interpreter MUST flush all
   collected digits from consideration from KPML documents received on
   that dialog with the given event id.  If the next script does not
   indicate flushing the quarantine digits, then the interpreter MUST
   apply the collected digits (if possible) against the digit maps
   presented by the script's <regex> tags.  If there is a match, the
   interpreter MUST follow the procedures in Section 3.7.2  If there is
   no match, the interpreter MUST flush all of the collected digits.
 
It is not quite clear what "as described above" is referencing in the first 
paragraph ("above" seems to cover a lot of ground at this point in the spec!). 
The second paragraph seems to indicate that quarantining occurs for one-shot 
subscriptions? Is this a correct interpretation?  If so, and there are multiple 
simultaneous one-shot subscriptions,  and two or more have sent NOTIFY 
(assuming this is also a correct guess of how this is supposed to work?), then 
how does the user device associate subsequent subscriptions with the multiple 
quarantine buffers that are outstanding (again assuming this is a correct guess 
as to how quarantining is supposed to work in the multiple subscriptions case). 
 
Also, regarding the statement:
 
   the user device MUST quarantine all digits detected between the 
   time of the report and the interpretation of the next script, 
   if any
 
when, exactly, is quarantining allowed to stop? 
Does "if any" potentially mean the user device may never receive another 
subscription, but must continue quarantining ?

I would be most grateful for whatever clarification the experts on this list can provide
(including  a pointer to another more appropriate forum for these questions).
 
Thanks in advance.