[presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Iñaki Baz Castillo
Hi, I've detected an issue related to NOTIFY "expires" value when
there are retransmissions for the NOTIFY sent by OpenSIPS:

Imagine that a OpenSIPS sends a NOTIFY "expires=30" to a client at 12:00:00.
Due to some reasons, the client doesn't reply to it (or perhaps there
are network errors) so the NOTIFY is retransmitted by OpenSIPS.
Finally the NOTIFY arrives to the client at 12:00:01.

If the client is too strict, it will send a refresh SUBSCRIBE at
12:00:31, so the subscription has expired in the server one second
ago.
This will cause a "481".

Unfortunatelly some clients (as Qutecom) work in this way, and the
worst: they don't react well when receiving a 481.

So I suggest a new option "notify_expires_offset":

  modparam("presence", "notify_expires_offset", 5)

In the above case (with retransmissions) it means that the client
would receive a NOTIFY with "expires=25" at 12:00:01, and the client
will send the refresh SUSBCRIBE at 12:00:26 (before 12:00:30, the time
in which the subscription would expire in the server), so it would
mitigate the 481 issue.

Is it feasible to add this option? opinions?

Thanks a lot.

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Anca Vamanu-2
Hi,

The expires_offset is somehow supposed to do that - but it lost the
initial meaning in the mean time :) .
I will fix that.

Thanks,
Anca


Iñaki Baz Castillo wrote:

> Hi, I've detected an issue related to NOTIFY "expires" value when
> there are retransmissions for the NOTIFY sent by OpenSIPS:
>
> Imagine that a OpenSIPS sends a NOTIFY "expires=30" to a client at 12:00:00.
> Due to some reasons, the client doesn't reply to it (or perhaps there
> are network errors) so the NOTIFY is retransmitted by OpenSIPS.
> Finally the NOTIFY arrives to the client at 12:00:01.
>
> If the client is too strict, it will send a refresh SUBSCRIBE at
> 12:00:31, so the subscription has expired in the server one second
> ago.
> This will cause a "481".
>
> Unfortunatelly some clients (as Qutecom) work in this way, and the
> worst: they don't react well when receiving a 481.
>
> So I suggest a new option "notify_expires_offset":
>
>   modparam("presence", "notify_expires_offset", 5)
>
> In the above case (with retransmissions) it means that the client
> would receive a NOTIFY with "expires=25" at 12:00:01, and the client
> will send the refresh SUSBCRIBE at 12:00:26 (before 12:00:30, the time
> in which the subscription would expire in the server), so it would
> mitigate the 481 issue.
>
> Is it feasible to add this option? opinions?
>
> Thanks a lot.
>
>  


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Iñaki Baz Castillo
2009/5/26 Anca Vamanu <[hidden email]>:
> Hi,
>
> The expires_offset is somehow supposed to do that - but it lost the initial
> meaning in the mean time :) .
> I will fix that.


Hi Anca, the docs say that it only affects the "200 OK" "expires"
value for an incoming PUBLISH:

1.3.7. expires_offset (int)
 The value that should be subtracted from the expires value when
sending a 200OK
 for a publish. It is used for forcing the client cu send an update
before the old publish
 expires.


Thanks a lot.


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Anca Vamanu-2

Yes, it was only for publish.
I extended it for subscribes and also changed the docs.

thanks,
Anca

Iñaki Baz Castillo wrote:

> 2009/5/26 Anca Vamanu <[hidden email]>:
>  
>> Hi,
>>
>> The expires_offset is somehow supposed to do that - but it lost the initial
>> meaning in the mean time :) .
>> I will fix that.
>>    
>
>
> Hi Anca, the docs say that it only affects the "200 OK" "expires"
> value for an incoming PUBLISH:
>
> 1.3.7. expires_offset (int)
>  The value that should be subtracted from the expires value when
> sending a 200OK
>  for a publish. It is used for forcing the client cu send an update
> before the old publish
>  expires.
>
>
> Thanks a lot.
>
>
>  


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Iñaki Baz Castillo
2009/5/26 Anca Vamanu <[hidden email]>:
>
> Yes, it was only for publish.
> I extended it for subscribes and also changed the docs.

But, will it also affect on the NOTIFY's "expires" value sent by
OpenSIPS upon receipt of a new PUBLISH?


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Anca Vamanu-2
Iñaki Baz Castillo wrote:

> 2009/5/26 Anca Vamanu <[hidden email]>:
>  
>> Yes, it was only for publish.
>> I extended it for subscribes and also changed the docs.
>>    
>
> But, will it also affect on the NOTIFY's "expires" value sent by
> OpenSIPS upon receipt of a new PUBLISH?
>
>
>  
No. It will affect all the Notifies. Each time a Notify is generated (no
matter the cause) the expires value inserted in the message will be
decreased with expires_offset.


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Iñaki Baz Castillo
2009/5/26 Anca Vamanu <[hidden email]>:

> Iñaki Baz Castillo wrote:
>>
>> 2009/5/26 Anca Vamanu <[hidden email]>:
>>
>>>
>>> Yes, it was only for publish.
>>> I extended it for subscribes and also changed the docs.
>>>
>>
>> But, will it also affect on the NOTIFY's "expires" value sent by
>> OpenSIPS upon receipt of a new PUBLISH?
>>
>>
>>
>
> No. It will affect all the Notifies. Each time a Notify is generated (no
> matter the cause) the expires value inserted in the message will be
> decreased with expires_offset.

Great :)
Thanks a lot for the fastest implementation of a wish !


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [presence] 'expires_offset' also for NOTIFY ('notify_expires_offset')

Anca Vamanu-2
Iñaki Baz Castillo wrote:

> 2009/5/26 Anca Vamanu <[hidden email]>:
>  
>> Iñaki Baz Castillo wrote:
>>    
>>> 2009/5/26 Anca Vamanu <[hidden email]>:
>>>
>>>      
>>>> Yes, it was only for publish.
>>>> I extended it for subscribes and also changed the docs.
>>>>
>>>>        
>>> But, will it also affect on the NOTIFY's "expires" value sent by
>>> OpenSIPS upon receipt of a new PUBLISH?
>>>
>>>
>>>
>>>      
>> No. It will affect all the Notifies. Each time a Notify is generated (no
>> matter the cause) the expires value inserted in the message will be
>> decreased with expires_offset.
>>    
>
> Great :)
> Thanks a lot for the fastest implementation of a wish !
>
>
>  
;) It was a simple one.

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel