Subscriptions

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Configuration)
(Configuration)
Line 55: Line 55:
  
 
* [[Telephony]]
 
* [[Telephony]]
* [[Modules#Resource_subscribe.2Fnotify_modules]]
+
* [[Modules#Resource_subscribe.2Fnotify_modules|Modules]]

Revision as of 13:23, 30 May 2013

This module permit to configure the database account name and queries used to retrieve and update users' roster.
You can use database stored procedures to make sure that the update is done for the existing rows that were already added.

Configuration

; This file configures the subscriptions module

[general]

; account: string: The name of the database account
;account=

; user_event_auth: string: Database query used to authenticate specific event
;  (other then presence) subscriptions e.g. SIP 'dialog' or 'message-summary'
;user_event_auth=SELECT * FROM subscriptions WHERE notifier='${notifier}' AND \
;subscriber='${subscriber}' AND event='${event}'

; user_roster_load_all: string: Database query used to load all users' roster when starting
; If not set user rosters will be loaded when needed
;user_roster_load_all=SELECT users.username, roster.* FROM users LEFT OUTER JOIN roster ON users.username=roster.username

; user_roster_load: string: Database query used to load an user's roster
; NOTE: The query must return an 'username' column and at least one data row
;  containing the username whose roster we want to load in that column to signal
;  user's existence
;user_roster_load=SELECT users.username, roster.* FROM users LEFT OUTER JOIN roster ON users.username=roster.username \
;WHERE users.username='${username}'

; user_roster_delete: string: Database query used to delete an user's roster
;user_roster_delete=DELETE FROM roster WHERE username='${username}'

; contact_load: string: Database query used to load a specific contact
;contact_load=SELECT * FROM roster WHERE username='${username}' AND contact='${contact}'

; contact_subscription_set: string: Database query used to set a contact's subscription
; The query should add a new entry in the user roster or update an existing one
;contact_subscription_set=SELECT * FROM subscription_set('${username}','${contact}','${subscription}')

; contact_set: string: Database query used to add a new contact or update an existing one
;  in user roster. Updated data should not include the subscription state
;contact_set=SELECT * FROM roster_set('${username}','${contact}','${name}','${groups}') AS \
;t(username text,contact text,name text,groups text)

; contact_set_full: string: Database query used to add a new contact or update an existing one
;  in user roster. The query should include the subscription state also
;contact_set_full=SELECT * FROM roster_set_full('${username}','${contact}','${name}','${groups}','${subscription}') \
;AS t(username text,contact text,name text,groups text,subscription text)

; contact_delete: string: Database query used to delete a specific contact
;contact_delete=DELETE FROM roster WHERE username='${username}' AND contact='${contact}'


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers