1 /* 2 * Copyright (C) 2014 Stefan Sayer 3 * 4 * This file is part of SEMS, a free SIP media server. 5 * 6 * SEMS is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * For a license to use the SEMS software under conditions 12 * other than those described here, or to purchase support for this 13 * software, please contact iptel.org by e-mail at the following addresses: 14 * info@iptel.org 15 * 16 * SEMS is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 */ 25 26 #ifndef _CC_REGISTRAR_H 27 #define _CC_REGISTRAR_H 28 29 #include "AmApi.h" 30 31 #include "SBCCallProfile.h" 32 33 /** 34 * sample call control module 35 */ 36 class CCRegistrar : public AmDynInvoke 37 { 38 static CCRegistrar* _instance; 39 40 void start(const string& cc_name, const string& ltag, SBCCallProfile* call_profile, 41 int start_ts_sec, int start_ts_usec, const AmArg& values, 42 int timer_id, AmArg& res, const AmSipRequest* ood_req); 43 void connect(const string& cc_name, const string& ltag, SBCCallProfile* call_profile, 44 const string& other_ltag, 45 int connect_ts_sec, int connect_ts_usec); 46 void end(const string& cc_name, const string& ltag, SBCCallProfile* call_profile, 47 int end_ts_sec, int end_ts_usec); 48 void route(const string& cc_name, SBCCallProfile* call_profile, 49 const AmSipRequest* ood_req, const AmArg& values, AmArg& res); 50 51 public: 52 CCRegistrar(); 53 ~CCRegistrar(); 54 static CCRegistrar* instance(); 55 void invoke(const string& method, const AmArg& args, AmArg& ret); 56 int onLoad(); 57 }; 58 59 #endif 60