Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00041 #ifndef _ACC_ACC_H_
00042 #define _ACC_ACC_H_
00043
00044
00045 #define ACC "ACC: "
00046 #define ACC_REQUEST ACC"request accounted: "
00047 #define ACC_REQUEST_LEN (sizeof(ACC_REQUEST)-1)
00048 #define ACC_MISSED ACC"call missed: "
00049 #define ACC_MISSED_LEN (sizeof(ACC_MISSED)-1)
00050 #define ACC_ANSWERED ACC"transaction answered: "
00051 #define ACC_ANSWERED_LEN (sizeof(ACC_ANSWERED)-1)
00052 #define ACC_ACKED ACC"request acknowledged: "
00053 #define ACC_ACKED_LEN (sizeof(ACC_ACKED)-1)
00054
00055
00056 #define A_METHOD "method"
00057 #define A_METHOD_LEN (sizeof(A_METHOD)-1)
00058 #define A_FROMTAG "from_tag"
00059 #define A_FROMTAG_LEN (sizeof(A_FROMTAG)-1)
00060 #define A_TOTAG "to_tag"
00061 #define A_TOTAG_LEN (sizeof(A_TOTAG)-1)
00062 #define A_CALLID "call_id"
00063 #define A_CALLID_LEN (sizeof(A_CALLID)-1)
00064 #define A_CODE "code"
00065 #define A_CODE_LEN (sizeof(A_CODE)-1)
00066 #define A_STATUS "reason"
00067 #define A_STATUS_LEN (sizeof(A_STATUS)-1)
00068
00069 #define A_SEPARATOR_CHR ';'
00070 #define A_SEPARATOR_CHR_2 ' '
00071 #define A_EQ_CHR '='
00072
00073 #define MAX_SYSLOG_SIZE 65536
00074
00075 #define MAX_FAILED_FILTER_COUNT 15
00076
00077
00078
00079
00080
00081
00082
00083 #define FL_REQ_UPSTREAM (1<<29)
00084
00085 void acc_log_init(void);
00086 int acc_log_request( struct sip_msg *req);
00087
00088 int core2strar(struct sip_msg *req, str *c_vals, int *i_vals, char *t_vals);
00089
00090 #ifdef SQL_ACC
00091 int acc_db_init(const str* db_url);
00092 int acc_db_init_child(const str* db_url);
00093 void acc_db_close(void);
00094 int acc_db_request( struct sip_msg *req);
00095 #endif
00096
00097 #ifdef RAD_ACC
00098 int init_acc_rad(char *rad_cfg, int srv_type);
00099 int acc_rad_request( struct sip_msg *req );
00100 #endif
00101
00102 #ifdef DIAM_ACC
00103 int acc_diam_init(void);
00104 int acc_diam_request( struct sip_msg *req );
00105 #endif
00106
00107 #endif