Re: Re: [nist-sip-dev] what to do when NOTIFY arrives before OK on SUBSCRIBE ?
"M. Rangnathan" <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
Jeroen,
I think the proceedure to use in matching the NOTIFY to an uncompleted
SUBSCRIBE is a bit more complicated that what I inferred from your
scheme below. Here's the paragraph from the Subscribe Notify RFC
NOTIFY requests are matched to such SUBSCRIBE requests if they contain
the same "Call-ID", a "To" header "tag" parameter which matches the
"From" header "tag" parameter of the SUBSCRIBE, and the same "Event"
header field. Rules for comparisons of the "Event" headers are
described in section 7.2.1. If a matching NOTIFY request contains a
"Subscription-State" of "active" or "pending", it creates a new
subscription and a new dialog (unless they have already been created by
a matching response, as described above).
I did have such a checking method but was not calling it when creating
the server tx for the incoming Notify.
Comments?
Ranga
Jeroen van Bemmel wrote:
> Ranga,
>
> There is a problem here: How will the application match the NOTIFY
> with a subscription it initiated? And who (application or stack) is
> supposed to send "481 call/transaction does not exist" when the NOTIFY
> does not match an existing subscription?
>
> My approach is to maintain dialogs using { from-tag + call-id } as
> key. Then, when a NOTIFY comes in, this is used to lookup the
> corresponding SUBSCRIBE-initiated dialog, and 481 is sent when it does
> not exist.
>
> The above setup is also needed to support forking: when multiple
> NOTIFYs with different from-tags arrive, N dialogs should be created.
> If you only create the dialog upon SUBSCRIBE 200 OK, it won't work
> (since other 2xx responses may get filtered by proxies)
>
> Regards,
>
> Jeroen
>
> ----- Original Message ----- From: "M. Rangnathan" <[email protected]>
> To: "Bayart, Frederik" <[email protected]>
> Cc: <[email protected]>; "sip mailing" <[email protected]>
> Sent: Sunday, April 16, 2006 5:28 AM
> Subject: [nist-sip] Re: [nist-sip-dev] what to do when NOTIFY arrives
> before OK on SUBSCRIBE ?
>
>
>> Hi Frederik,
>>
>> This case is working. I modified the examples/subsnotify to send
>> notify first. My original answer was wrong. Yes the
>> getServerTransaction should indeed return a null pointer, This is
>> because the dialog has not yet been established by the Subscribe (it
>> gets established on an OK). You can create one using
>> sipProvider.getNewServerTransaction().
>>
>> I have committed the new example to the nist cvs repository.
>>
>> Ranga
>> Bayart, Frederik wrote:
>>
>>> Hallo Ranga,
>>>
>>> Did you had time to look at this problem ?
>>>
>>> Best regards,
>>>
>>> Frederik
>>>
>>> -----Original Message-----
>>> From: M. Ranganathan [mailto:[email protected]]
>>> Sent: Monday, March 20, 2006 8:06 PM
>>> To: Bayart, Frederik
>>> Cc: [email protected]
>>> Subject: Re: [nist-sip-dev] what to do when NOTIFY arrives before OK on
>>> SUBSCRIBE ?
>>>
>>>
>>> Hi Frederik,
>>>
>>> It should not return a null pointer. I will check and fix the bug if
>>> it exists.
>>>
>>> Ranga
>>>
>>> If you can Bayart, Frederik wrote:
>>>
>>>
>>>> Hallo,
>>>>
>>>> Can someone tell me how to proceed in the next case :
>>>>
>>>> | SUBSCRIBE |
>>>> | ---------------> |
>>>> | |
>>>> | NOTIFY |
>>>> | <--------------- |
>>>> | |
>>>> | OK SUBSCRIBE |
>>>> | <--------------- |
>>>>
>>>>
>>>> If the NOTIFY arrives before the OK on the SUBSCRIBE, the call to
>>>> event.getServerTransaction( ) in the function processRequest(
>>>> RequestEvent event ) returns a null pointer. According to me, this
>>>> is because the OK on the subscribe is not arrived yet. So I can't
>>>> reply on the NOTIFY (with the function event.getServerTransaction(
>>>> ).sendResponse). What is the way to detect this case and to proceed ?
>>>>
>>>> Regards,
>>>>
>>>> Frederik
>>>>
>>>>
>>>> _______________________________________________
>>>> nist-sip-dev mailing list
>>>> [email protected]
>>>> http://fs4.antd.nist.gov/mailman/listinfo/nist-sip-dev
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> M. Ranganathan
>> Advanced Networking Technologies Division,
>> National Institute of Standards and Technology (NIST),
>> 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 3664
>> , fax:301 590 0932 http://w3.antd.nist.gov/
>> Advanced Networking Technologies For the People!
>>
>>
>> _______________________________________________
>> nist-sip mailing list
>> [email protected]
>> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>
>
>
> _______________________________________________
> nist-sip-dev mailing list
> [email protected]
> http://fs4.antd.nist.gov/mailman/listinfo/nist-sip-dev
--
M. Ranganathan
Advanced Networking Technologies Division,
National Institute of Standards and Technology (NIST),
100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899.
tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/
Advanced Networking Technologies For the People!