diff --git a/src/call.cpp b/src/call.cpp index 08d64d88351f032fab655f4c91589a7fd8efcdaa..1de89c3dda72a67104236c147d640976f09273b4 100644 --- a/src/call.cpp +++ b/src/call.cpp @@ -173,6 +173,12 @@ Call::setRecording() recAudio.setRecording(); } +void +Call::stopRecording() +{ + recAudio.stopRecording(); +} + bool Call::isRecording() { diff --git a/src/call.h b/src/call.h index b549e360f292675f90a3a6a53158172a657baad6..b30bf0f63e4d7879fa160846333a8a294a9cdf9f 100644 --- a/src/call.h +++ b/src/call.h @@ -224,6 +224,11 @@ class Call{ * SetRecording */ void setRecording(); + + /** + * stopRecording, make sure the recording is stopped (whe transfering call) + */ + void stopRecording(); /** * Return Recording state diff --git a/src/plug-in/audiorecorder/audiorecord.cpp b/src/plug-in/audiorecorder/audiorecord.cpp index b547d06933a5aab43ed1db249b46f6b9b033a617..c1300286fe641149c665fecb736bcca5642808fa 100644 --- a/src/plug-in/audiorecorder/audiorecord.cpp +++ b/src/plug-in/audiorecorder/audiorecord.cpp @@ -152,6 +152,13 @@ bool AudioRecord::setRecording() { } +void AudioRecord::stopRecording() { + _debug("AudioRecording::stopRecording() \n"); + + if(recordingEnabled_) + recordingEnabled_ = false; +} + bool AudioRecord::setRawFile() { diff --git a/src/plug-in/audiorecorder/audiorecord.h b/src/plug-in/audiorecorder/audiorecord.h index 69ed651225517f0539377dc18a2f6c9bc0f66a13..96bdf05e66abf7c021fb34433eb95fe7be2c7431 100644 --- a/src/plug-in/audiorecorder/audiorecord.h +++ b/src/plug-in/audiorecorder/audiorecord.h @@ -90,6 +90,11 @@ public: */ bool setRecording(); + /** + * Stop recording flag + */ + void stopRecording(); + /** * Record a chunk of data in an openend file * @param buffer The data chunk to be recorded diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index bfb5810bef1f95ccda3d761357daa8c0531bf74e..beb5ae16a56dcf6cffdd2cb7f03521c022cb3a0d 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -642,6 +642,7 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to) call = getSIPCall(id); + call->stopRecording(); account_id = Manager::instance().getAccountFromCall(id); account = dynamic_cast<SIPAccount *>(Manager::instance().getAccount(account_id));