Published on iptel.org (http://www.iptel.org)

presence_b2b

By greger
Created 2006-12-09 20:31

Standard

This module acts as back to back user agent for presence events. In the future it will do subscriptions to reg events and presence with resource lists too.

It is accessible only using internal Querry Status API (QSA). Everywhere (in C code) you need subscriptions to presentity status, you only create an internal subscription to it and the rest is done by this module. It processes internal subscription and creates a SIP subscription (SUBSCRIBE-NOTIFY dialogi [1]) to requested presentity. Every NOTIFY request produces new QSA message with status information into destination message queue.


vaclav.kubart@iptel.org [2]>


This module acts as back to back user agent for presence events. In the future it will do subscriptions to reg events and presence with resource lists too.

It is accessible only using internal Querry Status API (QSA). Everywhere (in C code) you need subscriptions to presentity status, you only create an internal subscription to it and the rest is done by this module. It processes internal subscription and creates a SIP subscription (SUBSCRIBE-NOTIFY dialogi [3]) to requested presentity. Every NOTIFY request produces new QSA message with status information into destination message queue.

Instead of this module can be used PA module with parameter accept_internal_subscriptions set to 1. In that case the subscription will be only to internal status hold by PA.

For every requested (record, subscriber) is created new SIP subscription! This is due to authorization of such subscriptions - B2B UA can't decide about authorization rules, thus it has to leave it on the presence server to which it creates the subscription and this means, that it has to create the subscription as the subscriber. There is a possibility to do subscriptions with the same To + From only once, but this is left for future optimalizations (it will probably not help a lot).

i [4] where to send all presence SUBSCRIBEs. It is better to use this than presence_route.

Empty by default.

max_subscribe_delay

If set to value greater than zero SUBSCRIBE requests are sent randomly at most after max_subscribe_delay seconds. SUBSCRIBE requests are sent immediately when processing internal (QSA) subscription when set to 0.

Default value is 0.

i [5]/lib/seri [6]/modules/tm.so" loadmodule "/home/kubartv/SER/lib/ser/modules/dialog.so" loadmodule "/home/kubartv/SER/lib/ser/modules/presence_b2b.so" ... modparam("presence_b2b", "presence_route", "<sip:my-sip-server.domain.com;lr>") modparam("presence_b2b", "on_error_retry_time", 600) modparam("presence_b2b", "wait_for_term_notify", 33) modparam("presence_b2b", "resubscribe_delta", 15) modparam("presence_b2b", "min_resubscribe_time", 55) modparam("presence_b2b", "default_expiration", 667) ... route { ... if (uri==myself) { ... if (method=="NOTIFY") { if (!t_newtran()) { log(1, "newtran error\n"); sl_reply_error(); }; if (!handle_notify()) { t_reply("481", "Unable to handle notification"); } break; }; ... } ... }