From 552c36d7058f495a4e3b42d4f7f0512150d5f28c Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Mon, 8 Dec 2008 17:57:29 +0000 Subject: [PATCH] reinvite support git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1179 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/examples/serviceline/ServiceLine.cpp | 8 +++++++- apps/examples/serviceline/ServiceLine.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/examples/serviceline/ServiceLine.cpp b/apps/examples/serviceline/ServiceLine.cpp index efa2a449..a8c9b9e8 100644 --- a/apps/examples/serviceline/ServiceLine.cpp +++ b/apps/examples/serviceline/ServiceLine.cpp @@ -119,6 +119,7 @@ AmSession* ServiceLineFactory::onInvite(const AmSipRequest& req) ServiceLineCallerDialog::ServiceLineCallerDialog(const string& filename) : filename(filename), playlist(this), + started(false), AmB2ABCallerSession() { } @@ -126,7 +127,12 @@ ServiceLineCallerDialog::ServiceLineCallerDialog(const string& filename) void ServiceLineCallerDialog::onSessionStart(const AmSipRequest& req) { - AmB2ABCallerSession::onSessionStart(req); + if (started) { + // reinvite + AmB2ABCallerSession::onSessionStart(req); + return; + } + started = true; if(wav_file.open(filename,AmAudioFile::Read)) throw string("AnnouncementDialog::onSessionStart: Cannot open file\n"); diff --git a/apps/examples/serviceline/ServiceLine.h b/apps/examples/serviceline/ServiceLine.h index 39dad2aa..1b596804 100644 --- a/apps/examples/serviceline/ServiceLine.h +++ b/apps/examples/serviceline/ServiceLine.h @@ -69,6 +69,8 @@ class ServiceLineCallerDialog: public AmB2ABCallerSession string callee_addr; string callee_uri; + + bool started; public: ServiceLineCallerDialog(const string& filename);