*** channels/chan_zap.c.org Wed Apr 5 03:28:14 2006 --- channels/chan_zap.c Mon Apr 16 17:14:01 2007 *************** *** 5854,5860 **** else number = 0; /* If set to use V23 Signalling, launch our FSK gubbins and listen for it */ ! } else if (p->cid_signalling == CID_SIG_V23) { cs = callerid_new(p->cid_signalling); if (cs) { samples = 0; --- 5854,5860 ---- else number = 0; /* If set to use V23 Signalling, launch our FSK gubbins and listen for it */ ! } else if ((p->cid_signalling == CID_SIG_V23)||(p->cid_signalling == CID_SIG_V23JP)) { cs = callerid_new(p->cid_signalling); if (cs) { samples = 0; *************** *** 5890,5896 **** break; } samples += res; ! res = callerid_feed(cs, buf, res, AST_LAW(p)); if (res < 0) { ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno)); break; --- 5890,5898 ---- break; } samples += res; ! if( cid_signalling == CID_SIG_V23JP) ! res = callerid_feed_jp(cs, buf, res, AST_LAW(p)); ! else res = callerid_feed(cs, buf, res, AST_LAW(p)); if (res < 0) { ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno)); break; *************** *** 6049,6054 **** --- 6051,6059 ---- /* Take out of linear mode for Caller*ID processing */ zt_setlinear(p->subs[index].zfd, 0); + /*JP*/ + if(cid_signalling == CID_SIG_V23JP) + zt_set_hook(p->subs[index].zfd, ZT_OFFHOOK); for(;;) { i = ZT_IOMUX_READ | ZT_IOMUX_SIGEVENT; if ((res = ioctl(p->subs[index].zfd, ZT_IOMUX, &i))) { *************** *** 6087,6093 **** break; } samples += res; ! res = callerid_feed(cs, buf, res, AST_LAW(p)); if (res < 0) { ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno)); break; --- 6092,6100 ---- break; } samples += res; ! if( cid_signalling == CID_SIG_V23JP) ! res = callerid_feed_jp(cs, buf, res, AST_LAW(p)); ! else res = callerid_feed(cs, buf, res, AST_LAW(p)); if (res < 0) { ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno)); break; *************** *** 6097,6102 **** --- 6104,6112 ---- break; } } + /* JP */ + if(cid_signalling == CID_SIG_V23JP) + zt_set_hook(p->subs[index].zfd, ZT_ONHOOK); if (p->usedistinctiveringdetection == 1) { if(option_verbose > 2) /* this only shows up if you have n of the dring patterns filled in */ *************** *** 10344,10349 **** --- 10354,10361 ---- cid_signalling = CID_SIG_BELL; else if (!strcasecmp(v->value, "v23")) cid_signalling = CID_SIG_V23; + else if (!strcasecmp(v->value, "v23jp")) + cid_signalling = CID_SIG_V23JP; else if (!strcasecmp(v->value, "dtmf")) cid_signalling = CID_SIG_DTMF; else if (ast_true(v->value))