Module presence_package

A very basic RFC3856 (SIP Presence) implementation.

Introduced in: 27 Apr 2006 by Fredrik Thulin <ft@it.su.se>

Behaviours: event_package.

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

Description

A very basic RFC3856 (SIP Presence) implementation.

PUBLISH is described in RFC3903 (SIP Event State Publication).

Data Types

event_pkg()

event_pkg() = string()

Event package string - "dialog" for this package.

Function Index

is_allowed_subscribe/7 YXA event packages must export an is_allowed_subscribe/6 function.
notify_content/4 YXA event packages must export a notify_content/3 function.
package_parameters/2 The minimum amount of time that should pass between NOTIFYs we send about this event packages events.
request/4 YXA event packages must export a request/6 function.
subscription_behaviour/3 When we receive a SUBSCRIBE, should the subscription handler also SUBSCRIBE to the other side in the same dialog? For the presence package, this depends on if the SUBSCRIBE has an Allow-Events header listing "presence".

Function Details

is_allowed_subscribe/7

is_allowed_subscribe(PkgS::event_pkg(), Num, Request, YxaCtx, SIPuser, Presentity, PkgState) -> {error, need_auth} | {ok, SubState, Status, Reason, ExtraHeaders, NewPkgState} | {siperror, Status, Reason, ExtraHeaders}

YXA event packages must export an is_allowed_subscribe/6 function. This function is called when the event server receives a subscription request for this event package, and is the event packages chance to decide wether the subscription should be accepted or not. It is also called for every time the subscription is refreshed by the subscriber.

notify_content/4

notify_content(PkgS::event_pkg(), Presentity, LastAccept, PkgState) -> {ok, Body, ExtraHeaders, NewPkgState} | {error, Reason}

YXA event packages must export a notify_content/3 function. Whenever the subscription requires us to generate a NOTIFY request, this function is called to generate the body and extra headers to include in the NOTIFY request.

package_parameters/2

package_parameters(PkgS::event_pkg(), Param::notification_rate_limit) -> MilliSeconds

The minimum amount of time that should pass between NOTIFYs we send about this event packages events.

request/4

request(PkgS::event_pkg(), Request, YxaCtx, Event_ctx::Ctx) -> void()

returns: but return 'ok' or {error, Reason} for now

YXA event packages must export a request/6 function. See the eventserver.erl module description for more information about when this function is invoked.

subscription_behaviour/3

subscription_behaviour(PkgS::event_pkg(), Param::bidirectional_subscribe, Request) -> true | false

When we receive a SUBSCRIBE, should the subscription handler also SUBSCRIBE to the other side in the same dialog? For the presence package, this depends on if the SUBSCRIBE has an Allow-Events header listing "presence".


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