Show / Hide Table of Contents

Class 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.

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)
Namespace: SIPSorcery.SIP
Assembly: SIPSorcery.dll
Syntax
public class SIPViaHeader

Constructors

| Improve this Doc View Source

SIPViaHeader()

Declaration
public SIPViaHeader()
| Improve this Doc View Source

SIPViaHeader(SIPEndPoint, String)

Declaration
public SIPViaHeader(SIPEndPoint localEndPoint, string branch)
Parameters
Type Name Description
SIPEndPoint localEndPoint
System.String branch
| Improve this Doc View Source

SIPViaHeader(IPEndPoint, String)

Declaration
public SIPViaHeader(IPEndPoint contactEndPoint, string branch)
Parameters
Type Name Description
System.Net.IPEndPoint contactEndPoint
System.String branch
| Improve this Doc View Source

SIPViaHeader(IPEndPoint, String, SIPProtocolsEnum)

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

SIPViaHeader(String, Int32, String)

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

SIPViaHeader(String, Int32, String, SIPProtocolsEnum)

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

SIPViaHeader(String, String)

Declaration
public SIPViaHeader(string contactEndPoint, string branch)
Parameters
Type Name Description
System.String contactEndPoint
System.String branch

Fields

| Improve this Doc View Source

Host

Declaration
public string Host
Field Value
Type Description
System.String
| Improve this Doc View Source

Port

Declaration
public int Port
Field Value
Type Description
System.Int32
| Improve this Doc View Source

Transport

Declaration
public SIPProtocolsEnum Transport
Field Value
Type Description
SIPProtocolsEnum
| Improve this Doc View Source

Version

Declaration
public string Version
Field Value
Type Description
System.String
| Improve this Doc View Source

ViaParameters

Declaration
public SIPParameters ViaParameters
Field Value
Type Description
SIPParameters

Properties

| Improve this Doc View Source

Branch

Declaration
public string Branch { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ContactAddress

Declaration
public string ContactAddress { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ReceivedFromAddress

Declaration
public string ReceivedFromAddress { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ReceivedFromIPAddress

Declaration
public string ReceivedFromIPAddress { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ReceivedFromPort

Declaration
public int ReceivedFromPort { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

GetDefaultSIPViaHeader(SIPProtocolsEnum)

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
Type Name Description
SIPProtocolsEnum protocol
Returns
Type Description
SIPViaHeader
| Improve this Doc View Source

ParseSIPViaHeader(String)

Declaration
public static SIPViaHeader[] ParseSIPViaHeader(string viaHeaderStr)
Parameters
Type Name Description
System.String viaHeaderStr
Returns
Type Description
SIPViaHeader[]
| Improve this Doc View Source

ToString()

Declaration
public string ToString()
Returns
Type Description
System.String

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX