fixes SessionComponent hook handling onSendRequest;

this fixes requests sent with session timer to contain SST headers


git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@282 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 20 years ago
parent 5eb2a7325a
commit 2d07b7b821

@ -676,12 +676,16 @@ void AmSession::sendUpdate()
dlg.update("");
}
void AmSession::sendReinvite()
{
rtp_str.setLocalIP(AmConfig::LocalIP);
string sdp_body;
sdp.genResponse(AmConfig::LocalIP,rtp_str.getLocalPort(),sdp_body);
dlg.reinvite("", "application/sdp", sdp_body);
void AmSession::sendReinvite(bool updateSDP)
{
if (updateSDP) {
rtp_str.setLocalIP(AmConfig::LocalIP);
string sdp_body;
sdp.genResponse(AmConfig::LocalIP,rtp_str.getLocalPort(),sdp_body);
dlg.reinvite("", "application/sdp", sdp_body);
} else {
dlg.reinvite("", "", "");
}
}
void AmSession::sendInvite()

@ -264,7 +264,7 @@ public:
/** send an UPDATE in the session */
void sendUpdate();
/** send a Re-INVITE (if connected) */
void sendReinvite();
void sendReinvite(bool updateSDP = true);
/** send an INVITE */
void sendInvite();

@ -583,9 +583,9 @@ int AmSipDialog::sendRequest(const string& method,
if((method!="BYE")&&(method!="CANCEL"))
msg += getContactHdr();
if(!hdrs.empty()){
msg += hdrs;
if(hdrs[hdrs.length()-1] != '\n')
if(!m_hdrs.empty()){
msg += m_hdrs;
if(m_hdrs[m_hdrs.length()-1] != '\n')
msg += "\n";
}

@ -311,8 +311,9 @@ void SessionTimer::onTimeoutEvent(AmTimeoutEvent* timeout_ev)
int timer_id = timeout_ev->data.get(0).asInt();
if (timer_id == ID_SESSION_REFRESH_TIMER) {
if (session_refresher == refresh_local)
s->sendReinvite();
if (session_refresher == refresh_local)
// send reinvite with SDP
s->sendReinvite(true);
else
WARN("need session refresh but remote session is refresher\n");
} else if (timer_id == ID_SESSION_INTERVAL_TIMER) {

Loading…
Cancel
Save