Class SIPRouteSet
Class for managing a SIP Route set
Inherited Members
Namespace: SipLib.Core
Assembly: SipLib.dll
Syntax
public class SIPRouteSet
Properties
| Edit this page View SourceBottomRoute
Gets the bottom route
Declaration
public SIPRoute? BottomRoute { get; }
Property Value
Type | Description |
---|---|
SIPRoute |
Length
Gets or sets the number of routes in the set
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int |
TopRoute
Gets the top route
Declaration
public SIPRoute? TopRoute { get; }
Property Value
Type | Description |
---|---|
SIPRoute |
Methods
| Edit this page View SourceAddBottomRoute(SIPRoute)
Adds a route to the end of the route set
Declaration
public void AddBottomRoute(SIPRoute route)
Parameters
Type | Name | Description |
---|---|---|
SIPRoute | route |
GetAt(int)
Gets the SIPRoute at a specified index
Declaration
public SIPRoute GetAt(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the route set |
Returns
Type | Description |
---|---|
SIPRoute |
ParseSIPRouteSet(string)
Parses a SIPRouteSet from a string
Declaration
public static SIPRouteSet ParseSIPRouteSet(string routeSet)
Parameters
Type | Name | Description |
---|---|---|
string | routeSet | Input string. Route sets are separated by commas |
Returns
Type | Description |
---|---|
SIPRouteSet |
PopRoute()
Removes the top route and returns it
Declaration
public SIPRoute? PopRoute()
Returns
Type | Description |
---|---|
SIPRoute | Returns the top route or null if the route set is empty |
PushRoute(SIPRoute)
Adds a route to a the top of the route set
Declaration
public void PushRoute(SIPRoute route)
Parameters
Type | Name | Description |
---|---|---|
SIPRoute | route |
PushRoute(IPEndPoint, SIPSchemesEnum, SIPProtocolsEnum)
Pushes a new route onto the set given the IPEndpoint, scheme and protocol
Declaration
public void PushRoute(IPEndPoint socket, SIPSchemesEnum scheme, SIPProtocolsEnum protcol)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | socket | |
SIPSchemesEnum | scheme | |
SIPProtocolsEnum | protcol |
PushRoute(string)
Pushes a route give the host of the route
Declaration
public void PushRoute(string host)
Parameters
Type | Name | Description |
---|---|---|
string | host |
RemoveBottomRoute()
Removes the bottom most route
Declaration
public void RemoveBottomRoute()
ReplaceRoute(string, string)
If a route set is travelling from the public side of a proxy to the private side it can be required that the Record-Route set is modified.
Declaration
public void ReplaceRoute(string origSocket, string replacementSocket)
Parameters
Type | Name | Description |
---|---|---|
string | origSocket | The socket string in the original route set that needs to be replace. |
string | replacementSocket | The socket string the original route is being replaced with. |
Reversed()
Reverses the order of the route set
Declaration
public SIPRouteSet? Reversed()
Returns
Type | Description |
---|---|
SIPRouteSet | Returns a new SIPRouteSet |
SetAt(int, SIPRoute)
Sets the route at a specific index position
Declaration
public void SetAt(int index, SIPRoute sipRoute)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index |
SIPRoute | sipRoute | New route set |
ToString()
Converts the route set header to a string
Declaration
public string ToString()
Returns
Type | Description |
---|---|
string |