I used a counter, i found that every 100 is like a second, so 300 is
like 3 seconds.

--- overlap.c.org       2006-07-24 18:13:09.000000000 +0200
+++ overlap.c   2006-07-24 20:44:06.000000000 +0200
@@ -244,22 +244,35 @@
 {
        struct localuser *u;
        int retval = -1;
+       int res;
        int do_exit = FALSE;
        LOCAL_USER_ADD(u);

        char called_number[32] = "";

+       res=0;
        while(ast_waitfor(chan, -1) > -1 && !do_exit) {
                struct ast_frame *f;
                f = ast_read(chan);
                if (!f)
                        break;

-               if (f->frametype == AST_FRAME_DTMF)
-                        do_exit = new_digit(chan, called_number,
-                                        sizeof(called_number),
-                                        f->subclass, &retval);
-
+               res++;
+               if ((f->frametype == AST_FRAME_DTMF)||(res>300))
+                       {
+                       if (res>300)
+                               {
+                               if (!strcmp(chan->tech->type, "VISDN"))
+                                       {
+                                       struct visdn_chan *visdn_chan
= to_visdn_chan(chan);
+                                       visdn_chan->sending_complete=1;
+                                       }
+                               }
+                       do_exit = new_digit(chan, called_number,
+                               sizeof(called_number),
+                               f->subclass, &retval);
+                       res=0;
+                       }
                ast_frfree(f);
        }

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Visdn-hackers mailing list
[email protected]
https://mailman.uli.it/mailman/listinfo/visdn-hackers

Reply via email to