diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index fb7fd32d282133ff318afbafe042797429fc1077..16d22b136ad57236ccf1089911bc9c96265f0d2b 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -741,7 +741,7 @@ ManagerImpl::incomingCall(Call* call, const AccountID& accountId) /* Broadcast a signal over DBus */ if (_dbus) _dbus->getCallManager()->incomingCall(accountId, call->getCallId(), from); - if (_dbus) _dbus->getCallManager()->callStateChanged(call->getCallId(), "INCOMING"); + //if (_dbus) _dbus->getCallManager()->callStateChanged(call->getCallId(), "INCOMING"); // Reduce volume of the other pulseaudio-connected audio applications if( _audiodriver->getLayerType() == PULSEAUDIO && getConfigInt( PREFERENCES , CONFIG_PA_VOLUME_CTRL ) ) { @@ -782,7 +782,7 @@ ManagerImpl::peerRingingCall(const CallID& id) if (isCurrentCall(id)) { ringback(); } - // if (_dbus) _dbus->getCallManager()->callStateChanged(id, "RINGING"); + if (_dbus) _dbus->getCallManager()->callStateChanged(id, "RINGING"); } //THREAD=VoIP Call=Outgoing/Ingoing diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index 4053df3cc63f12e1942380599078762cb8bfa958..33ce2d4ec21ce4c7881da9d563afa65277b43532 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -1619,8 +1619,6 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam SIPVoIPLink *link; pjsip_rx_data *rdata; - _debug (" ***************************** NEW CALL STATE %i **************************\n", inv->state); - /* Retrieve the call information */ call = reinterpret_cast<SIPCall*> (inv->mod_data[_mod_ua.id]); if(!call) @@ -1688,8 +1686,8 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam } else { - // The call is ringing - if (inv->state == PJSIP_INV_STATE_EARLY){ + // The call is ringing - We need to handle this case only on outgoing call + if (inv->state == PJSIP_INV_STATE_EARLY && e->body.tsx_state.tsx->role == PJSIP_ROLE_UAC){ _debug ("*************************** PJSIP_INV_STATE_EARLY - PEER RINGING ***********************************\n"); call->setConnectionState(Call::Ringing); Manager::instance().peerRingingCall(call->getCallId());