Module clienttransaction

Client transaction.

Introduced in: 06 Feb 2004 by Fredrik Thulin <ft@it.su.se>

Behaviours: gen_server.

Authors: Fredrik Thulin (ft@it.su.se).

Description

Client transaction.

When you start a client transaction, it will try to send the request to the destination you have specified, and send responses to the Pid you tell it to (Parent argument to start()). Parent should expect to receive the following signals :

{clienttransaction_terminating, Pid, Branch} {branch_result, Pid, Branch, SipState, Response}

Pid = pid(), this client transactions pid Branch = string(), the SIP branch used by this client transaction SipState = atom(), current SIP state Response = response record() | {Status, Reason} for generated responses Status = integer(), SIP status code Reason = string(), SIP reason phrase

Note : You can't assume that you will get a branch_result signal with a final Response and SipState = 'terminated'.

You can tell the client transaction to terminate gracefully by using gen_server:cast() to send it a

{cancel, Msg, ExtraHeaders} - Msg is only for logging, ExtraHeaders is a list of {Key, ValueList} tuples to add to the CANCEL request generated.

Data Types

sipstate()

sipstate() = trying | calling | proceeding | completed | terminated

Client transaction SIP states.

state()

state() = #state{}

no description

Function Index

start_link/5 Starts a client transaction process, linked to the process that executed this function.

Function Details

start_link/5

start_link(Request, Dst, Branch, Timeout, ReportTo) -> term()

Starts a client transaction process, linked to the process that executed this function.


Generated by EDoc, Oct 17 2007, 16:48:19.