[SR-Users] To-Tag on Register Refresh method

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 28 08:48:28 CEST 2021


Hello,

On 27.04.21 20:10, Duarte Rocha wrote:
> Hello all,
>
> I'm using Kamailio as a registrar and i have an endpoint that
> sometimes sends a REGISTER method with a To-Tag when refreshing
> its regist. My code on this proxy shares many similarities with the
> default kamailio.cfg configuration file.
>
> On that occasion Kamailio answers with a 404 - Not Here since it
> treats it as a in-dialog request which fails the loose_route check.
>
> Why would a CPE send a REGISTER with a To-Tag? Why is a REGISTER with
> a To-Tag rejected by Kamailio when it could otherwise be a
> successful REGISTER? Is this behaviour noncompliant with the SIP protocol?
>
> I thought about making an exception in the code and having this
> register following the same path as a register without to-tag, but i
> don't know if that is unsafe and/or noncompliant with the protocol.

To-tag presence indicates a request part of an existing dialog and
according to RFC3261 section "10.2 Constructing the REGISTER Request":

"A REGISTER request does not establish a dialog."

Now, if you have CPEs re-using the To-tag, you can change kamailio.cfg
to handle them via registrar module, I do not see any real problem doing
this. The default kamailio.cfg tries to follow closely the specs, but
the flexibility of Kamailio enables you in most of the case to handle
traffic even for really broken CPEs.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/




More information about the sr-users mailing list