diff --git a/sflphone-common/src/audio/audiortp.cpp b/sflphone-common/src/audio/audiortp.cpp index 10f481487dab6c6f2f837b26e9162a51ee9680c2..2f0005241bb689bd35cbf1f9ef0a7fcc065ed91c 100644 --- a/sflphone-common/src/audio/audiortp.cpp +++ b/sflphone-common/src/audio/audiortp.cpp @@ -110,7 +110,6 @@ AudioRtp::closeRtpSession () // This will make RTP threads finish. _debug ("AudioRtp::Stopping rtp session\n"); - try { delete _RTXThread; _RTXThread = 0; @@ -119,9 +118,6 @@ AudioRtp::closeRtpSession () throw; } - // AudioLayer* audiolayer = Manager::instance().getAudioDriver(); - // audiolayer->stopStream(); - _debug ("AudioRtp::Audio rtp stopped\n"); return true; diff --git a/sflphone-common/src/audio/pulselayer.cpp b/sflphone-common/src/audio/pulselayer.cpp index ed8b4317774b5b4c1c512ac2ca66434b2278c6ac..39d3ba887d32ab28d818043428f879ea55078013 100644 --- a/sflphone-common/src/audio/pulselayer.cpp +++ b/sflphone-common/src/audio/pulselayer.cpp @@ -21,8 +21,6 @@ int framesPerBuffer = 2048; -int PulseLayer::streamState; - static void audioCallback (pa_stream* s, size_t bytes, void* userdata) { assert (s && bytes); @@ -39,7 +37,6 @@ PulseLayer::PulseLayer (ManagerImpl* manager) , playback() , record() { - PulseLayer::streamState = 0; _debug ("PulseLayer::Pulse audio constructor: Create context\n"); } diff --git a/sflphone-common/src/audio/pulselayer.h b/sflphone-common/src/audio/pulselayer.h index 698cc9bf6b68b6ff7009b35efcccba3c664d2729..8c1fa083842f9990b73f141730cf849146655280 100644 --- a/sflphone-common/src/audio/pulselayer.h +++ b/sflphone-common/src/audio/pulselayer.h @@ -197,7 +197,6 @@ class PulseLayer : public AudioLayer { // private: public: - static int streamState; friend class AudioLayerTest; }; diff --git a/sflphone-common/src/sipvoiplink.cpp b/sflphone-common/src/sipvoiplink.cpp index aa1e2f9a410b4a267212a636d4249d40bb7d0a79..af41b6d268c760870fcca500204e488df9331432 100644 --- a/sflphone-common/src/sipvoiplink.cpp +++ b/sflphone-common/src/sipvoiplink.cpp @@ -601,8 +601,6 @@ SIPVoIPLink::answer (const CallID& id) call->setConnectionState (Call::Connected); call->setState (Call::Active); - ; - return true; } else { // Create and send a 488/Not acceptable here @@ -617,6 +615,7 @@ SIPVoIPLink::answer (const CallID& id) _debug ("SIPVoIPLink::answer: fail terminate call %s \n",call->getCallId().c_str()); terminateOneCall (call->getCallId()); removeCall (call->getCallId()); + _audiortp->closeRtpSession (); return false; } } @@ -1195,39 +1194,25 @@ SIPVoIPLink::SIPCheckUrl (const std::string& url UNUSED) void SIPVoIPLink::SIPCallServerFailure (SIPCall *call) { - //if (!event->response) { return; } - //switch(event->response->status_code) { - //case SIP_SERVICE_UNAVAILABLE: // 500 - //case SIP_BUSY_EVRYWHERE: // 600 - //case SIP_DECLINE: // 603 - //SIPCall* call = findSIPCallWithCid(event->cid); if (call != 0) { _debug ("Server error!\n"); CallID id = call->getCallId(); Manager::instance().callFailure (id); terminateOneCall (id); removeCall (id); + _audiortp->closeRtpSession(); } - - //break; - //} } void SIPVoIPLink::SIPCallClosed (SIPCall *call) { - - - // it was without did before - //SIPCall* call = findSIPCallWithCid(event->cid); if (!call) { return; } CallID id = call->getCallId(); - //call->setDid(event->did); - if (Manager::instance().isCurrentCall (id)) { call->setAudioStart (false); _debug ("* SIP Info: Stopping AudioRTP when closing\n"); @@ -1245,9 +1230,6 @@ SIPVoIPLink::SIPCallClosed (SIPCall *call) void SIPVoIPLink::SIPCallReleased (SIPCall *call) { - // do cleanup if exists - // only cid because did is always 0 in these case.. - //SIPCall* call = findSIPCallWithCid(event->cid); if (!call) { return; } @@ -2050,7 +2032,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e) break; default: - _debug ("sipvoiplink.cpp - line 1635 : Unhandled call state. This is probably a bug.\n"); + _debug ("sipvoiplink.cpp - line %d : Unhandled call state. This is probably a bug.\n", __LINE__); break; } }