The Via header only has parameters, no headers. Parameters of from ...;name=value;name2=value2
Specific parameters: ttl, maddr, received, branch.
From page 179 of RFC3261:
"Even though this specification mandates that the branch parameter be
present in all requests, the BNF for the header field indicates that
it is optional."
The branch parameter on a Via therefore appears to be optionally mandatory?!
Any SIP application element that uses transactions depends on the branch parameter for transaction matching.
Only the top Via header branch is used for transactions though so if the request has made it to this stack
with missing branches then in theory it should be safe to proceed. It will be left up to the SIPTransaction
class to reject any SIP requests that are missing the necessary branch.
Inheritance
System.Object
SIPViaHeader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: SIPSorcery.dll
public class SIPViaHeader
Constructors
|
Improve this Doc
View Source
Declaration
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(SIPEndPoint localEndPoint, string branch)
Parameters
Type |
Name |
Description |
SIPEndPoint |
localEndPoint |
|
System.String |
branch |
|
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(IPEndPoint contactEndPoint, string branch)
Parameters
Type |
Name |
Description |
System.Net.IPEndPoint |
contactEndPoint |
|
System.String |
branch |
|
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(IPEndPoint contactEndPoint, string branch, SIPProtocolsEnum protocol)
Parameters
Type |
Name |
Description |
System.Net.IPEndPoint |
contactEndPoint |
|
System.String |
branch |
|
SIPProtocolsEnum |
protocol |
|
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(string contactIPAddress, int contactPort, string branch)
Parameters
Type |
Name |
Description |
System.String |
contactIPAddress |
|
System.Int32 |
contactPort |
|
System.String |
branch |
|
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(string contactIPAddress, int contactPort, string branch, SIPProtocolsEnum protocol)
Parameters
Type |
Name |
Description |
System.String |
contactIPAddress |
|
System.Int32 |
contactPort |
|
System.String |
branch |
|
SIPProtocolsEnum |
protocol |
|
|
Improve this Doc
View Source
Declaration
public SIPViaHeader(string contactEndPoint, string branch)
Parameters
Type |
Name |
Description |
System.String |
contactEndPoint |
|
System.String |
branch |
|
Fields
|
Improve this Doc
View Source
Declaration
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public SIPProtocolsEnum Transport
Field Value
|
Improve this Doc
View Source
Declaration
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public SIPParameters ViaParameters
Field Value
Properties
|
Improve this Doc
View Source
Declaration
public string Branch { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public string ContactAddress { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public string ReceivedFromAddress { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public string ReceivedFromIPAddress { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public int ReceivedFromPort { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Special SIP Via header that is recognised by the SIP transport classes Send methods. At send time this header will be replaced by
one with IP end point details that reflect the socket the request or response was sent from.
Declaration
public static SIPViaHeader GetDefaultSIPViaHeader(SIPProtocolsEnum protocol = SIPProtocolsEnum.udp)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static SIPViaHeader[] ParseSIPViaHeader(string viaHeaderStr)
Parameters
Type |
Name |
Description |
System.String |
viaHeaderStr |
|
Returns
|
Improve this Doc
View Source
Declaration
Returns
Type |
Description |
System.String |
|
Extension Methods