]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Remove ISDN hold restriction for non-bridged calls.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 18:37:15 +0000 (18:37 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 18:37:15 +0000 (18:37 +0000)
The check if an ISDN call is bridged before it could be placed on hold is
not necessary and is overly restrictive.  The check was originally done to
prevent problems with call transfers in case a user tried to transfer a
call connected to an application to another call connected to an
application.  The ISDN transfer code has not required this restriction for
quite some time because ECT could transfer any two active calls to each
other.

* Remove ISDN hold restriction for calls connected to applications.

* Made ast_waitfordigit_full() ignore AST_CONTROL_HOLD and
AST_CONTROL_UNHOLD instead of generating a warning message.

(closes issue ASTERISK-19388)
Reported by: Birger Harzenetter
Tested by: rmudgett
........

Merged revisions 357894 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@357895 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_pri.c
main/channel.c

index 6a4a881c698c1fdd0a140ef2b7490feacdf6b3ad..4dd35854e3c3639821df358fe13392c3f8545816 100644 (file)
@@ -5122,7 +5122,6 @@ static int sig_pri_handle_hold(struct sig_pri_span *pri, pri_event *ev)
        int retval;
        int chanpos_old;
        int chanpos_new;
-       struct ast_channel *bridged;
        struct ast_channel *owner;
 
        chanpos_old = pri_find_principle_by_call(pri, ev->hold.call);
@@ -5143,9 +5142,11 @@ static int sig_pri_handle_hold(struct sig_pri_span *pri, pri_event *ev)
        if (!owner) {
                goto done_with_private;
        }
-       bridged = ast_bridged_channel(owner);
-       if (!bridged) {
-               /* Cannot hold a call that is not bridged. */
+       if (pri->pvts[chanpos_old]->call_level != SIG_PRI_CALL_LEVEL_CONNECT) {
+               /*
+                * Make things simple.  Don't allow placing a call on hold that
+                * is not connected.
+                */
                goto done_with_owner;
        }
        chanpos_new = pri_find_empty_nobch(pri);
index 38477a282dbd863b92a9d7a7ca7c6f326c4459fd..6294e9932002e31a5040ae2199d7e9436a8d7eca 100644 (file)
@@ -3629,6 +3629,8 @@ int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
                                case AST_CONTROL_CONNECTED_LINE:
                                case AST_CONTROL_REDIRECTING:
                                case AST_CONTROL_UPDATE_RTP_PEER:
+                               case AST_CONTROL_HOLD:
+                               case AST_CONTROL_UNHOLD:
                                case -1:
                                        /* Unimportant */
                                        break;