]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add PI handling in Call Proceeding
authorGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Sat, 12 Dec 2009 16:48:50 +0000 (16:48 +0000)
committerGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Sat, 12 Dec 2009 16:48:50 +0000 (16:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15937 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_h323/changes.txt
src/mod/endpoints/mod_h323/mod_h323.cpp
src/mod/endpoints/mod_h323/mod_h323.h

index f70a94bfaea57a25514f3646b241a97d75a887e5..148b413ee42f62ed7b023ffde4689bd53f71537d 100644 (file)
@@ -1,3 +1,4 @@
+add PI handling in Call Proceeding.
 add PI handling in alerting.
 fix slow start handling
 move faststart to callproceeding due to some broken hardware not anderstand 
index 6516f430dc0c6ff8fa4d996cbc638553d049c738..6cdd71250570dfcab44f881035531933f1411c95 100644 (file)
@@ -1,5 +1,5 @@
 /*
-       Version 0.0.19
+       Version 0.0.20
 */
 
 #include "mod_h323.h"
@@ -809,6 +809,24 @@ bool FSH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU){
        return true;            
 }
 
+bool FSH323Connection::OnReceivedCallProceeding(const H323SignalPDU & pdu){
+       PTRACE(4, "mod_h323\t======>PFSH323Connection::OnReceivedCallProceeding ["<<*this<<"]");
+       unsigned pi;
+
+       
+       if (!pdu.GetQ931().GetProgressIndicator(pi))
+               pi = 0;
+       PTRACE(4, "mod_h323\t----------->OnAlerting PI = "<<pi);
+       if (pi > 0){
+               if ((m_rxChennel && m_txChennel) || (m_ChennelProgress && m_rxChennel))
+                       switch_channel_mark_pre_answered(m_fsChannel);
+               else{
+                       m_ChennelProgress = true;
+               }
+       }
+       return H323Connection::OnReceivedCallProceeding(pdu);
+}
+
 bool FSH323Connection::OnSendCallProceeding(H323SignalPDU & callProceedingPDU){
        PTRACE(4, "mod_h323\t======>FSH323Connection::OnSendCallProceeding fastStartState = "<<FastStartStateNames[fastStartState]<<" ["<<*this<<"]");
        
@@ -1542,7 +1560,7 @@ FSH323Connection * FSH323EndPoint::FSMakeCall(const PString & dest, void *userDa
 static switch_call_cause_t create_outgoing_channel(switch_core_session_t *session,
                                                    switch_event_t *var_event,
                                                    switch_caller_profile_t *outbound_profile,
-                                                   switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags,switch_call_cause_t *cancel_cause){
+                                                   switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags, switch_call_cause_t *cancel_cause){
        PTRACE(4, "mod_h323\t======>create_outgoing_channel DST NUMBER = "<<outbound_profile->destination_number);
        
        FSH323Connection * connection;
index 3941fcc8b037e60bd214c440ed50b8e6d38f26b7..e719df7002122000e6dedd6a6857f7b76be218e3 100644 (file)
@@ -214,6 +214,7 @@ class FSH323Connection:public H323Connection {
        virtual PBoolean OnStartLogicalChannel(H323Channel& channel);
        virtual PBoolean OnCreateLogicalChannel(const H323Capability& capability, H323Channel::Directions dir, unsigned& errorCode);
        virtual bool OnReceivedSignalSetup(const H323SignalPDU & setupPDU);
+       virtual bool OnReceivedCallProceeding(const H323SignalPDU & pdu);
        virtual void OnReceivedReleaseComplete(const H323SignalPDU & pdu);
        virtual bool OnReceivedProgress(const H323SignalPDU &);
        virtual bool OnSendCallProceeding(H323SignalPDU & callProceedingPDU);