[sip-comm-dev] [Patch] Check SIP SUBSCRIBE support


#1

Hi all,

Some time ago I reported issue 433 about a "bad event" error
(https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=433). It
turned out it was related to my SIP provider not supporting SUBSCRIBE
messages (used for being notified of the presence status of a
contact). I eventually solved the problem by unticking the "enable
presence (SIMPLE)" option. However, the bad event error message is
cryptic for the user and he may not guess that he has to disable this
option.

I propose that SIP Communicator determines whether the remote SIP
contact supports SUBSCRIBE extension rather than annoy the user with
that. There are at least two ways to achieve it:
1) send an OPTIONS query to the contact and read if SUBSCRIBE
extension is supported in the response.
2) send a SUBSCRIBE query to the contact and assume SUBSCRIBE
extension isn't supported if the response contains error code 489 (Bad
event).

I opted for 2) as it was easier to implement. That's what the patch
attached is about (applies to svn revision 4313).

As far as subscribing to presence status is concerned, the "enable
presence (SIMPLE)" option is now ignored. It is still used when
publishing the presence status, though. I'll look if it's also
possible to ignore it there, so as to drop this option for good.

Cheers,

sip_subscribe_unsupported.patch (5.61 KB)

···

--
Sébastien Mazy


#2

Hey Seb,

I was about to commit your patch but then thought about the following:

Wouldn't it be better to keep the "enable SIMPLE" option? The point is
that users might want to turn presence off even if it is supported. If
you agree then I'll only commit the code that handles the BAD_EVENT
response.

WDYT?

Emil

P.S. Hey, I just remembered that we discussed a few modifications on the
single-stack-and-port patch. Are you still planning on making them? If
not then I may try to have a look one of the following days.

Sébastien Mazy написа:

···

Hi all,

Some time ago I reported issue 433 about a "bad event" error
(https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=433). It
turned out it was related to my SIP provider not supporting SUBSCRIBE
messages (used for being notified of the presence status of a
contact). I eventually solved the problem by unticking the "enable
presence (SIMPLE)" option. However, the bad event error message is
cryptic for the user and he may not guess that he has to disable this
option.

I propose that SIP Communicator determines whether the remote SIP
contact supports SUBSCRIBE extension rather than annoy the user with
that. There are at least two ways to achieve it:
1) send an OPTIONS query to the contact and read if SUBSCRIBE
extension is supported in the response.
2) send a SUBSCRIBE query to the contact and assume SUBSCRIBE
extension isn't supported if the response contains error code 489 (Bad
event).

I opted for 2) as it was easier to implement. That's what the patch
attached is about (applies to svn revision 4313).

As far as subscribing to presence status is concerned, the "enable
presence (SIMPLE)" option is now ignored. It is still used when
publishing the presence status, though. I'll look if it's also
possible to ignore it there, so as to drop this option for good.

Cheers,

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi all,

Reviving an old thread left on my todo list...

···

On Thu, Aug 21, 2008 at 02:38:25PM +0200, Sébastien Mazy wrote:

Some time ago I reported issue 433 about a "bad event" error
(https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=433). It
turned out it was related to my SIP provider not supporting SUBSCRIBE
messages (used for being notified of the presence status of a
contact). I eventually solved the problem by unticking the "enable
presence (SIMPLE)" option. However, the bad event error message is
cryptic for the user and he may not guess that he has to disable this
option.

On Tue, Oct 28, 2008 at 03:22:57PM +0100, Sébastien Mazy wrote:

Hi Emil,

On Tue, Sep 23, 2008 at 12:58 AM, Emil Ivov <emcho@sip-communicator.org> wrote:
> I was about to commit your patch but then thought about the following:
>
> Wouldn't it be better to keep the "enable SIMPLE" option? The point is
> that users might want to turn presence off even if it is supported. If
> you agree then I'll only commit the code that handles the BAD_EVENT
> response.

You're absolutely right (and I'm absolutely late). Yes, the whole
point is only allowing the user to add a contact which doesn't support
presence notification, even if the "enable presence" option is ticked.

I just commited r4999 to address the issue. It doesn't remove the
"enable SIMPLE" option. If there are no objections, I'll close #433.

Cheers,

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net