True, this is not accepted with new compiler!
I will check this if you give me some time.
Julien
-----Original Message-----
From: Tristan [mailto:address@hidden
Sent: February 14, 2006 11:34 AM
To: Julien Chavanton
Subject: Re: [Bayonne-devel] Record with bayonne 1.2.15 And AudioFeed
Question
Hi,
Just a question since it's been a long time I didn't code in C++ ,
I already changed your patch :
Added: #define MAXLEN 100000 // MAXLEN was undefined ...
Changed:
if(interface == ANALOG) => if(interface == NT_ANALOG) // The exact
name is NT_ANALOG
if(trunk->interface == ANALOG) => if(trunk->interface == NT_ANALOG)
But I don't remember where to find the standard c++ function open
because I get this error:
trunk.cpp: Dans member function < bool
ost::DialogicTrunk::Join(ost::DialogicTrunk*) >:
trunk.cpp:387: error: `open' undeclared in namespace `std'
Do you have an idea ?
Julien Chavanton wrote:
join %session.parent record=recording.vox
I suggest you try with dialogic vox file format
////////////////////////////////////////////
// Modification to DialogicTrunk::Join() //
////////////////////////////////////////////
bool DialogicTrunk::Join(DialogicTrunk *trunk)
{
int d1, d2, m1, m2;
unsigned flags = MD_PCM | PM_SR8;
SC_TSINFO tsinfo1, tsinfo2, rtsinfo;
long scts1, scts2, arrayp[32];
if(interface == ANALOG)
{
if(!routing)
return false;
d1 = chdev;
m1 = SC_LSI;
}
else
{
d1 = tsdev;
m1 = SC_DTI;
}
if(trunk->interface == ANALOG)
{
if(!trunk->routing)
return false;
d2 = trunk->chdev;
m2 = SC_LSI;
}
else
{
d2 = trunk->tsdev;
m2 = SC_DTI;
}
if(trunk->join)
return false;
trunk->enterMutex();
nr_scroute(d1, m1, d2, m2, SC_FULLDUP);
join = trunk;
join->join = this;
trunk->leaveMutex();
if(trunk->data.join.recfn)
{
switch(getEncoding())
{
case mulawAudio:
flags = MD_PCM | PM_SR8;
break;
case alawAudio:
flags = MD_PCM | PM_ALAW | PM_SR8;
break;
case voxADPCM:
flags = MD_ADPCM | PM_SR6;
default:
flags = MD_ADPCM | PM_SR6;
break;
}
tsinfo1.sc_numts = 1;
tsinfo1.sc_tsarrayp = &scts1;
switch(m1)
{
case SC_LSI:
dx_getxmitslot(d1, &tsinfo1);
break;
case SC_DTI:
dt_getxmitslot(d1, &tsinfo1);
break;
}
tsinfo2.sc_numts = 1;
tsinfo2.sc_tsarrayp = &scts2;
switch(m2)
{
case SC_LSI:
dx_getxmitslot(d2, &tsinfo2);
break;
case SC_DTI:
dt_getxmitslot(d2, &tsinfo2);
break;
}
arrayp[0] = scts1;
arrayp[1] = scts2;
rtsinfo.sc_numts = 2;
rtsinfo.sc_tsarrayp = &arrayp[0];
trunk->iofile.io_length = -1;
DV_TPT tpt;
DX_IOTT iott[2];
char basebufp[MAXLEN];
dx_clrtpt(&tpt,1);
tpt.tp_type = IO_EOT;
tpt.tp_termno = DX_LCOFF;
tpt.tp_length = 1;
iott[1].io_type = IO_DEV | IO_EOT ;
iott[1].io_bufp = 0;
iott[1].io_offset = 0;
iott[1].io_length = -1 ;
iott[1].io_fhandle = std::open(trunk->data.join.recfn, O_RDWR |
O_CREAT
| O_TRUNC, 0666) ;
slog(Slog::levelCritical) <<" RECORDING JOINNED TIME SLOT : "<<
trunk->data.join.recfn<<endl;
dx_clrdigbuf(chdev);
slog(Slog::levelDebug) <<"dx_recm("<<chdev<<")"<<endl;
if(dx_recm(chdev, &iott[1], &tpt, EV_ASYNC | flags , &rtsinfo) == -1)
{
slog(Slog::levelError) << "dxrecm() error" << endl;
}
slog(Slog::levelDebug) <<"dx_recm("<<chdev<<")=SUCCESS"<<endl;
/*
if(dx_recm(chdev, &trunk->iofile, dialogicivr.getPlayTPT(),
EV_ASYNC | flags, &rtsinfo) < 0)
slog(Slog::levelError) << "dxrecm() error" << endl;
*/
// postError(chdev, "vox");
}
return true;
}
-----Original Message-----
From: Tristan [mailto:address@hidden
Sent: February 8, 2006 11:22 AM
To: Julien Chavanton
Cc: address@hidden
Subject: Re: [Bayonne-devel] Record with bayonne 1.2.15 And AudioFeed
Question
Hi,
Seems like i have trouble using join %thesessionidtojoin record=%myfile
( maybe I have to use %session.parent instead of an other var ? )
Looking at /var/lib/bayonne, I see the files i'm trying to record but
their size is very often 65kB or not a lot more
and the record is 10-15s instead of the 10min+ it is supposed to be...
Am I missing something to get it work ?
The sound is also very noisy and I'm not sure to hear the two person on
the phone ...
Is it limited to 1 record for all lines I have or does it have some
limitation I can't see ?
Do you think I can record the two ends of a join and share it with
multiple listener ?
Thanks in advance!
Tristan
Julien Chavanton wrote:
You will not be able to do a duplex recording with record command; it
will only record the audio you are receiving on the channel binded to
the script.
Fortunatly you can achieve this by doing a join record.
join %session.parent record=%recfile
This is probably not a limitation for what you are doing, but you can
not use the voice resource to play audio while you are recording but
there is another alternative for doing this.
Julien
-----Original Message-----
From:
address@hidden
[mailto:address@hidden
o
r
g] On Behalf Of Tristan
Sent: January 18, 2006 11:41 AM
To: address@hidden
Subject: [Bayonne-devel] Record with bayonne 1.2.15
Hi,
I write because I have some troubles with the record command in
ccscript.
I need to record conversation that customers have with our technical
support.
I use dialogic cards ( D120JCT and D41E to do outgoing calls to the
technical support and incoming calls are taken on a D300 PCI ).
The join works like a charm but with the command wait timeout=10s
record="/path/to/myfile" I only record the technical support answer
but
can't record the customer voice.
I tried with join record="afile" but nothing happens.
Searched the manual but don't found anything relevant.
Has someone an idea please on how to do it or is it impossible ?
The point is that it was working flawless with the same hardware with
an
other IVR soft ( GAP for those who heard about it ), but GAP is not as
good as bayonne for my production needs.
Thanks in advance for help !
Cheers
_______________________________________________
Bayonne-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bayonne-devel