[asterisk-commits] trunk - r7860 /trunk/channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jan 7 14:38:41 CST 2006


Author: markster
Date: Sat Jan  7 14:38:40 2006
New Revision: 7860

URL: http://svn.digium.com/view/asterisk?rev=7860&view=rev
Log:
Fix build if RINGBEGIN is not defined (bug #6166)


Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?rev=7860&r1=7859&r2=7860&view=diff
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Sat Jan  7 14:38:40 2006
@@ -5973,10 +5973,12 @@
 							ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
 
 							if (p->cid_signalling == CID_SIG_V23_JP) {
+#ifdef ZT_EVENT_RINGBEGIN
 								if (res == ZT_EVENT_RINGBEGIN) {
 									res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_OFFHOOK);
-            								usleep(1);
+									usleep(1);
 								}
+#endif
 							} else {
 								res = 0;
 								break;
@@ -6019,7 +6021,7 @@
 
 					if (p->cid_signalling == CID_SIG_V23_JP) {
 						res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_ONHOOK);
-           					usleep(1);
+						usleep(1);
 						res = 4000;
 					} else {
 
@@ -10438,7 +10440,11 @@
 			else if (!strcasecmp(v->value, "dtmf"))
 				cid_signalling = CID_SIG_DTMF;
 			else if (!strcasecmp(v->value, "v23_jp"))
+#ifdef ZT_EVENT_RINGBEGIN
 				cid_signalling = CID_SIG_V23_JP;
+#else
+				ast_log(LOG_WARNING, "Asterisk compiled aginst Zaptel version too old to support japanese CallerID!\n");								
+#endif
 			else if (ast_true(v->value))
 				cid_signalling = CID_SIG_BELL;
 		} else if (!strcasecmp(v->name, "cidstart")) {



More information about the asterisk-commits mailing list