[libpri-commits] rmudgett: branch rmudgett/mcid r1697 - /team/rmudgett/mcid/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Tue May 11 17:39:32 CDT 2010
Author: rmudgett
Date: Tue May 11 17:39:29 2010
New Revision: 1697
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1697
Log:
Merged revisions 1696 via svnmerge from
https://origsvn.digium.com/svn/libpri/team/rmudgett/call_waiting
................
r1696 | rmudgett | 2010-05-11 17:35:57 -0500 (Tue, 11 May 2010) | 42 lines
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/mcid/ (props changed)
team/rmudgett/mcid/libpri.h
team/rmudgett/mcid/pri.c
team/rmudgett/mcid/pri_internal.h
team/rmudgett/mcid/q931.c
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
--- aoc_event-integrated (original)
+++ aoc_event-integrated Tue May 11 17:39:29 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/ect:1-1679
+/team/rmudgett/ect:1-1690
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
automerge = *
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
--- call_waiting-integrated (original)
+++ call_waiting-integrated Tue May 11 17:39:29 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/aoc_event:1-1680
+/team/rmudgett/aoc_event:1-1695
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
--- ect-integrated (original)
+++ ect-integrated Tue May 11 17:39:29 2010
@@ -1,1 +1,1 @@
-/team/group/ccss:1-1676
+/team/group/ccss:1-1689
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
--- mcid-integrated (original)
+++ mcid-integrated Tue May 11 17:39:29 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/call_waiting:1-1692
+/team/rmudgett/call_waiting:1-1696
Propchange: team/rmudgett/mcid/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May 11 17:39:29 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-1675
+/branches/1.4:1-1688
Modified: team/rmudgett/mcid/libpri.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/mcid/libpri.h?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- team/rmudgett/mcid/libpri.h (original)
+++ team/rmudgett/mcid/libpri.h Tue May 11 17:39:29 2010
@@ -1383,6 +1383,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/mcid/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/mcid/pri.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- team/rmudgett/mcid/pri.c (original)
+++ team/rmudgett/mcid/pri.c Tue May 11 17:39:29 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/mcid/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/mcid/pri_internal.h?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- team/rmudgett/mcid/pri_internal.h (original)
+++ team/rmudgett/mcid/pri_internal.h Tue May 11 17:39:29 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/mcid/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/mcid/q931.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- team/rmudgett/mcid/q931.c (original)
+++ team/rmudgett/mcid/q931.c Tue May 11 17:39:29 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 libpri-commits
mailing list