Module sipdialog

Dialog related functions.

Introduced in: 7 Feb 2006 by Fredrik Thulin <ft@it.su.se>

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

Description

Dialog related functions. Half is for the management of the dialog ETS table (yxa_dialogs), and half is helper functions for applications making use of dialogs (through 'dialog' records).

Data Types

dialogid()

dialogid() = #dialogid{}

no description

Function Index

create_dialog_state_uac/2 Call this when a UAC receives a response which establishes a dialog, if you want a dialog record() with all the information about the dialog filled in.
create_dialog_state_uas/2 Call this when a local UAS prepares to answer a request and thereby establishes a dialog, if you want a dialog record() with all the information about the dialog filled in.
create_dialog_state_uas/3 Call this when a local UAS prepares to answer a request and thereby establishes a dialog, if you want a dialog record() with all the information about the dialog filled in.
delete_dialog_controller/3 Delete a dialog from the ETS table.
delete_using_pid/1 Delete any records of dialogs controlled by Pid.
dialog2str/1 Format a dialog for debug logging.
generate_new_request/4 Generate a new request based on Method, supplied Extra- Headers, body and dialog info found in Dialog.
get_dialog_controller/1 Find the dialog controller for a received request or response.
get_next_local_cseq/1 Get the next local CSeq number for a dialog.
handle_expired_dialogs/1 Look for expired dialogs and signal their dialog contr- ollers that they are expired.
register_dialog_controller/2 Register a dialog controller for a dialog record.
register_dialog_controller/3 Register a dialog controller for a dialog record.
register_dialog_controller/4 Register 'half a dialog'.
set_dialog_expires/2 Set a new expiration time on an existing dialog.
set_dialog_expires/4 Set a new expiration time on an existing dialog.
unregister_dialog_controller/1 Unregister a dialog.
update_dialog_recv_request/2 Update a dialog when a new request was received on the dialog.

Function Details

create_dialog_state_uac/2

create_dialog_state_uac(Request, Response) -> {ok, Dialog}

Call this when a UAC receives a response which establishes a dialog, if you want a dialog record() with all the information about the dialog filled in. NOTE : all the comments in the code below are quotes from RFC3261 #12.1.2 (UAC Behavior).

create_dialog_state_uas/2

create_dialog_state_uas(Request, Response) -> {ok, Dialog}

throws {error, Reason}

Call this when a local UAS prepares to answer a request and thereby establishes a dialog, if you want a dialog record() with all the information about the dialog filled in.

create_dialog_state_uas/3

create_dialog_state_uas(Request, ResponseToTag, ResponseContact) -> {ok, Dialog}

Call this when a local UAS prepares to answer a request and thereby establishes a dialog, if you want a dialog record() with all the information about the dialog filled in. NOTE : all the comments in the code below are quotes from RFC3261 #12.1.1 (UAS behavior).

delete_dialog_controller/3

delete_dialog_controller(CallId, LocalTag, RemoteTag) -> ok

Delete a dialog from the ETS table. See also unregister_dialog_controller/1 above.

delete_using_pid/1

delete_using_pid(Pid) -> {ok, Id} | nomatch

Delete any records of dialogs controlled by Pid.

dialog2str/1

dialog2str(Dialog) -> DialogString

Format a dialog for debug logging.

generate_new_request/4

generate_new_request(Method, ExtraHeaders, Body, Dialog) -> {ok, Request, NewDialog, DstList}

Generate a new request based on Method, supplied Extra- Headers, body and dialog info found in Dialog.

get_dialog_controller/1

get_dialog_controller(Request::In) -> {ok, DCPid} | nomatch | error

Find the dialog controller for a received request or response.

get_next_local_cseq/1

get_next_local_cseq(Dialog) -> {ok, NextCSeq, NewDialog}

Get the next local CSeq number for a dialog.

handle_expired_dialogs/1

handle_expired_dialogs(Interval) -> ok

Look for expired dialogs and signal their dialog contr- ollers that they are expired. If they don't exit until this function is called again (after Interval seconds), we kill them.

register_dialog_controller/2

register_dialog_controller(Dialog, Pid) -> ok

throws {error, Reason}

Register a dialog controller for a dialog record.

register_dialog_controller/3

register_dialog_controller(Dialog, Pid, Expire) -> ok

throws {error, Reason}

Register a dialog controller for a dialog record.

register_dialog_controller/4

register_dialog_controller(CallId, LocalTag, Pid, Expire) -> ok

throws {error, Reason}

Register 'half a dialog'. A half dialog is one where we do not yet know the remote tag, like when we send out a request that, if answered, will establish one or more dialogs.

set_dialog_expires/2

set_dialog_expires(Dialog, Expires) -> ok | nomatch

Set a new expiration time on an existing dialog.

set_dialog_expires/4

set_dialog_expires(CallId, LocalTag, RemoteTag, Expires) -> ok | nomatch

Set a new expiration time on an existing dialog.

unregister_dialog_controller/1

unregister_dialog_controller(Dialog) -> ok

Unregister a dialog. Really just a shortcut for delete_dialog_controller/3.

update_dialog_recv_request/2

update_dialog_recv_request(Request, Dialog) -> {ok, NewDialog} | {error, old_cseq}

Update a dialog when a new request was received on the dialog.


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