[SIPForum-discussion] Is there any way to distinguish between a new REGISTER message and a refreshing REGISTER message?
Paul Kyzivat
pkyzivat at alum.mit.edu
Thu Nov 5 21:41:23 UTC 2015
On 10/28/15 8:23 AM, Ugo wrote:
> Is there any way to distinguish between a new REGISTER message and a
> refreshing REGISTER message?
Who wants to know, and why? Of course the registrar can tell. But the
UAC can't tell just by examining the response. Nor can an outside observer.
The UAC presumably *thinks* it knows whether it is doing a refresh or a
new register. But it might get it wrong. This can happen if it waits
till the old registration is about to expire, and then is just a little
bit late in getting the refresh there. In that case it will act as a new
registration, which is presumably what the UAC wants in that case. Also,
the registrar may have decided to terminate the old registration early
for some reason.
If you really want to know, then the way to find out is to subscribe to
the "reg" event package. Then you will get a notification when the old
registration expires.
There is one case when it may be important for the UAC to know. If it is
using temporary GRUUs (rfc5627), then if the registration ever times
out, then all the previously assigned temporary gruus will stop working.
> I have noticed that in some scenarios I can identify a REGISTER message
> which represents a refresh of the user registration through the
> parameter "expires=0" of the Contact header.
Do you mean in the *request*, or in the *response*?
An expires=0 in a *request* typically causes an active registration to
end. I wouldn't call that a refresh. It is an *un*register.
> However, this does not
> work when the REGISTER message to refresh a user registration is similar
> to a new registration message.
*Every* register message to *refresh* a user registration is similar to
an new registration. The only form that looks noticeably different is
the *un*registration form.
Also, note that one UA *can* send a REGISTER to updates (replaces or
removes) a contact that was previously registered by a different UA.
And, in cases where multiple UAs have registered using the same AoR, the
response to a register request will contain *all* the contacts that are
currently registered by all of those UAs.
Typically the response to a register request will *not* contain contacts
that were previously registered but have expired. But I have heard of
some that will return contacts that have *just* been removed, with
contact=0.
Thanks,
Paul
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> ~ ~ ~ ~ ~ ~ ~
> *Ugo Giordano, Ph.D. Student*
> Department of Electrical Engineering and Information Technologies
> University of Naples "Federico II"
> Via Claudio, 21 - 80125 Napoli - Italy
>
> Institutional e-mail: ugo.giordano at unina.it <mailto:ugo.giordano at unina.it>
> *Skype:*ugo.giordano87
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> ~ ~ ~ ~ ~ ~ ~
>
>
>
>
>
>
>
>
> _______________________________________________
> This is the SIP Forum discussion mailing list
> TO UNSUBSCRIBE, or edit your delivery options, please visit http://sipforum.org/mailman/listinfo/discussion
> Post to the list at discussion at sipforum.org
>
More information about the discussion
mailing list