00001 /* 00002 * openser osp module. 00003 * 00004 * This module enables openser to communicate with an Open Settlement 00005 * Protocol (OSP) server. The Open Settlement Protocol is an ETSI 00006 * defined standard for Inter-Domain VoIP pricing, authorization 00007 * and usage exchange. The technical specifications for OSP 00008 * (ETSI TS 101 321 V4.1.1) are available at www.etsi.org. 00009 * 00010 * Uli Abend was the original contributor to this module. 00011 * 00012 * Copyright (C) 2001-2005 Fhg Fokus 00013 * 00014 * This file is part of Kamailio, a free SIP server. 00015 * 00016 * Kamailio is free software; you can redistribute it and/or modify 00017 * it under the terms of the GNU General Public License as published by 00018 * the Free Software Foundation; either version 2 of the License, or 00019 * (at your option) any later version 00020 * 00021 * Kamailio is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with this program; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 */ 00030 00031 #ifndef _OSP_MOD_DESTINATION_H_ 00032 #define _OSP_MOD_DESTINATION_H_ 00033 00034 #include <time.h> 00035 #include "osp_mod.h" 00036 00037 typedef struct _osp_dest { 00038 char validafter[OSP_STRBUF_SIZE]; 00039 char validuntil[OSP_STRBUF_SIZE]; 00040 char callid[OSP_STRBUF_SIZE]; 00041 char called[OSP_STRBUF_SIZE]; 00042 char calling[OSP_STRBUF_SIZE]; 00043 char source[OSP_STRBUF_SIZE]; 00044 char srcdev[OSP_STRBUF_SIZE]; 00045 char host[OSP_STRBUF_SIZE]; 00046 char destdev[OSP_STRBUF_SIZE]; 00047 char networkid[OSP_STRBUF_SIZE]; 00048 unsigned char token[OSP_TOKENBUF_SIZE]; 00049 unsigned int callidsize; 00050 unsigned int tokensize; 00051 unsigned int timelimit; 00052 int lastcode; 00053 time_t authtime; 00054 time_t time100; 00055 time_t time180; 00056 time_t time200; 00057 int type; 00058 unsigned long long transid; 00059 int supported; 00060 int used; 00061 int reported; 00062 unsigned int destinationCount; 00063 char origcalled[OSP_STRBUF_SIZE]; 00064 } osp_dest; 00065 00066 osp_dest* ospInitDestination(osp_dest* dest); 00067 int ospSaveOrigDestination(osp_dest* dest); 00068 int ospSaveTermDestination(osp_dest* dest); 00069 int ospCheckOrigDestination(void); 00070 osp_dest* ospGetNextOrigDestination(void); 00071 osp_dest* ospGetLastOrigDestination(void); 00072 osp_dest* ospGetTermDestination(void); 00073 void ospRecordEvent(int clientcode, int servercode); 00074 void ospDumpDestination(osp_dest* dest); 00075 void ospDumpAllDestination(void); 00076 void ospConvertAddress(char* src, char* dst, int buffersize); 00077 00078 #endif /* _OSP_MOD_DESTINATION_H_ */ 00079
1.5.6