presence/subscribe.c File Reference

Kamailio presence module :: Support for SUBSCRIBE handling. More...

#include "../../ut.h"
#include "../../usr_avp.h"
#include "../../data_lump_rpl.h"
#include "../../parser/parse_expires.h"
#include "../../parser/parse_event.h"
#include "../../parser/contact/parse_contact.h"
#include "presence.h"
#include "subscribe.h"
#include "utils_func.h"
#include "notify.h"
#include "../pua/hash.h"

Include dependency graph for presence/subscribe.c:

Go to the source code of this file.

Functions

int delete_db_subs (str pres_uri, str ev_stored_name, str to_tag)
int extract_sdialog_info (subs_t *subs, struct sip_msg *msg, int mexp, int *to_tag_gen, str scontact)
int get_database_info (struct sip_msg *msg, subs_t *subs, int *error_ret, str *reply_str)
int get_db_subs_auth (subs_t *subs, int *found)
int get_stored_info (struct sip_msg *msg, subs_t *subs, int *error_ret, str *reply_str)
int handle_expired_subs (subs_t *s)
int handle_subscribe (struct sip_msg *msg, char *str1, char *str2)
int insert_db_subs_auth (subs_t *subs)
void msg_watchers_clean (unsigned int ticks, void *param)
int refresh_watcher (str *pres_uri, str *watcher_uri, str *event, int status, str *reason)
int restore_db_subs (void)
int send_2XX_reply (struct sip_msg *msg, int reply_code, int lexpire, str *local_contact)
void timer_db_update (unsigned int ticks, void *param)
void update_db_subs (db_con_t *db, db_func_t dbf, shtable_t hash_table, int htable_size, int no_lock, handle_expired_func_t handle_expired_func)
int update_subs_db (subs_t *subs, int type)
int update_subscription (struct sip_msg *msg, subs_t *subs, int to_tag_gen, int *sent_reply)

Variables

static str pu_400_rpl = str_init("Bad request")
static str pu_481_rpl = str_init("Subscription does not exist")
static str pu_489_rpl = str_init("Bad Event")
static str pu_500_rpl = str_init("Server Internal Error")
static str su_200_rpl = str_init("OK")


Detailed Description

Kamailio presence module :: Support for SUBSCRIBE handling.

Definition in file presence/subscribe.c.


Function Documentation

int delete_db_subs ( str  pres_uri,
str  ev_stored_name,
str  to_tag 
)

int extract_sdialog_info ( subs_t subs,
struct sip_msg msg,
int  mexp,
int *  to_tag_gen,
str  scontact 
)

int get_database_info ( struct sip_msg msg,
subs_t subs,
int *  error_ret,
str reply_str 
)

int get_db_subs_auth ( subs_t subs,
int *  found 
)

int get_stored_info ( struct sip_msg msg,
subs_t subs,
int *  error_ret,
str reply_str 
)

int handle_expired_subs ( subs_t s  ) 

int handle_subscribe ( struct sip_msg msg,
char *  str1,
char *  str2 
)

int insert_db_subs_auth ( subs_t subs  ) 

void msg_watchers_clean ( unsigned int  ticks,
void *  param 
)

int refresh_watcher ( str pres_uri,
str watcher_uri,
str event,
int  status,
str reason 
)

int restore_db_subs ( void   ) 

Definition at line 1618 of file presence/subscribe.c.

References active_watchers_table, subscription::callid, callid_col, subscription::contact, contact_col, contains_event(), core_hash(), db_func::delete, ERR_MEM, to_body::error, subscription::event, subscription::event_id, evlist::events, EvList, subscription::expires, expires_col, free_event_params(), db_func::free_result, subscription::from_domain, subscription::from_tag, subscription::from_user, insert_shtable(), db_val_t::int_val, _str::len, LM_DBG, LM_ERR, LM_INFO, subscription::local_contact, subscription::local_cseq, db_res::n, pres_ev::name, NULL, pa_db, pa_dbf, event::params, PKG_MEM_TYPE, subscription::pres_uri, db_func::query, subscription::reason, reason_col, subscription::record_route, subscription::remote_cseq, ROW_VALUES, db_res::rows, _str::s, s, shm_copy_event(), shm_malloc(), SHM_MEM_STR, shtable_size, subscription::sockinfo_str, subscription::status, str_callid_col, str_contact_col, str_event_col, str_event_id_col, str_expires_col, str_from_tag_col, str_local_contact_col, str_local_cseq_col, str_presentity_uri_col, str_reason_col, str_record_route_col, str_remote_cseq_col, str_socket_info_col, str_status_col, str_to_domain_col, str_to_tag_col, str_to_user_col, str_version_col, str_watcher_domain_col, str_watcher_username_col, db_val_t::string_val, subs_htable, subscription::to_domain, subscription::to_tag, subscription::to_user, db_func::use_table, db_val_t::val, and subscription::version.

Referenced by mod_init().

int send_2XX_reply ( struct sip_msg msg,
int  reply_code,
int  lexpire,
str local_contact 
)

void timer_db_update ( unsigned int  ticks,
void *  param 
)

void update_db_subs ( db_con_t db,
db_func_t  dbf,
shtable_t  hash_table,
int  htable_size,
int  no_lock,
handle_expired_func_t  handle_expired_func 
)

int update_subs_db ( subs_t subs,
int  type 
)

int update_subscription ( struct sip_msg msg,
subs_t subs,
int  to_tag_gen,
int *  sent_reply 
)


Variable Documentation

str pu_400_rpl = str_init("Bad request") [static]

Definition at line 56 of file presence/subscribe.c.

str pu_481_rpl = str_init("Subscription does not exist") [static]

Definition at line 55 of file presence/subscribe.c.

str pu_489_rpl = str_init("Bad Event") [static]

Definition at line 58 of file presence/subscribe.c.

str pu_500_rpl = str_init("Server Internal Error") [static]

Definition at line 57 of file presence/subscribe.c.

str su_200_rpl = str_init("OK") [static]

Definition at line 54 of file presence/subscribe.c.


Generated on Thu May 24 08:01:19 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6