[OpenSIPS-Devel] [ opensips-Patches-2694523 ] fix: tm: msg_builder : Invalid generated headers

SourceForge.net noreply at sourceforge.net
Fri Mar 20 15:46:13 CET 2009


Patches item #2694523, was opened at 2009-03-19 15:10
Message generated for change (Comment added) made by csollet
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2694523&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christophe Sollet (csollet)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix: tm: msg_builder : Invalid generated headers

Initial Comment:
When display name is not present but header tags exists, built To: and From: headers are invalid since header tags become URI tags ('<' and '>' are missing) : 

Original Header :

From: DisplayName <sip:user at domain;uritag=val>;htag=value
From: sip:user at domain;uritag=val
From: <sip:user at domain;uritag=val>;htag=value

Current tm implementation :

From: DisplayName <sip:user at domain;uritag=val>;htag=value (VALID)
From: sip:user at domain;uritag=val (VALID)
From: sip:user at domain;uritag=val;htag=value (INVALID)

With attached patch :

From: DisplayName <sip:user at domain;uritag=val>;htag=value (VALID)
From: sip:user at domain;uritag=val (VALID)
From: <sip:user at domain;uritag=val>;htag=value (VALID)



----------------------------------------------------------------------

Comment By: Christophe Sollet (csollet)
Date: 2009-03-20 15:46

Message:
Hi,

I'm ok with your example but the current implementation seems incorrect in
case we have both uri and header tags : 

From: <sip:user at domain;uritag=val>;htag=val

msg_builder build the header like this : 

From: sip:user at domain;uritag=val;htag=val

I face this case using MI dlg_end_dlg of dialog module : the UAC rejected
the BYE request as the From: header don't match the original To: header.

Regards,
Christophe.




----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-03-20 15:22

Message:
Hi,

According to the RFC3261, the syntax is:

from-spec   =  ( name-addr / addr-spec ) *( SEMI from-param )

name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT


So, if there is no <>, the params are hdr params and not URI params. So,
in:
  From: sip:user at domain;uritag=val

uritag is actually a FROM HDR param and not an URI param

Also:
   From: sip:user at domain;uritag=val;htag=value

is correct as the both are FROM hdr params

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2694523&group_id=232389



More information about the Devel mailing list