#include <stdio.h>
#include <string.h>
#include "../../dprint.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_content.h"
#include "../tm/tm_load.h"
#include "../rr/api.h"
#include "acc.h"
#include "acc_mod.h"
#include "acc_logic.h"

Go to the source code of this file.
Defines | |
| #define | is_acc_flag_set(_rq, _flag) (((_rq)->flags)&(_flag)) |
| #define | is_acc_on(_rq) |
| #define | is_db_acc_on(_rq) (0) |
| #define | is_db_mc_on(_rq) (0) |
| #define | is_diam_acc_on(_rq) (0) |
| #define | is_diam_mc_on(_rq) (0) |
| #define | is_failed_acc_on(_rq) is_acc_flag_set(_rq,failed_transaction_flag) |
| #define | is_log_acc_on(_rq) is_acc_flag_set(_rq,log_flag) |
| #define | is_log_mc_on(_rq) is_acc_flag_set(_rq,log_missed_flag) |
| #define | is_mc_on(_rq) |
| #define | is_rad_acc_on(_rq) (0) |
| #define | is_rad_mc_on(_rq) (0) |
| #define | reset_acc_flag(_rq, _flag) (_rq)->flags &= ~(_flag) |
| #define | skip_cancel(_rq) (((_rq)->REQ_METHOD==METHOD_CANCEL) && report_cancels==0) |
Functions | |
| static void | acc_onack (struct cell *t, struct sip_msg *req, struct sip_msg *ack, int code) |
| static void | acc_onreply (struct cell *t, struct sip_msg *req, struct sip_msg *reply, int code) |
| static void | acc_onreply_in (struct cell *t, struct sip_msg *req, struct sip_msg *reply, int code) |
| void | acc_onreq (struct cell *t, int type, struct tmcb_params *ps) |
| static int | acc_preparse_req (struct sip_msg *req) |
| static void | env_set_code_status (int code, struct sip_msg *reply) |
| static void | env_set_comment (struct acc_param *accp) |
| static void | env_set_text (char *p, int len) |
| static void | env_set_to (struct hdr_field *to) |
| static struct hdr_field * | get_rpl_to (struct cell *t, struct sip_msg *reply) |
| static void | on_missed (struct cell *t, struct sip_msg *req, struct sip_msg *reply, int code) |
| static int | should_acc_reply (struct sip_msg *req, struct sip_msg *rpl, int code) |
| static void | tmcb_func (struct cell *t, int type, struct tmcb_params *ps) |
| int | w_acc_log_request (struct sip_msg *rq, char *comment, char *foo) |
Variables | |
| struct acc_enviroment | acc_env |
| struct rr_binds | rrb |
| struct tm_binds | tmb |
Definition in file acc_logic.c.
| #define is_acc_flag_set | ( | _rq, | |||
| _flag | ) | (((_rq)->flags)&(_flag)) |
Definition at line 56 of file acc_logic.c.
| #define is_acc_on | ( | _rq | ) |
Value:
( (is_log_acc_on(_rq)) || (is_db_acc_on(_rq)) \ || (is_rad_acc_on(_rq)) || (is_diam_acc_on(_rq)) )
Definition at line 89 of file acc_logic.c.
Referenced by acc_onreq(), and should_acc_reply().
| #define is_db_acc_on | ( | _rq | ) | (0) |
| #define is_db_mc_on | ( | _rq | ) | (0) |
| #define is_diam_acc_on | ( | _rq | ) | (0) |
| #define is_diam_mc_on | ( | _rq | ) | (0) |
| #define is_failed_acc_on | ( | _rq | ) | is_acc_flag_set(_rq,failed_transaction_flag) |
| #define is_log_acc_on | ( | _rq | ) | is_acc_flag_set(_rq,log_flag) |
| #define is_log_mc_on | ( | _rq | ) | is_acc_flag_set(_rq,log_missed_flag) |
| #define is_mc_on | ( | _rq | ) |
Value:
( (is_log_mc_on(_rq)) || (is_db_mc_on(_rq)) \ || (is_rad_mc_on(_rq)) || (is_diam_mc_on(_rq)) )
Definition at line 93 of file acc_logic.c.
Referenced by acc_onreply(), acc_onreply_in(), and acc_onreq().
| #define is_rad_acc_on | ( | _rq | ) | (0) |
| #define is_rad_mc_on | ( | _rq | ) | (0) |
| #define reset_acc_flag | ( | _rq, | |||
| _flag | ) | (_rq)->flags &= ~(_flag) |
| #define skip_cancel | ( | _rq | ) | (((_rq)->REQ_METHOD==METHOD_CANCEL) && report_cancels==0) |
| static void acc_onack | ( | struct cell * | t, | |
| struct sip_msg * | req, | |||
| struct sip_msg * | ack, | |||
| int | code | |||
| ) | [inline, static] |
Definition at line 404 of file acc_logic.c.
References ACC_ACKED, ACC_ACKED_LEN, acc_log_request(), acc_preparse_req(), env_set_code_status(), env_set_text(), env_set_to(), is_db_acc_on, is_diam_acc_on, is_log_acc_on, is_rad_acc_on, ua_server::status, sip_msg::to, and cell::uas.
Referenced by tmcb_func().
| static void acc_onreply | ( | struct cell * | t, | |
| struct sip_msg * | req, | |||
| struct sip_msg * | reply, | |||
| int | code | |||
| ) | [inline, static] |
Definition at line 349 of file acc_logic.c.
References ACC_ANSWERED, ACC_ANSWERED_LEN, acc_log_request(), env_set_code_status(), env_set_text(), env_set_to(), get_rpl_to(), is_db_acc_on, is_diam_acc_on, is_invite, is_log_acc_on, is_mc_on, is_rad_acc_on, _str::len, sip_msg::new_uri, on_missed(), sip_msg::parsed_uri_ok, cell::relayed_reply_branch, _str::s, should_acc_reply(), cell::uac, and ua_client::uri.
Referenced by tmcb_func().
| static void acc_onreply_in | ( | struct cell * | t, | |
| struct sip_msg * | req, | |||
| struct sip_msg * | reply, | |||
| int | code | |||
| ) | [inline, static] |
Definition at line 277 of file acc_logic.c.
References FAKED_REPLY, HDR_TO_F, is_invite, is_mc_on, parse_headers(), and should_acc_reply().
Referenced by tmcb_func().
| void acc_onreq | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | ps | |||
| ) |
Definition at line 221 of file acc_logic.c.
References acc_preparse_req(), detect_direction, FL_REQ_UPSTREAM, is_acc_on, rr_binds::is_direction, is_invite, is_mc_on, LM_DBG, LM_ERR, METHOD_INVITE, sip_msg::msg_flags, tm_binds::register_tmcb, report_ack, tmcb_params::req, RR_FLOW_UPSTREAM, rrb, skip_cancel, tmb, TMCB_E2EACK_IN, tmcb_func(), TMCB_ON_FAILURE, TMCB_RESPONSE_IN, and TMCB_RESPONSE_OUT.
Referenced by mod_init().
| static int acc_preparse_req | ( | struct sip_msg * | req | ) | [inline, static] |
Definition at line 156 of file acc_logic.c.
References HDR_CALLID_F, HDR_CSEQ_F, HDR_FROM_F, HDR_TO_F, LM_ERR, parse_from_header(), and parse_headers().
Referenced by acc_onack(), acc_onreq(), and w_acc_log_request().
| static void env_set_code_status | ( | int | code, | |
| struct sip_msg * | reply | |||
| ) | [inline, static] |
Definition at line 129 of file acc_logic.c.
References acc_env, acc_enviroment::code, acc_enviroment::code_s, error_text(), FAKED_REPLY, sip_msg::first_line, int2bstr(), INT2STR_MAX_LEN, _str::len, NULL, acc_enviroment::reason, msg_start::reply, _str::s, and msg_start::u.
Referenced by acc_onack(), acc_onreply(), and on_missed().
| static void env_set_comment | ( | struct acc_param * | accp | ) | [inline, static] |
Definition at line 148 of file acc_logic.c.
References acc_env, acc_param::code, acc_enviroment::code, acc_param::code_s, acc_enviroment::code_s, acc_param::reason, and acc_enviroment::reason.
Referenced by w_acc_log_request().
| static void env_set_text | ( | char * | p, | |
| int | len | |||
| ) | [inline, static] |
Definition at line 122 of file acc_logic.c.
References acc_env, _str::len, _str::s, and acc_enviroment::text.
Referenced by acc_onack(), acc_onreply(), on_missed(), and w_acc_log_request().
| static void env_set_to | ( | struct hdr_field * | to | ) | [inline, static] |
Definition at line 116 of file acc_logic.c.
References acc_env, and acc_enviroment::to.
Referenced by acc_onack(), acc_onreply(), on_missed(), and w_acc_log_request().
Definition at line 106 of file acc_logic.c.
References FAKED_REPLY, ua_server::request, sip_msg::to, and cell::uas.
Referenced by acc_onreply(), and on_missed().
| static void on_missed | ( | struct cell * | t, | |
| struct sip_msg * | req, | |||
| struct sip_msg * | reply, | |||
| int | code | |||
| ) | [inline, static] |
Definition at line 291 of file acc_logic.c.
References acc_log_request(), ACC_MISSED, ACC_MISSED_LEN, env_set_code_status(), env_set_text(), env_set_to(), get_rpl_to(), is_db_mc_on, is_diam_mc_on, is_log_mc_on, is_rad_mc_on, log_missed_flag, sip_msg::new_uri, cell::nr_of_outgoings, sip_msg::parsed_uri_ok, reset_acc_flag, cell::uac, and ua_client::uri.
Referenced by acc_onreply(), and tmcb_func().
| static int should_acc_reply | ( | struct sip_msg * | req, | |
| struct sip_msg * | rpl, | |||
| int | code | |||
| ) | [inline, static] |
Definition at line 257 of file acc_logic.c.
References sip_msg::content_length, early_media, get_content_length, HDR_CONTENTLENGTH_F, is_acc_on, is_failed_acc_on, and parse_headers().
Referenced by acc_onreply(), and acc_onreply_in().
| static void tmcb_func | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | ps | |||
| ) | [static] |
Definition at line 440 of file acc_logic.c.
References acc_onack(), acc_onreply(), acc_onreply_in(), tmcb_params::code, on_missed(), tmcb_params::req, ua_server::request, tmcb_params::rpl, TMCB_E2EACK_IN, TMCB_ON_FAILURE, TMCB_RESPONSE_IN, TMCB_RESPONSE_OUT, and cell::uas.
Referenced by acc_onreq().
| int w_acc_log_request | ( | struct sip_msg * | rq, | |
| char * | comment, | |||
| char * | foo | |||
| ) |
Definition at line 168 of file acc_logic.c.
References acc_log_request(), acc_preparse_req(), ACC_REQUEST, ACC_REQUEST_LEN, env_set_comment(), env_set_text(), env_set_to(), and sip_msg::to.
| struct acc_enviroment acc_env |
Definition at line 53 of file acc_logic.c.
Referenced by acc_log_request(), core2strar(), env_set_code_status(), env_set_comment(), env_set_text(), and env_set_to().
TM bind
Definition at line 87 of file acc_mod.c.
Referenced by acc_onreq(), ds_check_timer(), get_reply_totag(), global_init(), imc_handle_help(), imc_handle_invite(), imc_handle_unknown(), imc_inv_callback(), imc_send_message(), init(), m_dump(), m_send_ontimer(), m_store(), mod_init(), purple_send_sip_msg(), pv_get_uac_req(), pv_set_uac_req(), rls_send_notify(), send_notify_request(), send_publish(), send_reply(), send_sip_msg_request(), send_sip_options_request(), send_subscribe(), trace_onreq_in(), uac_req_init(), uac_req_send(), update_pua(), xj_send_sip_msg(), and xmpp_send_sip_msg().
1.5.6