Module: sems Branch: master Commit: 9503de297107840bd6cf290e2b91bba3b2b9240e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=9503de297107840bd6cf290e2b91bba3b2b9240e
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Oct 19 19:41:26 2010 +0200 handle errors in processing INVITE --- core/AmSession.cpp | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 3b14489..3be1b0a 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -721,7 +721,19 @@ void AmSession::onSipRequest(const AmSipRequest& req) break; } - onInvite(req); + try { + onInvite(req); + } + catch(const string& s) { + ERROR("%s\n",s.c_str()); + setStopped(); + AmSipDialog::reply_error(req, 500, "Internal Server Error"); + } + catch(const AmSession::Exception& e) { + ERROR("%i %s\n",e.code,e.reason.c_str()); + setStopped(); + AmSipDialog::reply_error(req,e.code,e.reason); + } if(detached.get() && !getStopped()){ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
