Functions

modules_k/registrar/lookup.c File Reference

SIP registrar module - lookup contacts in usrloc. More...

#include <string.h>
#include "../../ut.h"
#include "../../dset.h"
#include "../../str.h"
#include "../../xavp.h"
#include "../../config.h"
#include "../../action.h"
#include "../../mod_fix.h"
#include "../../parser/parse_rr.h"
#include "../usrloc/usrloc.h"
#include "common.h"
#include "regtime.h"
#include "reg_mod.h"
#include "lookup.h"
#include "config.h"
Include dependency graph for modules_k/registrar/lookup.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file modules_k/registrar/lookup.c.


Function Documentation

int lookup ( struct sip_msg _m,
udomain_t _d,
str _uri 
)

Lookup a contact in usrloc and rewrite R-URI if found.

Returns:
: -1 : not found -2 : found but method not allowed -3 : error

Definition at line 90 of file modules_k/registrar/lookup.c.

References ucontact::aor, ucontact::c, ucontact::cflags, urecord::contacts, extract_aor(), sip_msg::first_line, get_act_time(), get_path_dst_uri(), getbflagsval(), ucontact::instance, km_append_branch, _str::len, sip_msg::new_uri, ucontact::next, ucontact::path, ucontact::q, ucontact::received, reg_cmp_instances(), reset_dst_uri(), ucontact::ruid, _str::s, set_dst_uri(), set_force_socket, set_ruri_q(), setbflagsval(), ucontact::sock, ul, sip_uri::user, and VALID_CONTACT.

Referenced by w_lookup().

Here is the call graph for this function:

Here is the caller graph for this function:

int registered ( struct sip_msg _m,
udomain_t _d,
str _uri 
)

Return true if the AOR in the Request-URI is registered, it is similar to lookup but registered neither rewrites the Request-URI nor appends branches.

Definition at line 317 of file modules_k/registrar/lookup.c.

References ucontact::callid, urecord::contacts, extract_aor(), sip_msg::first_line, _str::len, sip_msg::new_uri, ucontact::next, _str::s, ul, and VALID_CONTACT.

Here is the call graph for this function: