Module sipserver

Main OTP application startup function, and per-request start processing function.

Introduced in: 12 Dec 2002 by Magnus Ahltorp <ahltorp@nada.kth.se>

Authors: Magnus Ahltorp (ahltorp@nada.kth.se).

Description

Main OTP application startup function, and per-request start processing function.

Function Index

origin2str/1 Turn a siporigin record into a string.
process/2 Check if something we received from a socket (Packet) is a valid SIP request/response by calling parse_packet() on it.
restart/0 Log and then restart application.
safe_spawn/3 Run Module:Function(Arguments), in a separate process.
start/2 The big start-function for the YXA stack.
stop/0 Log and then shut down application.

Function Details

origin2str/1

origin2str(Origin) -> OriginStr

Turn a siporigin record into a string.

process/2

process(Packet, Origin) -> void()

returns: does not matter.

Check if something we received from a socket (Packet) is a valid SIP request/response by calling parse_packet() on it. Then, use my_apply to either send it on to the transaction layer, or invoke a modules request/3 or response/3 function on it - depending on the contents of Dst.

restart/0

restart() -> term()

returns: does not return

Log and then restart application. Will never really return.

safe_spawn/3

safe_spawn(Module, Function, Arguments) -> Pid

Run Module:Function(Arguments), in a separate process. Log errors, but otherwise just ignore them. Relies on Erlang process links elsewhere to 'fix' errors.

start/2

start(X1::normal, X2::[AppModule]) -> {ok, Pid}

The big start-function for the YXA stack. Invoke this function to make the sun go up, and tell it the name of your YXA application (AppModule) to have the stack invoke the correct init/0, request/3 and response/3 methods.

stop/0

stop() -> term()

returns: does not return

Log and then shut down application. Shuts down the whole Erlang virtual machine, so never really returns.


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