[OpenSIPS-Users] How to send 200 OK for REGISTER without adding Tag in SIP-To-Header (To-Tag $tt)

Iñaki Baz Castillo ibc at aliax.net
Wed Oct 8 21:50:02 CEST 2008


El Miércoles, 8 de Octubre de 2008, Pai Peng escribió:
> There are two different points between these two 200 OKs:

> in Via: the working 200 OK response has a received=ip added into the
> Via-Header (it is the same as the src_ip in via-header), but the 200 OK
> from Opensips has not.

If the REGISTER is sent from a natted client then the real source IP arriving 
to the proxy will not match the IP in the Via header. In that case the server 
MUST (per RFC3261 definition) add a "received=REAL_SOURCE_IP" and send there 
the responses.


> in To-header: the working 200 OK response has not To-Tag inserted, but the
> other from Opensips has.

The To tag is MANDATORY. Please, don't think that the error is there anymore. 

>
> I have just checked out in the early discussion about the ";received=ip" in
> VIA. It is not a MUST. But in order to solve my problem, I would like to
> add this in via-header by myself.

Please, what you should do is reading the RFC3261 to understand when 
the "received" is a MUST instead of getting conclusions from two simple 
cases.



> The question is, if it is possible to do it? When yes, how to
> configuration?

Adding "received" when it's not needed is... not needed at all. ;)

IMHO you should investigate other causes for your problem instead of 
re-inventing SIP ;)

-- 
Iñaki Baz Castillo



More information about the Users mailing list