From af99a7f22377b29937fbd8ba598860fe4b64afc4 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Wed, 7 Oct 2009 10:50:40 +0000 Subject: [PATCH] onOutgoingInvite callback when sending INVITE git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1507 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmSession.cpp | 2 ++ core/AmSession.h | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 5987770e..d6b7b672 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -823,6 +823,8 @@ void AmSession::sendReinvite(bool updateSDP, const string& headers) int AmSession::sendInvite(const string& headers) { + onOutgoingInvite(headers); + // Set local IP first, so that IP is set when // getLocalPort/setLocalPort may bind. rtp_str.setLocalIP(AmConfig::LocalIP); diff --git a/core/AmSession.h b/core/AmSession.h index f0351d48..295e6589 100644 --- a/core/AmSession.h +++ b/core/AmSession.h @@ -328,10 +328,10 @@ public: */ static string getNewId(); - /** - * Gets the number of running sessions - */ - static unsigned int getSessionNum(); + /** + * Gets the number of running sessions + */ + static unsigned int getSessionNum(); /** * Entry point for DTMF events @@ -358,6 +358,12 @@ public: */ virtual void onInvite(const AmSipRequest& req); + /** + * onOutgoingInvite will be called if an INVITE + * is sent in the session. + */ + virtual void onOutgoingInvite(const string& headers) { } + /** * onCancel will be called if a CANCEL for a running * dialog has been received. At this point, the CANCEL