[OpenSIPS-Users] "received=" parameter in Via

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Aug 12 23:25:53 CEST 2008


Hi Alex,

My understanding of the text
"In fact, the server MUST insert a "received" parameter
 containing the source IP address that the request came from, even if
it is identical to the value of the "sent-by" component. "

is related to

"If this Via header field value contains an "rport" parameter"

So, received is mandatory only if rport is present .

Regards,
Bogdan

Alex Massover wrote:
> Hi!
>
> OpenSIPS implement this logic:
>
> /* Via special params:
>  * requests:
>  * - if the address in via is different from the src_ip or an existing
>  *   received=something is found, received=src_ip is added (and any preexisting
>  *   received is deleted). received is added as the first via parameter if no
>  *   receive is previously present or over the old receive.
>
>
> But RFC 3581 says that:
> 4.  Server Behavior
>    The server behavior specified here affects the transport processing
>    defined in Section 18.2 of SIP [1].
>    When a server compliant to this specification (which can be a proxy
>    or UAS) receives a request, it examines the topmost Via header field
>    value.  If this Via header field value contains an "rport" parameter
>    with no value, it MUST set the value of the parameter to the source
>    port of the request.  This is analogous to the way in which a server
>    will insert the "received" parameter into the topmost Via header
>    field value.  In fact, the server MUST insert a "received" parameter
>    containing the source IP address that the request came from, even if
>    it is identical to the value of the "sent-by" component.  Note that
>    this processing takes place independent of the transport protocol.
>
> As far as I understand it means that "received" should be added always.
>
>
> I'm trying to understand what is the reason for not adding "received" when ip address in Via is the same like src_ip?
>
> --
> Best Regards,
> Alex Massover
>
>
>
>  
>  
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
> ************************************************************************************
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list