SIP registrar module - Process REGISTER request and send reply.
More...
#include "../../str.h"
#include "../../socket_info.h"
#include "../../parser/parse_allow.h"
#include "../../parser/parse_methods.h"
#include "../../parser/msg_parser.h"
#include "../../parser/parse_to.h"
#include "../../parser/parse_uri.h"
#include "../../dprint.h"
#include "../../trim.h"
#include "../../ut.h"
#include "../../qvalue.h"
#include "../../dset.h"
#include "../../xavp.h"
#include "../../mod_fix.h"
#include "../../lib/srutils/sruid.h"
#include "../../lib/kcore/cmpapi.h"
#include "../../lib/kcore/statistics.h"
#include "../usrloc/usrloc.h"
#include "common.h"
#include "sip_msg.h"
#include "rerrno.h"
#include "reply.h"
#include "reg_mod.h"
#include "regtime.h"
#include "path.h"
#include "save.h"
#include "config.h"
Go to the source code of this file.
Defines
-
#define is_cflag_set(_name) (((unsigned int)_cflags)&(_name))
- Process REGISTER request and save it's contacts.
Functions
-
static int add_contacts (struct sip_msg *_m, udomain_t *_d, str *_a, int _mode)
- This function will process request that contained some contact header fields.
-
static int insert_contacts (struct sip_msg *_m, udomain_t *_d, str *_a)
- Message contained some contacts, but record with same address of record was not found so we have to create a new record and insert all contacts from the message that have expires > 0.
-
static int no_contacts (sip_msg_t *_m, udomain_t *_d, str *_a, str *_h)
- Process request that contained no contact header field, it means that we have to send back a response containing a list of all existing bindings for the given username (in To HF).
-
static ucontact_info_t * pack_ci (struct sip_msg *_m, contact_t *_c, unsigned int _e, unsigned int _f)
- Fills the common part (for all contacts) of the info structure.
-
int save (struct sip_msg *_m, udomain_t *_d, int _cflags, str *_uri)
- Process REGISTER request and save it's contacts.
-
static int star (sip_msg_t *_m, udomain_t *_d, str *_a, str *_h)
- Process request that contained a star, in that case, we will remove all bindings with the given username from the usrloc and return 200 OK response.
-
static int update_contacts (struct sip_msg *_m, urecord_t *_r, int _mode)
- Message contained some contacts and appropriate record was found, so we have to walk through all contacts and do the following: 1) If contact in usrloc doesn't exists and expires > 0, insert new contact 2) If contact in usrloc exists and expires > 0, update the contact 3) If contact in usrloc exists and expires == 0, delete contact.
Detailed Description
Definition in file modules_k/registrar/save.c.