1 /*
2  * Copyright (C) 2002-2003 Fhg Fokus
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 _ECHO_H_
27 #define _ECHO_H_
28 
29 #include "AmSession.h"
30 #include "AmAudioEcho.h"
31 
32 #include <string>
33 using std::string;
34 
35 /** \brief Factory for echo sessions */
36 class EchoFactory: public AmSessionFactory
37 {
38   AmSessionEventHandlerFactory* session_timer_f;
39   AmConfigReader conf;
40 
41 public:
42   EchoFactory(const string& _app_name);
43   virtual int onLoad();
44   virtual AmSession* onInvite(const AmSipRequest& req, const string& app_name,
45 			      const map<string,string>& app_params);
46 };
47 
48 /** \brief echo session logic implementation */
49 class EchoDialog : public AmSession
50 {
51   AmAudioEcho echo;
52   PlayoutType playout_type;
53 public:
54   EchoDialog();
55   ~EchoDialog();
56 
57   void onSessionStart(/*const AmSipRequest& req);
58 			void onSessionStart(const AmSipReply& rep*/);
59   void onBye(const AmSipRequest& req);
60   void onDtmf(int event, int duration);
61 };
62 
63 
64 #define MODULE_NAME "echo"
65 
66 #endif
67 // Local Variables:
68 // mode:C++
69 // End:
70 
71