usage.h

Go to the documentation of this file.
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_USAGE_H_
00032 #define _OSP_MOD_USAGE_H_
00033 
00034 #include <osp/osp.h>
00035 #include "../../parser/msg_parser.h"
00036 
00037 /* This module reports originating and terminating call set up and duration usage
00038  * for OSP transactions.
00039  *
00040  * Call set-up usage is reported based on the osp_dest structures stored as AVPs.
00041  * It includes OSP transaction id, response codes, start time, alert time,
00042  * connect time, etc.
00043  *
00044  * Duration usage is reported based on the OSP cooky recorded into the route set
00045  * (using add_rr_param) after requesting routing/authorization on the originating
00046  * side, and validating authorization on the terminating side.  It include 
00047  * OSP transaction id, duration, stop time, etc.
00048  * 
00049  * Actual conversation duration maybe calculated using connect time (from the call
00050  * set up usage) and stop time (from the duration usage). 
00051  */
00052 void ospRecordOrigTransaction(struct sip_msg* msg, unsigned long long transid, char* uac, char* from, char* to, time_t authtime, unsigned destinationCount);
00053 void ospRecordTermTransaction(struct sip_msg* msg, unsigned long long transid, char* uac, char* from, char* to, time_t authtime);
00054 void ospReportOrigSetupUsage(void);
00055 void ospReportTermSetupUsage(void);
00056 int  ospReportUsage(struct sip_msg* msg, char* whorelease, char* ignore2);
00057 
00058 #endif /* _OSP_MOD_USAGE_H_ */
00059 

Generated on Thu May 24 22:00:35 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6