Opened 4 years ago
Closed 2 years ago
#94 closed defect (worksforme)
When "481 Subscription does not exist" is received, a *new* SUBSCRIBE should be generated
| Reported by: | ibc | Owned by: | vadim |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | phapi | Version: | 2.2 |
| Keywords: | presence subscribe | Cc: |
Description
Sometimes, a presence server sould crash or being restarted so active subscription dialogs info is lost. In that moment, the client could send an in-dialog SUBSCRIBE (refresh) and would receive "481 Subscription does not exist".
In this case, the client should generate a new initial SUBSCRIBE (with no "To tag") inmediatelly to regenerate the subscription.
Unfortunatelly Qutecom doesn't do it. It does *nothing* when receiving a "481 Subscription does not exist" for a refresh (in-diaog) SUBSCRIBE.
Attachments (1)
Change History (9)
comment:1 Changed 4 years ago by ibc
comment:2 Changed 4 years ago by vadim
- Milestone set to QuteCom 2.2-RC4
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 4 years ago by ibc
- Resolution fixed deleted
- Status changed from closed to reopened
I'm not sure if this issue is totally fixed. Yes, in case Qutecom receives "481" for a refresh SUBSCRIBE, it generates a newinitial SUBSCRIBE for the AoR. But later, it receives NOTIFY from the server notifyng presence status for that AoR and it's not shown in the Contact list. This is, for some reason, Qutecom doesn't update the contact status.
It does receive the NOTIFY and replies 200, but doesn't update the contact status in the contact list.
comment:4 Changed 4 years ago by vadim
It seems that you've changed something on your server side because i don't see any 481 anymore so
i can't reproduce the behaviour
comment:5 Changed 4 years ago by ibc
After several hours of testing and debugging I think that I've found the bug:
- Qutecom "sometimes" doesn't react when receiving a NOTIFY so retransmissions are sent by the presence server.
- The last retransmissions arrives 1-2 seconds later so the real "expires" values is not so "real".
- So when Qutecom sends the refresh SUBSCRIBE it arrives 1-2 seconds after the subscription has expired in the presence server and receives a 481.
- Then Qutecom sends a new initial SUBSCRIBE (correct) and receives a NOTIFY.
- The next refresh SUBSCRIBE for the new subscription is wrong since it doesn't contain "Route" header (required of course since it's an in-dialog request and the proxy is doing loose-routing prefectly). So the proxy rejects the SUBSCRIBE with "403".
- After this occurs, Qutecom doesn't send any SUBSCRIBE anymore.
I attach a complete SIP trace showing and explaining in detail this issue, please check it.
My recommendation/suggesitions for this issue:
- Qutecom should send the refresh SUBSCRIBE 5-10 seconds before it expires to avoid the 481 when a retransmission has occurred in some NOTIFY. This is the way in which other softphones work. So, if a NOTIFY says "expires=30" then Qutecom should send the next refresh SUBSCRIBE after 20-25 seconds.
- Qutecom should react on any negative response (as 403, 500, 503...). For now, if it receives it, the subscription ends forever since Qutecom won't send SUBSCRIBE anymore.
comment:6 Changed 4 years ago by ibc
The other existing issue is that, if Qutecom receives too much sequential (no retranmissions) NOTIFY's for the same subscription (due to a possible bug in the presence server) then Qutecom replies with "500 Retry Later". This is correct, but unfortunatelly after it Qutecom doesn't sends a SUBSCRIBE anymore so the subscription ends.
comment:7 Changed 3 years ago by chris-mac
- Version changed from 2.2-RC3 to 2.2
comment:8 Changed 2 years ago by dneary
- field_os set to all
- Milestone QuteCom 2.2-RC4 deleted
- Resolution set to worksforme
- Status changed from reopened to closed
It seems like this bug is not reproducible.
Closing. Please reopen if you are still experiencing it.

Since Qutecom doesn nothing when receiving "481" for a refresh SUBSCRIBE, it means that it leaves receiving notifications for that account presence status (forever and ever).