diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.h b/sflphone-common/src/audio/audiortp/AudioRtpFactory.h index 5165cbffc199b0544e9f47304aa245787c795fd2..401087fbfb64e149b6be65ae641fa2873bb42219 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.h +++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.h @@ -89,6 +89,15 @@ namespace sfl { * file. initAudioRtpSession must have been called prior to that. */ inline void * getAudioRtpSession(void) { return _rtpSession; } + + /** + * @param None + * @return The internal audio rtp session type + * Symmetric = 0 + * Zrtp = 1 + * Sdes = 2 + */ + inline RtpMethod getAudioRtpType(void) { return _rtpSessionType; } /** * Get the current AudioZrtpSession. Throws an AudioRtpFactoryException diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index b11eb627c32e8686deb96be9d2859cf9b1657fa1..30a67bca8e38b964968747e415be5c5932a802e7 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -809,11 +809,13 @@ SIPVoIPLink::answer (const CallID& id) local_sdp = call->getLocalSDP(); + /* try { call->getAudioRtp()->initAudioRtpSession (call); } catch (...) { _debug ("Failed to create rtp thread from answer"); } + */ inv_session = call->getInvSession(); @@ -3628,6 +3630,12 @@ mod_on_rx_request (pjsip_rx_data *rdata) // We retrieve the remote sdp offer in the rdata struct to begin the negociation call->getLocalSDP()->set_ip_address (addrSdp); + try { + call->getAudioRtp()->initAudioRtpSession (call); + } catch (...) { + _debug ("Failed to create rtp thread from answer"); + } + get_remote_sdp_from_offer (rdata, &r_sdp); status = call->getLocalSDP()->receiving_initial_offer (r_sdp);