}
if (res & ZT_EVENT_DTMFDOWN) {
+--- channels/chan_zap.c.org 2007-09-26 09:08:42.423698383 +0200
++++ channels/chan_zap.c 2007-09-26 09:09:43.422303554 +0200
+@@ -1607,11 +1607,18 @@
+
+ static inline int zt_set_hook(int fd, int hs)
+ {
+- int x, res;
++ int x, res, count = 0;
+
+ x = hs;
+ res = ioctl(fd, ZT_HOOK, &x);
+
++ while (res < 0 && count < 20) {
++ usleep(100000); /* 1/10 sec. */
++ x = hs;
++ res = ioctl(fd, ZT_HOOK, &x);
++ count++;
++ }
++
+ if (res < 0) {
+ if (errno == EINPROGRESS)
+ return 0;