| Newsgroups |
gmane.comp.gnu.bayonne.devel |
| Message-ID |
<[email protected]> |
On Apr 27 2005, David Sugar wrote:
> Hmm...so you can build against 141?
>
> Perhaps tracing the record state in the aculab driver would help. You
> can have it report each event->id it receives. Are you using a timeout
> to set a maximum record duration? Does the timer go off? What happens
> in the TRUNK_TIMER_EXPIRED handler in aculab/record.cpp?
>
> Luca Bariani wrote:
> > have you already posted this to bayonne-aculab mailing list?
> >
> > Luca
> >
> >
> >> First, we do not use DTK111 we use DTK141 with patch from DTK140 that
> >> gives options of building drivers as Prosody2 (TiNG) or Prosody 1,
> >> since we could not get dtk111 to load firmware onto our boards.
> >>
> >>You only need to create sysmbolic link of ln -s /usr/src/aculab/dtk141
> >>dtk111 and bayonne will build straightforward.
> >>
> >> In bayonne.conf we set firmware=/root/ets_supu.upr and it downloaded
> >> the firmware ok, it will look for dtk111 this time under
> >> /home/aculab/dtk111 , which is another symbolic link from dtk141.
> >>
> >>We made thousands of calls, most of them in bulk and everthing is ok.
> >>
> >> We do have problem though of recording, it keep looping and
> >> overwriting the audio and the script will not advance unless you press
> >> #, however if we replace record with sleep the script will complete.
> >>
> >> There has been similar problem with other drivers, I believe and I was
> >> wondering those who have been running aculab resolved this aculab
> >> recording issue we use bayonne-1.2.14
> >>
> >>We are getting similar problem with bayonne-1.2.8 which we have run with
> >>dialogic with great sucess.
> >>
> >>Your help will be very appriciated.
> >>
> >>Thanks,
> >>
> >>Mo
> >>
> >>
> >>
> >>_______________________________________________
> >>Bayonne-devel mailing list
> >>[email protected]
> >>http://lists.gnu.org/mailman/listinfo/bayonne-devel
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Bayonne-devel mailing list
> > [email protected]
> > http://lists.gnu.org/mailman/listinfo/bayonne-devel
Source code of record.cpp in bayonne-1.2.14
#include "driver.h"
#ifdef CCXX_NAMESPACES
using namespace std;
namespace ost {
#endif
bool AculabTrunk::recordHandler(TrunkEvent *event)
{
struct tm *dt, tbuf;
struct stat ino;
char buffer[32];
const char *ext;
Audio::Info info;
unsigned mask;
switch(event->id)
{
case TRUNK_STOP_STATE:
endTimer();
handler = &AculabTrunk::stepHandler;
StopRecordFile();
Trunk::flags.dsp=DSP_MODE_INACTIVE;
return true;
case TRUNK_DTMF_KEYUP:
mask = (1 << event->parm.dtmf.digit);
if(!(mask & data.record.term)) {
return false;
}
endTimer();
StopRecordFile();
Trunk::flags.dsp=DSP_MODE_INACTIVE;
trunkSignal(TRUNK_SIGNAL_STEP);
handler = &AculabTrunk::stepHandler;
return true;
case TRUNK_ENTER_STATE:
enterState("record");
status[id] = 'r';
setTimer(data.record.timeout);
if(data.record.term) {
setDTMFDetect(true);
}
else {
Trunk::setDTMFDetect();
}
ext = strrchr(data.record.name, '/');
if(!ext)
ext = data.record.name;
ext = strrchr(ext, '.');
info.format = raw;
info.encoding = mulawAudio;
info.order = 0;
info.annotation = (char *)data.record.annotation;
info.rate = 8000;
if(!ext)
{
ext = data.record.extension;
strcat(data.record.name, ext);
}
if(!stricmp(ext, ".al")) {
info.encoding = alawAudio;
}
else if(!stricmp(ext, ".au"))
{
info.format = sun;
info.order = __BIG_ENDIAN;
}
else if(!stricmp(ext, ".wav"))
{
info.format = riff;
info.order = __LITTLE_ENDIAN;
}
close();
filename=data.record.name;
if(data.record.offset != (unsigned long)-1)
{
open(data.record.name);
setPosition(data.record.offset);
}
else if(data.record.append)
open(data.record.name);
else
create(data.record.name, &info);
setSymbol(SYM_OFFSET, "0");
setSymbol(SYM_RECORDED, "0");
if(!isOpen())
{
slog(Slog::levelError) << name<<":
"<<data.record.name << ": cannot open" << endl;
setSymbol(SYM_ERROR, "record-failed");
trunkSignal(TRUNK_SIGNAL_ERROR);
handler = &AculabTrunk::stepHandler;
return true;
}
if(data.record.append) {
setPosition();
}
dt = localtime_r(&ino.st_ctime, &tbuf);
sprintf(buffer, "%04d%02d%02d,%02d%02d%02d",
dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday,
dt->tm_hour, dt->tm_min, dt->tm_sec);
setSymbol(SYM_CREATED, buffer);
if(data.record.info)
{
sprintf(buffer, "%ld", getPosition());
setSymbol(SYM_OFFSET, buffer);
}
else
StartRecordFile();
Trunk::flags.dsp=DSP_MODE_VOICE;
return true;
}
return false;
}
#ifdef CCXX_NAMESPACES
};
#endif