*** ./channels/chan_zap.c.org Thu Feb 1 06:25:11 2007 --- ./channels/chan_zap.c Tue Apr 17 00:13:05 2007 *************** *** 6015,6021 **** 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; --- 6015,6021 ---- 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; *************** *** 6051,6057 **** 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; --- 6051,6059 ---- break; } samples += res; ! if( p->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; *************** *** 6210,6215 **** --- 6212,6220 ---- /* Take out of linear mode for Caller*ID processing */ zt_setlinear(p->subs[index].zfd, 0); + /*JP*/ + if(p->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))) { *************** *** 6250,6256 **** 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; --- 6255,6263 ---- break; } samples += res; ! if( p->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; *************** *** 6260,6265 **** --- 6267,6275 ---- break; } } + /* JP */ + if(p->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 */ *************** *** 10492,10497 **** --- 10502,10509 ---- chan_conf.cid_signalling = CID_SIG_BELL; else if (!strcasecmp(v->value, "v23")) chan_conf.cid_signalling = CID_SIG_V23; + else if (!strcasecmp(v->value, "v23jp")) + chan_conf.cid_signalling = CID_SIG_V23JP; else if (!strcasecmp(v->value, "dtmf")) chan_conf.cid_signalling = CID_SIG_DTMF; else if (ast_true(v->value))