My bad it seems I did had to make a patch to get it working.... If Atilla sees this I give him permission to add it to his SVN :-)
Torrey On 9 September 2010 19:10, Anton VG. <anton.va...@gmail.com> wrote: > Are you sure you actually compiled Domjan's chan_dahdi? I'm getting errors > while trying compiling for 1.6.2..11 & 1.6.1.20 > > [CC] chan_dahdi.c -> chan_dahdi.o > chan_dahdi.c: In function ‘notify_message’: > chan_dahdi.c:1965: error: too many arguments to function > ‘ast_event_queue_and_cache’ > chan_dahdi.c: In function ‘disable_dtmf_detect’: > chan_dahdi.c:2139: error: ‘DSP_FEATURE_DTMF_DETECT’ undeclared (first use in > this function) > chan_dahdi.c:2139: error: (Each undeclared identifier is reported only once > chan_dahdi.c:2139: error: for each function it appears in.) > chan_dahdi.c: In function ‘enable_dtmf_detect’: > chan_dahdi.c:2157: error: ‘DSP_FEATURE_DTMF_DETECT’ undeclared (first use in > this function) > chan_dahdi.c: In function ‘dahdi_hangup’: > chan_dahdi.c:3266: warning: implicit declaration of function > ‘ast_dsp_digitmode’ > chan_dahdi.c: In function ‘dahdi_handle_event’: > chan_dahdi.c:4602: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘void *’ > chan_dahdi.c: In function ‘__dahdi_exception’: > chan_dahdi.c:5441: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘void *’ > chan_dahdi.c: In function ‘dahdi_read’: > chan_dahdi.c:5569: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘void *’ > chan_dahdi.c:5736: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘short int *’ > chan_dahdi.c:5738: error: cannot convert to a pointer type > chan_dahdi.c:5774: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘short int *’ > chan_dahdi.c:5789: error: incompatible types when assigning to type ‘union > <anonymous>’ from type ‘void *’ > chan_dahdi.c: In function ‘dahdi_write’: > chan_dahdi.c:5905: error: wrong type argument to unary exclamation mark > chan_dahdi.c:5915: error: cannot convert to a pointer type > chan_dahdi.c:5924: error: cannot convert to a pointer type > chan_dahdi.c: In function ‘dahdi_new’: > chan_dahdi.c:6298: error: ‘DSP_FEATURE_DTMF_DETECT’ undeclared (first use in > this function) > chan_dahdi.c:6396: warning: ‘ast_device_state_changed_literal’ is deprecated > (declared at > /home/src/asterisk/asterisk-1.6.2.11/include/asterisk/devicestate.h:191) > chan_dahdi.c: In function ‘do_monitor’: > chan_dahdi.c:8160: error: too few arguments to function ‘vmwi_generate’ > make[1]: *** [chan_dahdi.o] Error 1 > make: *** [channels] Error 2 > > > On Thursday 09 September 2010 20:11:45 Torrey Searle wrote: >> Did you run into compilation issues? I just compiled Atilla's >> chan_dahdi.c yesterday with 1.6.2.11 without any issue... >> >> Torrey >> >> On 8 September 2010 23:06, Anton VG. <anton.va...@gmail.com> wrote: >> > Have Anyone used (updated) Domjan libss7+latest asterisk 1.6.2.x? >> > >> > Just looked to latest Domjan svn - the chan_dahdi.c is still for 1.6.0.x. >> > Any plans to update? >> > >> > -- >> > _____________________________________________________________________ >> > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> > >> > asterisk-ss7 mailing list >> > To UNSUBSCRIBE or update options visit: >> > http://lists.digium.com/mailman/listinfo/asterisk-ss7 > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-ss7 mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-ss7
Index: chan_dahdi.c =================================================================== --- chan_dahdi.c (revision 63) +++ chan_dahdi.c (working copy) @@ -1959,10 +1959,7 @@ return; } - ast_event_queue_and_cache(event, - AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, - AST_EVENT_IE_CONTEXT, AST_EVENT_IE_PLTYPE_STR, - AST_EVENT_IE_END); + ast_event_queue_and_cache(event); if (!ast_strlen_zero(mailbox) && !ast_strlen_zero(mwimonitornotify)) { snprintf(s, sizeof(s), "%s %s %d", mwimonitornotify, mailbox, thereornot); @@ -2136,7 +2133,7 @@ ioctl(p->subs[SUB_REAL].dfd, DAHDI_TONEDETECT, &val); if (!p->hardwaredtmf && p->dsp) { - p->dsp_features &= ~DSP_FEATURE_DTMF_DETECT; + p->dsp_features &= ~DSP_FEATURE_DIGIT_DETECT; ast_dsp_set_features(p->dsp, p->dsp_features); } } @@ -2154,7 +2151,7 @@ ioctl(p->subs[SUB_REAL].dfd, DAHDI_TONEDETECT, &val); if (!p->hardwaredtmf && p->dsp) { - p->dsp_features |= DSP_FEATURE_DTMF_DETECT; + p->dsp_features |= DSP_FEATURE_DIGIT_DETECT; ast_dsp_set_features(p->dsp, p->dsp_features); } } @@ -3263,7 +3260,7 @@ p->origcid_name = NULL; } if (p->dsp) - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); if (p->exten) p->exten[0] = '\0'; @@ -3792,15 +3789,15 @@ switch (*cp) { case 1: ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF(1) on %s\n",chan->name); - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */ + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */ break; case 2: ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF/MAX(2) on %s\n",chan->name); - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */ + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */ break; default: ast_debug(1, "Set option TONE VERIFY, mode: OFF(0) on %s\n",chan->name); - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */ + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */ break; } break; @@ -3883,7 +3880,7 @@ cp = (char *) data; ast_debug(1, "Set option RELAX DTMF, value: %s(%d) on %s\n", *cp ? "ON" : "OFF", (int) *cp, chan->name); - ast_dsp_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax); break; case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */ cp = (char *) data; @@ -4599,7 +4596,7 @@ p->subs[index].f.mallocd = 0; p->subs[index].f.offset = 0; p->subs[index].f.src = "dahdi_handle_event"; - p->subs[index].f.data = NULL; + p->subs[index].f.data.ptr = NULL; f = &p->subs[index].f; if (index < 0) @@ -5438,7 +5435,7 @@ p->subs[index].f.subclass = 0; p->subs[index].f.delivery = ast_tv(0,0); p->subs[index].f.src = "dahdi_exception"; - p->subs[index].f.data = NULL; + p->subs[index].f.data.ptr = NULL; if ((!p->owner) && (!(p->radio || (p->oprmode < 0)))) { @@ -5566,7 +5563,7 @@ p->subs[index].f.subclass = 0; p->subs[index].f.delivery = ast_tv(0,0); p->subs[index].f.src = "dahdi_read"; - p->subs[index].f.data = NULL; + p->subs[index].f.data.ptr = NULL; /* make sure it sends initial key state as first frame */ if ((p->radio || (p->oprmode < 0)) && (!p->firstradio)) @@ -5733,9 +5730,9 @@ p->subs[index].f.frametype = AST_FRAME_TEXT; p->subs[index].f.mallocd = 0; p->subs[index].f.offset = AST_FRIENDLY_OFFSET; - p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET; + p->subs[index].f.data.ptr = p->subs[index].buffer + AST_FRIENDLY_OFFSET; p->subs[index].f.datalen = 1; - *((char *) p->subs[index].f.data) = c; + *((char *) p->subs[index].f.data.ptr) = c; ast_mutex_unlock(&p->lock); return &p->subs[index].f; } @@ -5771,7 +5768,7 @@ p->subs[index].f.samples = READ_SIZE; p->subs[index].f.mallocd = 0; p->subs[index].f.offset = AST_FRIENDLY_OFFSET; - p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET / sizeof(p->subs[index].buffer[0]); + p->subs[index].f.data.ptr = p->subs[index].buffer + AST_FRIENDLY_OFFSET / sizeof(p->subs[index].buffer[0]); #if 0 ast_debug(1, "Read %d of voice on %s\n", p->subs[index].f.datalen, ast->name); #endif @@ -5786,7 +5783,7 @@ p->subs[index].f.samples = 0; p->subs[index].f.mallocd = 0; p->subs[index].f.offset = 0; - p->subs[index].f.data = NULL; + p->subs[index].f.data.ptr = NULL; p->subs[index].f.datalen= 0; } if (p->dsp && (!p->ignoredtmf || p->callwaitcas || p->busydetect || p->callprogress) && !index) { @@ -5902,7 +5899,7 @@ return 0; } /* Return if it's not valid data */ - if (!frame->data || !frame->datalen) + if (!frame->data.ptr || !frame->datalen) return 0; if (frame->subclass == AST_FORMAT_SLINEAR) { @@ -5912,7 +5909,7 @@ if (res) ast_log(LOG_WARNING, "Unable to set linear mode on channel %d\n", p->channel); } - res = my_dahdi_write(p, (unsigned char *)frame->data, frame->datalen, index, 1); + res = my_dahdi_write(p, (unsigned char *)frame->data.ptr, frame->datalen, index, 1); } else { /* x-law already */ if (p->subs[index].linear) { @@ -5921,7 +5918,7 @@ if (res) ast_log(LOG_WARNING, "Unable to set companded mode on channel %d\n", p->channel); } - res = my_dahdi_write(p, (unsigned char *)frame->data, frame->datalen, index, 0); + res = my_dahdi_write(p, (unsigned char *)frame->data.ptr, frame->datalen, index, 0); } if (res < 0) { ast_log(LOG_WARNING, "write failed: %s\n", strerror(errno)); @@ -6295,10 +6292,10 @@ x = DAHDI_TONEDETECT_ON | DAHDI_TONEDETECT_MUTE; if (ioctl(i->subs[index].dfd, DAHDI_TONEDETECT, &x)) { i->hardwaredtmf = 0; - features |= DSP_FEATURE_DTMF_DETECT; + features |= DSP_FEATURE_DIGIT_DETECT; } else if (NEED_MFDETECT(i)) { i->hardwaredtmf = 1; - features |= DSP_FEATURE_DTMF_DETECT; + features |= DSP_FEATURE_DIGIT_DETECT; } } if (features) { @@ -6321,7 +6318,7 @@ } #endif ast_dsp_set_features(i->dsp, features); - ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax); + ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax); if (!ast_strlen_zero(progzone)) ast_dsp_set_call_progress_zone(i->dsp, progzone); if (i->busydetect && CANBUSYDETECT(i)) { @@ -6599,9 +6596,9 @@ /* set digit mode appropriately */ if (p->dsp) { if (NEED_MFDETECT(p)) - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax); else - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); } memset(dtmfbuf, 0, sizeof(dtmfbuf)); /* Wait for the first digit only if immediate=no */ @@ -6715,14 +6712,14 @@ goto quit; } dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK); - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax); res = my_getsigstr(chan, anibuf, "#", 10000); if ((res > 0) && (strlen(anibuf) > 2)) { if (anibuf[strlen(anibuf) - 1] == '#') anibuf[strlen(anibuf) - 1] = 0; ast_set_callerid(chan, anibuf + 2, NULL, anibuf + 2); } - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); } ast_copy_string(exten, dtmfbuf, sizeof(exten)); @@ -6807,7 +6804,7 @@ if (NEED_MFDETECT(p)) { if (p->dsp) { if (!p->hardwaredtmf) - ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); + ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); else { ast_dsp_free(p->dsp); p->dsp = NULL; @@ -8157,7 +8154,7 @@ /* Turn on on hook transfer for 4 seconds */ x = 4000; ioctl(last->subs[SUB_REAL].dfd, DAHDI_ONHOOKTRANSFER, &x); - last->cidlen = vmwi_generate(last->cidspill, res, 1, AST_LAW(last)); + last->cidlen = vmwi_generate(last->cidspill, res, 1, AST_LAW(last), last->cid_name, last->cid_num, 0); last->cidpos = 0; last->msgstate = res; last->onhooktime = thispass; @@ -8935,7 +8932,7 @@ if (tmp->subs[SUB_REAL].dfd > -1) { set_actual_gain(tmp->subs[SUB_REAL].dfd, 0, tmp->rxgain, tmp->txgain, tmp->law); if (tmp->dsp) - ast_dsp_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax); + ast_dsp_set_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax); update_conf(tmp); if (!here) { if ((chan_sig != SIG_BRI) && (chan_sig != SIG_BRI_PTMP) && (chan_sig != SIG_PRI) && (chan_sig != SIG_SS7))
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-ss7 mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-ss7