Send proceeding if appropriate on audio transmission, too
authorMark Spencer <markster@digium.com>
Wed, 19 May 2004 15:00:14 +0000 (15:00 +0000)
committerMark Spencer <markster@digium.com>
Wed, 19 May 2004 15:00:14 +0000 (15:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3013 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 104f840..84a6896 100755 (executable)
@@ -3849,6 +3849,24 @@ static int zt_write(struct ast_channel *ast, struct ast_frame *frame)
                return -1;
        }
        
+#ifdef PRI_EVENT_PROCEEDING
+       if (!p->proceeding && p->sig==SIG_PRI && p->pri && p->pri->overlapdial) {
+               if (p->pri->pri) {              
+                       if (!pri_grab(p, p->pri)) {
+#ifdef PRI_PROGRESS
+                                       pri_progress(p->pri->pri,p->call);
+#else                                          
+                                       pri_acknowledge(p->pri->pri,p->call, p->prioffset, 1);
+#endif                                         
+                                       pri_rel(p->pri);
+                       } else
+                                       ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
+               }
+               p->proceeding=1;
+       }
+#else
+#warning "You need later PRI library"
+#endif
        /* Write a frame of (presumably voice) data */
        if (frame->frametype != AST_FRAME_VOICE) {
                if (frame->frametype != AST_FRAME_IMAGE)