[#1722] Chage AudioRtpInit from answer to mod_on_rx_request

This commit is contained in:
Alexandre Savard
2010-01-14 15:07:16 -05:00
parent 238fdb78fe
commit 121f15db1b
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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);