Implement confirmation for PRI
authorMark Spencer <markster@digium.com>
Fri, 16 Jul 2004 20:51:54 +0000 (20:51 +0000)
committerMark Spencer <markster@digium.com>
Fri, 16 Jul 2004 20:51:54 +0000 (20:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 8d8f529..c5ece95 100755 (executable)
@@ -7333,10 +7333,13 @@ static void *pri_dchannel(void *vpri)
                                                        } else 
                                                                ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
                                                        pri->pvts[chanpos]->dop.dialstr[0] = '\0';
-                                               } else
+                                               } else if (pri->pvts[chanpos]->confirmanswer) {
+                                                       ast_log(LOG_DEBUG, "Waiting on answer confirmation on channel %d!\n", pri->pvts[chanpos]->channel);
+                                               } else {
                                                        pri->pvts[chanpos]->subs[SUB_REAL].needanswer =1;
-                                               /* Enable echo cancellation if it's not on already */
-                                               zt_enable_ec(pri->pvts[chanpos]);
+                                                       /* Enable echo cancellation if it's not on already */
+                                                       zt_enable_ec(pri->pvts[chanpos]);
+                                               }
                                                ast_mutex_unlock(&pri->pvts[chanpos]->lock);
                                        }
                                }