[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
Wed Apr 13 13:45:48 CDT 2011


branch "master" has been updated
       via  2b68a207e8b733c5d32f7f3baa63ab743a4a4f82 (commit)
       via  872dc33703f403a63e896a8b778a1e43fa7bad09 (commit)
      from  929982dac23f77950f2b7ff18ec85b51a42de558 (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 2b68a207e8b733c5d32f7f3baa63ab743a4a4f82
Merge: 872dc33 929982d
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Apr 13 13:45:22 2011 -0500

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/sip


commit 872dc33703f403a63e896a8b778a1e43fa7bad09
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Apr 13 13:43:58 2011 -0500

    Catch exceptions thrown during session creation.
    
    We were testing what happens when various components "die"
    and what happens when we try to place a call in such a state. This
    change results in it being safe to place a call if the media
    component is not running.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 58a30c5..8fca880 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -535,7 +535,18 @@ void PJSipSessionModule::handleNewInvite(pjsip_rx_data *rdata)
         lg(Debug) << "Call is destined for " << destination;
     }
 
-    SipSessionPtr session = caller->createSession(destination);
+    SipSessionPtr session;
+    try
+    {
+        SipSessionPtr session = caller->createSession(destination);
+    }
+    catch (const Ice::Exception& ex)
+    {
+        lg(Error) << "Exception caught while trying to create SIP session\n" << ex.what();
+        pjsip_inv_end_session(inv_session, 500, NULL, &tdata);
+        pjsip_inv_send_msg(inv_session, tdata);
+        return;
+    }
     session->setInviteSession(inv_session);
     session->setDialog(dlg);
     PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inv_session, session);

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list