#include <string.h>
#include "../../ut.h"
#include "../../dset.h"
#include "../../str.h"
#include "../../config.h"
#include "../../action.h"
#include "../../parser/parse_rr.h"
#include "../usrloc/usrloc.h"
#include "common.h"
#include "regtime.h"
#include "reg_mod.h"
#include "lookup.h"

Go to the source code of this file.
Defines | |
| #define | allowed_method(_msg, _c) ( !method_filtering || ((_msg)->REQ_METHOD)&((_c)->methods) ) |
Functions | |
| int | lookup (struct sip_msg *_m, char *_t, char *_s) |
| Lookup contact in the database and rewrite Request-URI. | |
| int | registered (struct sip_msg *_m, char *_t, char *_s) |
| the is_registered() function 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 in file lookup.c.
| #define allowed_method | ( | _msg, | |||
| _c | ) | ( !method_filtering || ((_msg)->REQ_METHOD)&((_c)->methods) ) |
| int lookup | ( | struct sip_msg * | _m, | |
| char * | _t, | |||
| char * | _s | |||
| ) |
Lookup contact in the database and rewrite Request-URI.
Lookup a contact in usrloc and rewrite R-URI if found.
Definition at line 59 of file lookup.c.
References act_time, allowed_method, append_branch(), append_branches, ucontact::c, ucontact::cflags, urecord::contacts, extract_aor(), sip_msg::first_line, sip_msg::force_send_socket, get_act_time(), get_path_dst_uri(), usrloc_api::get_urecord, _str::len, LM_DBG, LM_ERR, usrloc_api::lock_udomain, sip_msg::new_uri, ucontact::next, ucontact::path, ucontact::q, ucontact::received, usrloc_api::release_urecord, msg_start::request, rewrite_uri(), _str::s, set_dst_uri(), set_path_vector(), set_ruri_q(), setbflag(), ucontact::sock, msg_start::u, ul, usrloc_api::unlock_udomain, VALID_CONTACT, and ZSW.
| int registered | ( | struct sip_msg * | _m, | |
| char * | _t, | |||
| char * | _s | |||
| ) |
the is_registered() function 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
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 176 of file lookup.c.
References act_time, ucontact::callid, urecord::contacts, extract_aor(), sip_msg::first_line, usrloc_api::get_urecord, is_avp_str_val, _str::len, LM_DBG, LM_ERR, usrloc_api::lock_udomain, int_str::n, sip_msg::new_uri, ucontact::next, reg_callid_avp_name, reg_callid_avp_type, usrloc_api::release_urecord, msg_start::request, int_str::s, _str::s, search_first_avp(), msg_start::u, ul, usrloc_api::unlock_udomain, VALID_CONTACT, and ZSW.
1.5.6