Allow detection of callerid on FXO with distinctive ring
authorMartin Pycko <martinp@digium.com>
Wed, 17 Sep 2003 22:23:17 +0000 (22:23 +0000)
committerMartin Pycko <martinp@digium.com>
Wed, 17 Sep 2003 22:23:17 +0000 (22:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 002a7d8..1824fad 100755 (executable)
@@ -4294,7 +4294,9 @@ static void *ss_thread(void *data)
                                                res = zt_get_event(p->subs[index].zfd);
                                                ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
                                                res = 0;
-                                               break;
+                                               /* Let us detect callerid when the telco uses distinctive ring */
+                                               if (p->ringt < RINGT/2)
+                                                       break;
                                        } else if (i & ZT_IOMUX_READ) {
                                                res = read(p->subs[index].zfd, buf, sizeof(buf));
                                                if (res < 0) {