mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
642 B
37 lines
642 B
#ifndef _MYJUKEBOX_H_
|
|
#define _MYJUKEBOX_H_
|
|
|
|
#include "AmSession.h"
|
|
#include "AmPlaylist.h"
|
|
|
|
#include <string>
|
|
using std::string;
|
|
|
|
class MyJukeboxFactory: public AmSessionFactory
|
|
{
|
|
public:
|
|
static string JukeboxDir;
|
|
|
|
MyJukeboxFactory(const string& _app_name);
|
|
|
|
int onLoad();
|
|
AmSession* onInvite(const AmSipRequest& req);
|
|
};
|
|
|
|
class MyJukeboxDialog : public AmSession
|
|
{
|
|
AmPlaylist playlist;
|
|
|
|
public:
|
|
MyJukeboxDialog();
|
|
~MyJukeboxDialog();
|
|
|
|
void onSessionStart(const AmSipRequest& req);
|
|
void onDtmf(int event, int duration);
|
|
void process(AmEvent* ev);
|
|
void onBye(const AmSipRequest& req);
|
|
};
|
|
|
|
#endif
|
|
|