acc.h
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
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef _ACC_ACC_H_
00042 #define _ACC_ACC_H_
00043
00044 #define ACC_CORE_LEN 6
00045
00046
00047 #define ACC "ACC: "
00048 #define ACC_REQUEST ACC"request accounted: "
00049 #define ACC_REQUEST_LEN (sizeof(ACC_REQUEST)-1)
00050 #define ACC_MISSED ACC"call missed: "
00051 #define ACC_MISSED_LEN (sizeof(ACC_MISSED)-1)
00052 #define ACC_ANSWERED ACC"transaction answered: "
00053 #define ACC_ANSWERED_LEN (sizeof(ACC_ANSWERED)-1)
00054 #define ACC_ACKED ACC"request acknowledged: "
00055 #define ACC_ACKED_LEN (sizeof(ACC_ACKED)-1)
00056
00057
00058 #define A_METHOD "method"
00059 #define A_METHOD_LEN (sizeof(A_METHOD)-1)
00060 #define A_FROMTAG "from_tag"
00061 #define A_FROMTAG_LEN (sizeof(A_FROMTAG)-1)
00062 #define A_TOTAG "to_tag"
00063 #define A_TOTAG_LEN (sizeof(A_TOTAG)-1)
00064 #define A_CALLID "call_id"
00065 #define A_CALLID_LEN (sizeof(A_CALLID)-1)
00066 #define A_CODE "code"
00067 #define A_CODE_LEN (sizeof(A_CODE)-1)
00068 #define A_STATUS "reason"
00069 #define A_STATUS_LEN (sizeof(A_STATUS)-1)
00070
00071 #define A_SEPARATOR_CHR ';'
00072 #define A_EQ_CHR '='
00073
00074 #define MAX_SYSLOG_SIZE 65536
00075
00076 void acc_log_init(void);
00077 int acc_log_request( struct sip_msg *req);
00078
00079 #ifdef SQL_ACC
00080 int acc_db_init(const str* db_url);
00081 int acc_db_init_child(const str* db_url);
00082 void acc_db_close(void);
00083 int acc_db_request( struct sip_msg *req);
00084 #endif
00085
00086 #ifdef RAD_ACC
00087 int init_acc_rad(char *rad_cfg, int srv_type);
00088 int acc_rad_request( struct sip_msg *req );
00089 #endif
00090
00091 #ifdef DIAM_ACC
00092 int acc_diam_init(void);
00093 int acc_diam_request( struct sip_msg *req );
00094 #endif
00095
00096 #endif