Module dialog_package

Basic RFC4235 implementation.

Introduced in: 8 May 2006 by Fredrik Thulin <ft@it.su.se>

Behaviours: event_package.

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

Description

Basic RFC4235 implementation.

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/8 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/7 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 dialog package, this is always true.

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/8 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::SIPuser) -> void()

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

YXA event packages must export a request/7 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

When we receive a SUBSCRIBE, should the subscription handler also SUBSCRIBE to the other side in the same dialog? For the dialog package, this is always true.


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