Skip to content
Snippets Groups Projects
Commit c5d48c27 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2926] Cleanup

parent 25369192
Branches
Tags
No related merge requests found
...@@ -1020,7 +1020,7 @@ int SIPVoIPLink::inv_session_reinvite (SIPCall *call, std::string direction) ...@@ -1020,7 +1020,7 @@ int SIPVoIPLink::inv_session_reinvite (SIPCall *call, std::string direction)
local_sdp = call->getLocalSDP()->get_local_sdp_session(); local_sdp = call->getLocalSDP()->get_local_sdp_session();
if (local_sdp == NULL) { if (local_sdp == NULL) {
_debug ("! SIP Failure: unable to find local_sdp"); _debug ("SIP: Error: unable to find local sdp");
return !PJ_SUCCESS; return !PJ_SUCCESS;
} }
...@@ -3142,7 +3142,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e) ...@@ -3142,7 +3142,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
// This callback is called after SDP offer/answer session has completed. // This callback is called after SDP offer/answer session has completed.
void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) void call_on_media_update (pjsip_inv_session *inv, pj_status_t status)
{ {
_debug ("UserAgent: call_on_media_update"); _debug ("UserAgent: Call on media update");
const pjmedia_sdp_session *local_sdp; const pjmedia_sdp_session *local_sdp;
const pjmedia_sdp_session *remote_sdp; const pjmedia_sdp_session *remote_sdp;
...@@ -3153,19 +3153,19 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) ...@@ -3153,19 +3153,19 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status)
call = reinterpret_cast<SIPCall *> (inv->mod_data[getModId() ]); call = reinterpret_cast<SIPCall *> (inv->mod_data[getModId() ]);
if (!call) { if (!call) {
_debug ("Call declined by peer, SDP negociation stopped"); _debug ("UserAgent: Call declined by peer, SDP negociation stopped");
return; return;
} }
link = dynamic_cast<SIPVoIPLink *> (Manager::instance().getAccountLink (AccountNULL)); link = dynamic_cast<SIPVoIPLink *> (Manager::instance().getAccountLink (AccountNULL));
if (link == NULL) { if (link == NULL) {
_debug ("Failed to get sip link"); _warn ("UserAgent: Error: Failed to get sip link");
return; return;
} }
if (status != PJ_SUCCESS) { if (status != PJ_SUCCESS) {
_debug ("Error while negotiating the offer"); _warn ("UserAgent: Error: while negotiating the offer");
link->hangup (call->getCallId()); link->hangup (call->getCallId());
Manager::instance().callFailure (call->getCallId()); Manager::instance().callFailure (call->getCallId());
return; return;
...@@ -3198,11 +3198,11 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) ...@@ -3198,11 +3198,11 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status)
} }
// Get the crypto attribute containing srtp's cryptographic context (keys, cipher) // Get the crypto attribute containing srtp's cryptographic context (keys, cipher)
CryptoOffer crypto_offer; CryptoOffer crypto_offer;
call->getLocalSDP()->get_remote_sdp_crypto_from_offer(remote_sdp, crypto_offer); call->getLocalSDP()->get_remote_sdp_crypto_from_offer(remote_sdp, crypto_offer);
bool nego_success = false; bool nego_success = false;
if(!crypto_offer.empty()) { if(!crypto_offer.empty()) {
...@@ -3256,6 +3256,7 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) ...@@ -3256,6 +3256,7 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status)
_debug("Sdes not initialized for this call\n"); _debug("Sdes not initialized for this call\n");
} }
try { try {
call->setAudioStart (true); call->setAudioStart (true);
call->getAudioRtp()->start(); call->getAudioRtp()->start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment