acc_extra.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2004 Voice Sistem SRL
00005  * Copyright (C) 2008 Juha Heinanen
00006  *
00007  * This file is part of Kamailio, a free SIP server.
00008  *
00009  * Kamailio is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  *
00014  * Kamailio is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022  *
00023  *
00024  * History:
00025  * ---------
00026  *  2004-10-28  first version (ramona)
00027  *  2005-05-30  acc_extra patch commited (ramona)
00028  *  2005-07-13  acc_extra specification moved to use pseudo-variables (bogdan)
00029  *  2006-09-08  flexible multi leg accounting support added,
00030  *              code cleanup for low level functions (bogdan)
00031  *  2006-09-19  final stage of a masive re-structuring and cleanup (bogdan)
00032  *  2008-09-03  added support for integer type Radius attributes (jh)
00033  */
00034 
00043 #ifndef _ACC_EXTRA_H_
00044 #define _ACC_EXTRA_H_
00045 
00046 #include "../../str.h"
00047 #include "../../pvar.h"
00048 #include "../../parser/msg_parser.h"
00049 
00050 void init_acc_extra(void);
00051 
00052 struct acc_extra *parse_acc_extra(char *extra);
00053 
00054 struct acc_extra *parse_acc_leg(char *extra);
00055 
00056 void destroy_extras( struct acc_extra *extra);
00057 
00058 int extra2strar( struct acc_extra *extra, struct sip_msg *rq,
00059                  str *val_arr, int *int_arr, char *type_arr);
00060 
00061 int legs2strar( struct acc_extra *legs, struct sip_msg *rq, str *val_arr,
00062                 int *int_arr, char *type_arr, int start);
00063 
00064 int extra2int( struct acc_extra *extra, int *attrs );
00065 
00066 #ifdef RAD_ACC
00067 #include "../../lib/kcore/radius.h"
00068 int extra2attrs( struct acc_extra *extra, struct attr *attrs, int offset);
00069 #endif
00070 
00071 #endif
00072