[svn-commits] rmudgett: branch rmudgett/call_waiting r1696 - /team/rmudgett/call_waiting/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 11 17:36:00 CDT 2010


Author: rmudgett
Date: Tue May 11 17:35:57 2010
New Revision: 1696

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1696
Log:
Merged revisions 1691 via svnmerge from 
https://origsvn.digium.com/svn/libpri/team/rmudgett/aoc_event

................
  r1691 | root | 2010-05-11 17:28:54 -0500 (Tue, 11 May 2010) | 35 lines
  
  Merged revisions 1690 via svnmerge from 
  file:///srv/subversion/repos/libpri/team/rmudgett/ect
  
  ................
    r1690 | rmudgett | 2010-05-11 17:28:41 -0500 (Tue, 11 May 2010) | 28 lines
    
    Merged revisions 1689 via svnmerge from 
    https://origsvn.digium.com/svn/libpri/team/group/ccss
    
    ................
      r1689 | rmudgett | 2010-05-11 17:17:04 -0500 (Tue, 11 May 2010) | 21 lines
      
      Merged revisions 1688 via svnmerge from 
      https://origsvn.digium.com/svn/libpri/branches/1.4
      
      ........
        r1688 | rmudgett | 2010-05-11 17:14:15 -0500 (Tue, 11 May 2010) | 14 lines
        
        Dialing an invalid extension causes incomplete hangup sequence.
        
        Revision -r1489 corrected a deviation from Q.931 Section 5.3.2.  However,
        this resulted in an unexpected behaviour change to the upper layer
        (Asterisk).
        
        This change restores the legacy hangup behaviour if the new API call is
        not used.  Use pri_hangup_fix_enable() to follow Q.931 Section 5.3.2 call
        hangup better.
        
        (closes issue #17104)
        Reported by: shawkris
        Tested by: rmudgett
      ........
    ................
  ................
................

Modified:
    team/rmudgett/call_waiting/   (props changed)
    team/rmudgett/call_waiting/libpri.h
    team/rmudgett/call_waiting/pri.c
    team/rmudgett/call_waiting/pri_internal.h
    team/rmudgett/call_waiting/q931.c

Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- aoc_event-integrated (original)
+++ aoc_event-integrated Tue May 11 17:35:57 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/ect:1-1679
+/team/rmudgett/ect:1-1690

Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- call_waiting-integrated (original)
+++ call_waiting-integrated Tue May 11 17:35:57 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/aoc_event:1-1680
+/team/rmudgett/aoc_event:1-1695

Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- ect-integrated (original)
+++ ect-integrated Tue May 11 17:35:57 2010
@@ -1,1 +1,1 @@
-/team/group/ccss:1-1676
+/team/group/ccss:1-1689

Propchange: team/rmudgett/call_waiting/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May 11 17:35:57 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-1675
+/branches/1.4:1-1688

Modified: team/rmudgett/call_waiting/libpri.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/libpri.h?view=diff&rev=1696&r1=1695&r2=1696
==============================================================================
--- team/rmudgett/call_waiting/libpri.h (original)
+++ team/rmudgett/call_waiting/libpri.h Tue May 11 17:35:57 2010
@@ -1347,6 +1347,17 @@
 #define PRI_HANGUP
 int pri_hangup(struct pri *pri, q931_call *call, int cause);
 
+/*!
+ * \brief Set the call hangup fix enable flag.
+ *
+ * \param ctrl D channel controller.
+ * \param enable TRUE to follow Q.931 Section 5.3.2 call hangup better.
+ * FALSE for legacy behaviour. (Default FALSE if not called.)
+ *
+ * \return Nothing
+ */
+void pri_hangup_fix_enable(struct pri *ctrl, int enable);
+
 #define PRI_DESTROYCALL
 void pri_destroycall(struct pri *pri, q931_call *call);
 

Modified: team/rmudgett/call_waiting/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/pri.c?view=diff&rev=1696&r1=1695&r2=1696
==============================================================================
--- team/rmudgett/call_waiting/pri.c (original)
+++ team/rmudgett/call_waiting/pri.c Tue May 11 17:35:57 2010
@@ -1093,6 +1093,14 @@
 	return 0;
 }
 
+void pri_hangup_fix_enable(struct pri *ctrl, int enable)
+{
+	if (ctrl) {
+		ctrl = PRI_MASTER(ctrl);
+		ctrl->hangup_fix_enabled = enable ? 1 : 0;
+	}
+}
+
 int pri_hangup(struct pri *pri, q931_call *call, int cause)
 {
 	if (!pri || !call)

Modified: team/rmudgett/call_waiting/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/pri_internal.h?view=diff&rev=1696&r1=1695&r2=1696
==============================================================================
--- team/rmudgett/call_waiting/pri_internal.h (original)
+++ team/rmudgett/call_waiting/pri_internal.h Tue May 11 17:35:57 2010
@@ -104,6 +104,7 @@
 	unsigned int service_message_support:1;/* TRUE if upper layer supports SERVICE messages */
 	unsigned int hold_support:1;/* TRUE if upper layer supports call hold. */
 	unsigned int deflection_support:1;/* TRUE if upper layer supports call deflection/rerouting. */
+	unsigned int hangup_fix_enabled:1;/* TRUE if should follow Q.931 Section 5.3.2 instead of blindly sending RELEASE_COMPLETE for certain causes */
 	unsigned int cc_support:1;/* TRUE if upper layer supports call completion. */
 	unsigned int transfer_support:1;/* TRUE if the upper layer supports ECT */
 	unsigned int aoc_support:1;/* TRUE if can send AOC events to the upper layer. */

Modified: team/rmudgett/call_waiting/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/q931.c?view=diff&rev=1696&r1=1695&r2=1696
==============================================================================
--- team/rmudgett/call_waiting/q931.c (original)
+++ team/rmudgett/call_waiting/q931.c Tue May 11 17:35:57 2010
@@ -5720,6 +5720,13 @@
 	case PRI_CAUSE_REQUESTED_CHAN_UNAVAIL:
 	case PRI_CAUSE_IDENTIFIED_CHANNEL_NOTEXIST:
 	case PRI_CAUSE_UNALLOCATED:
+		if (!PRI_MASTER(ctrl)->hangup_fix_enabled) {
+			/* Legacy: We'll send RELEASE_COMPLETE with these causes */
+			disconnect = 0;
+			release_compl = 1;
+			break;
+		}
+		/* Fall through */
 	case PRI_CAUSE_INCOMPATIBLE_DESTINATION:
 		/* See Q.931 Section 5.3.2 a) */
 		switch (c->ourcallstate) {




More information about the svn-commits mailing list