[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  "Roeland Werring" <ruleking@g...>
 Subject :  recording ISDN line
 Date :  Thu, 16 Nov 2006 14:26:47 +0100
Hi,

I want to implement something in the yate code so i can record the ISDN
lines. What i would like is that both the received audio and local audio are
being captured in one audio file. The thing is that in Wavefile.cpp there is
already a system to record the caller and the peer separately, however I'd
like to to it at once in order to save harddisk space. The only way i see to
do this, is to always make a conference and make a wave/record/ call to this
conf room. This is very unhandy, cause when the isdn line switches to
another peer, the whole conf room has to switch as well, so I'd prefer to
use the build in setCallRecord and setPeerRecord methods.

So i created a DuplexRecord handler in wavefile.cpp in which i try to
connect both call and peer to a recording wav channel, but that does not
seem to work:

    CallEndpoint *ch = static_cast(msg.userObject
("CallEndpoint"));
    DataEndpoint *de = static_cast(msg.userObject
("DataEndpoint"));
    if (ch && !de)
    de = ch->setEndpoint();
    if (!de) {
        Debug(DebugWarn,"Wave '%s' call duplex record with no data
channel!",c1.c_str());
    return false;
    }
     WaveConsumer* c = new WaveConsumer(c1,ch,maxlen);
     c->setNotify(msg.getValue("notify"));
     de->setCallRecord(c);
     de->setPeerRecord(c);
     c->deref();

I only record the peer in this way...
Anyone suggestions how i should approach this?

Thanks in advance,

-- 
Roeland Werring




Hi,

I want to implement something in the yate code so i can record the ISDN lines. What i would like is that both the received audio and local audio are being captured in one audio file. The thing is that in Wavefile.cpp there is already a system to record the caller and the peer separately, however I'd like to to it at once in order to save harddisk space. The only way i see to do this, is to always make a conference and make a wave/record/ call to this conf room. This is very unhandy, cause when the isdn line switches to another peer, the whole conf room has to switch as well, so I'd prefer to use the build in setCallRecord and setPeerRecord methods.

So i created a DuplexRecord handler in wavefile.cpp in which i try to connect both call and peer to a recording wav channel, but that does not seem to work:

    CallEndpoint *ch = static_cast<CallEndpoint*>( msg.userObject("CallEndpoint"));
    DataEndpoint *de = static_cast<DataEndpoint*>(msg.userObject("DataEndpoint"));
    if (ch && !de)
    de = ch->setEndpoint();
    if (!de) {
        Debug(DebugWarn,"Wave '%s' call duplex record with no data channel!",c1.c_str());
    return false;
    }
     WaveConsumer* c = new WaveConsumer(c1,ch,maxlen);
     c->setNotify(msg.getValue ("notify"));
     de->setCallRecord(c);
     de->setPeerRecord(c);
     c->deref();

I only record the peer in this way...
Anyone suggestions how i should approach this?

Thanks in advance,

--
Roeland Werring