Module transportlayer

Transport layer functions.

Introduced in: 01 Mar 2004 by Fredrik Thulin <ft@it.su.se>

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

Description

Transport layer functions.

Function Index

is_eligible_dst/1 Check if the transport layer thinks a destination is eligible.
remove_blacklisting/1 Interface function to sipsocket_blacklist.
report_unreachable/3 Interface function to sipsocket_blacklist.
report_unreachable/4 Interface function to sipsocket_blacklist.
send_proxy_request/4 Prepare for proxying a request.
send_proxy_response/2 Extract the top Via from Response, and send this response to that location (destination).
send_response/2 Prepare to send a response out on a socket.
send_result/5 Create a response (with minimal headers) to a request and send it.
send_result/6 Create a response (with minimal headers) to a request and send it.
start_link/0Equivalent to sipsocket:start_link().
stateless_proxy_ack/3 Proxy a request statelessly.
stateless_proxy_request/2 Proxy a request statelessly.

Function Details

is_eligible_dst/1

is_eligible_dst(Dst) -> true | {false, Reason}

Check if the transport layer thinks a destination is eligible. Currently we only check if it is blacklisted, but we could for example check if the protocol is supported, if we change the resolving functions to support more types of destinations than the transport layer.

remove_blacklisting/1

remove_blacklisting(Dst) -> ok

Interface function to sipsocket_blacklist.

report_unreachable/3

report_unreachable(Sipdst::Dst, SipSocket, Msg) -> ok

Interface function to sipsocket_blacklist.

report_unreachable/4

report_unreachable(Sipdst::Dst, SipSocket, Msg, RetryAfter) -> ok

Interface function to sipsocket_blacklist.

send_proxy_request/4

send_proxy_request(Socket, Request, Dst, ViaParameters) -> {error, Reason} | {ok, SipSocket, UsedBranch}

Prepare for proxying a request. The preparation process is basically to get us a list() of sipdst records and then calling send_to_available_dst(). Note : To use this function, you should already have called check_proxy_request (directly or indirectly).

send_proxy_response/2

send_proxy_response(Socket, Response) -> {error, invalid_Via} | SendResult

Extract the top Via from Response, and send this response to that location (destination).

send_response/2

send_response(Socket, Response) -> Res | {senderror, Reason}

Prepare to send a response out on a socket.

send_result/5

send_result(RequestHeader, Socket, Body, Status, Reason) -> Res | {senderror, Reason}

Create a response (with minimal headers) to a request and send it.

send_result/6

send_result(RequestHeader, Socket, Body, Status, Reason, ExtraHeaders) -> Res | {senderror, Reason}

Create a response (with minimal headers) to a request and send it. Include one or more extra headers specified by the caller.

start_link/0

start_link() -> term()

Equivalent to sipsocket:start_link().

stateless_proxy_ack/3

stateless_proxy_ack(LogTag, Request, YxaCtx) -> Res

Proxy a request statelessly. We do that sometimes, for example ACK 'requests' of to 2xx response to INVITE.

stateless_proxy_request/2

stateless_proxy_request(LogTag, Request) -> Res

Proxy a request statelessly. We do that sometimes, for example ACK 'requests' of to 2xx response to INVITE.


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