C# Class SIPSorcery.SIP.SIPViaHeader

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.
Mostra file Open project: sipsorcery/sipsorcery Class Usage Examples

Public Properties

Property Type Description
Host string
Port int
Transport SIPProtocolsEnum
Version string
ViaParameters SIPParameters

Public Methods

Method Description
ParseSIPViaHeader ( string viaHeaderStr ) : SIPSorcery.SIP.SIPViaHeader[]
SIPViaHeader ( ) : NUnit.Framework
SIPViaHeader ( IPEndPoint contactEndPoint, string branch ) : NUnit.Framework
SIPViaHeader ( IPEndPoint contactEndPoint, string branch, SIPProtocolsEnum protocol ) : NUnit.Framework
SIPViaHeader ( SIPEndPoint localEndPoint, string branch ) : NUnit.Framework
SIPViaHeader ( string contactIPAddress, int contactPort, string branch ) : NUnit.Framework
SIPViaHeader ( string contactIPAddress, int contactPort, string branch, SIPProtocolsEnum protocol ) : NUnit.Framework
SIPViaHeader ( string contactEndPoint, string branch ) : NUnit.Framework
ToString ( ) : string

Method Details

ParseSIPViaHeader() public static method

public static ParseSIPViaHeader ( string viaHeaderStr ) : SIPSorcery.SIP.SIPViaHeader[]
viaHeaderStr string
return SIPSorcery.SIP.SIPViaHeader[]

SIPViaHeader() public method

public SIPViaHeader ( ) : NUnit.Framework
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( IPEndPoint contactEndPoint, string branch ) : NUnit.Framework
contactEndPoint System.Net.IPEndPoint
branch string
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( IPEndPoint contactEndPoint, string branch, SIPProtocolsEnum protocol ) : NUnit.Framework
contactEndPoint System.Net.IPEndPoint
branch string
protocol SIPProtocolsEnum
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( SIPEndPoint localEndPoint, string branch ) : NUnit.Framework
localEndPoint SIPEndPoint
branch string
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( string contactIPAddress, int contactPort, string branch ) : NUnit.Framework
contactIPAddress string
contactPort int
branch string
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( string contactIPAddress, int contactPort, string branch, SIPProtocolsEnum protocol ) : NUnit.Framework
contactIPAddress string
contactPort int
branch string
protocol SIPProtocolsEnum
return NUnit.Framework

SIPViaHeader() public method

public SIPViaHeader ( string contactEndPoint, string branch ) : NUnit.Framework
contactEndPoint string
branch string
return NUnit.Framework

ToString() public method

public ToString ( ) : string
return string

Property Details

Host public_oe property

public string Host
return string

Port public_oe property

public int Port
return int

Transport public_oe property

public SIPProtocolsEnum Transport
return SIPProtocolsEnum

Version public_oe property

public string Version
return string

ViaParameters public_oe property

public SIPParameters,SIPSorcery.SIP ViaParameters
return SIPParameters