C# Класс SipSharp.Client.UserAgent

A user agent represents an end system.

It contains a user agent client (UAC), which generates requests, and a user agent server (UAS), which responds to them. A UAC is capable of generating a request based on some external stimulus (the user clicking a button, or a signal on a PSTN line) and processing a response. A UAS is capable of receiving a request and generating a response based on user input, external stimulus, the result of a program execution, or some other mechanism.

When a UAC sends a request, the request passes through some number of proxy servers, which forward the request towards the UAS. When the UAS generates a response, the response is forwarded towards the UAC.

UAC and UAS procedures depend strongly on two factors. First, based on whether the request or response is inside or outside of a dialog, and second, based on the method of a request. Dialogs are discussed thoroughly in Section 12; they represent a peer-to-peer relationship between user agents and are established by specific SIP methods, such as INVITE.

Security procedures for requests and responses outside of a dialog are described in RFC3261 Section 26. Specifically, mechanisms exist for the UAS and UAC to mutually authenticate. A limited set of privacy features are also supported through encryption of bodies using S/MIME.

Наследование: IRequestHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
MakeCall ( Contact contact ) : void

Call someone

ProcessRequest ( RequestContext context ) : ProcessingResult
RegisterMethod ( string method, EventHandler handler ) : void
Send ( IRequest request ) : void

Приватные методы

Метод Описание
OnInviteResponse ( object sender, ResponseEventArgs e ) : void

Responses are first processed by the transport layer and then passed up to the transaction layer. The transaction layer performs its processing and then passes the response up to the TU. The majority of response processing in the TU is method specific. However, there are some general behaviors independent of the method.

OnTransactionTerminated ( object sender, EventArgs e ) : void
OnTransportFailed ( object sender, EventArgs e ) : void
Process3xx ( IResponse response ) : bool
Process4xx ( IClientTransaction transaction, IResponse response ) : bool

RFC3261 Section 8.1.3.5 Processing 4xx Responses

UserAgent ( ) : System
UserAgent ( ISipStack stack ) : System

Описание методов

MakeCall() публичный Метод

Call someone
public MakeCall ( Contact contact ) : void
contact Contact
Результат void

ProcessRequest() публичный Метод

public ProcessRequest ( RequestContext context ) : ProcessingResult
context RequestContext
Результат ProcessingResult

RegisterMethod() публичный Метод

public RegisterMethod ( string method, EventHandler handler ) : void
method string
handler EventHandler
Результат void

Send() публичный Метод

public Send ( IRequest request ) : void
request IRequest
Результат void