[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Apr 14 13:32:50 CDT 2011


branch "master" has been updated
       via  ca95f560a6c8ccf5b3ffd2bff26249b982ecedea (commit)
      from  307e2b902ca3b1466aff00951914feb31bdedfec (commit)

Summary of changes:
 src/PJSipSessionModule.cpp             |    4 ++++
 src/PJSipSessionModuleConstruction.cpp |    1 +
 src/SipSession.cpp                     |    4 ++++
 3 files changed, 9 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit ca95f560a6c8ccf5b3ffd2bff26249b982ecedea
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 14 15:36:11 2011 -0300

    Enable support for SIP session timers.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 27756f9..467a1ee 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -505,6 +505,10 @@ void PJSipSessionModule::handleNewInvite(pjsip_rx_data *rdata)
     // Add our own module as a dialog usage
     pjsip_dlg_add_usage(dlg, &mModule, NULL);
 
+    pjsip_timer_setting session_timer_settings;
+    pjsip_timer_setting_default(&session_timer_settings);
+    pjsip_timer_init_session(inv_session, &session_timer_settings);
+
     if (pjsip_inv_initial_answer(inv_session, rdata, 100, NULL, NULL, &tdata) != PJ_SUCCESS)
     {
         lg(Warning) << "Failed to create 100 Trying response";
diff --git a/src/PJSipSessionModuleConstruction.cpp b/src/PJSipSessionModuleConstruction.cpp
index 9f7d71e..f78c59d 100644
--- a/src/PJSipSessionModuleConstruction.cpp
+++ b/src/PJSipSessionModuleConstruction.cpp
@@ -140,6 +140,7 @@ PJSipSessionModule::PJSipSessionModule(pjsip_endpoint *endpt,
     pjsip_evsub_init_module(endpt);
     pjsip_xfer_init_module(endpt);
     pjsip_replaces_init_module(endpt);
+    pjsip_timer_init_module(endpt);
     pjsip_endpt_register_module(endpt, &mModule);
 }
 
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index e9609b6..8c0e659 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -481,6 +481,10 @@ void SipSession::start(const Ice::Current&)
 
     pjsip_dlg_add_usage(dialog, &mImplPriv->mManager->getSessionModule()->getModule(), NULL);
 
+    pjsip_timer_setting session_timer_settings;
+    pjsip_timer_setting_default(&session_timer_settings);
+    pjsip_timer_init_session(inviteSession, &session_timer_settings);
+
     // Record our session within the dialog so code handling pjsip events can do STUFF
     SipSessionPtr session = new SipSession(*this);
     PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inviteSession, session);

-----------------------------------------------------------------------


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list