SIP registrar module - SIP message related functions.
More...
#include "../../parser/hf.h"
#include "../../dprint.h"
#include "../../parser/parse_expires.h"
#include "../../ut.h"
#include "../../qvalue.h"
#include "reg_mod.h"
#include "regtime.h"
#include "rerrno.h"
#include "sip_msg.h"
#include "config.h"
#include <stdlib.h>
Go to the source code of this file.
Functions
- void calc_contact_expires (struct sip_msg *_m, param_t *_ep, int *_e)
- Calculate absolute expires value per contact as follows: 1) If the contact has expires value, use the value.
- int calc_contact_q (param_t *_q, qvalue_t *_r)
- Calculate contact q value as follows: 1) If q parameter exists, use it 2) If the parameter doesn't exist, use the default value.
-
int check_contacts (struct sip_msg *_m, int *_s)
- Check if the originating REGISTER message was formed correctly The whole message must be parsed before calling the function _s indicates whether the contact was star.
-
static int get_expire_val (void)
- Return an expire value in the range [ default_expires - range%, default_expires + range% ].
-
static int get_expires_hf (struct sip_msg *_m)
- Return value of Expires header field if the HF exists converted to absolute time, if the HF doesn't exist, returns default value;.
-
contact_t * get_first_contact (struct sip_msg *_m)
- Get the first contact in message.
-
contact_t * get_next_contact (contact_t *_c)
- Get next contact in message.
-
int parse_message (struct sip_msg *_m)
- Parse the whole message and bodies of all header fields that will be needed by registrar.
Detailed Description
Definition in file k/registrar/sip_msg.c.
Function Documentation
| void calc_contact_expires |
( |
struct sip_msg * |
_m, |
|
|
param_t * |
_ep, |
|
|
int * |
_e | |
|
) |
| | |
If it is not zero, add actual time to it 2) If the contact has no expires parameter, use expires header field in the same way 3) If the message contained no expires header field, use the default value
Definition at line 248 of file k/registrar/sip_msg.c.
Referenced by insert_contacts(), and update_contacts().
| int calc_contact_q |
( |
param_t * |
_q, |
|
|
qvalue_t * |
_r | |
|
) |
| | |
Calculate contact q value as follows: 1) If q parameter exist, use it 2) If the parameter doesn't exist, use default value.
Definition at line 275 of file k/registrar/sip_msg.c.
Referenced by pack_ci().