Hi all,

I am working with sipXtapi-media-update branch, and placing code inside the 
sipXezPhone.

I would like to find out how to record an audio file using the functions 
from sipXtapi.
I want to record what is coming over the network in a .wav file.

I can record a .wav file, but the file is empty
The code is inside a button.
When the button is pressed the sipXCallAudioRecordFileStart function is 
called.
When the button is pressed again, the sipXCallAudioRecordFileStop is called 
to stop recording.

Could someone please provide help on what I am doing wrong?


I have placed the following code in the sipXezPhone file: ButtonPanel.cpp

==========================================================

void ButtonPanel::OnQoSAudioRecordButton(wxCommandEvent& event)
{
        //When QoS Record Start button pressed the QoS Record Stop button 
activated
        //When QoS Record Stop button pressed the QoS Record Start button 
activated
        if(mpButtonQoSAudioRecord->GetBitmapLabel() == btnQoSRecordStart)
        {
                //start recording audio file
                QoSAudio::getInstance().QoSAudioRecordStart();
                mpButtonQoSAudioRecord->SetBitmapLabel(btnQoSRecordStop);
                mpButtonQoSAudioRecord->SetToolTip("Stop Audio Record File");

                
sipxCallAudioRecordFileStart(sipXmgr::getInstance().getCurrentCall(), 
"M_QoS_007.wav");
        }
        else
        {
                //stop recording audio file
                QoSAudio::getInstance().QoSAudioRecordStop();
        mpButtonQoSAudioRecord->SetBitmapLabel(btnQoSRecordStart);
        mpButtonQoSAudioRecord->SetToolTip("Start Audio Record File");

                //stop recording the audio (.wav) file
                
sipxCallAudioRecordFileStop(sipXmgr::getInstance().getCurrentCall());
        }
        Refresh();
}

===========================================================


Thanks
Melanie

_________________________________________________________________
Get free, personalized commercial-free online radio with MSN Radio powered 
by Pandora http://radio.msn.com/?icid=T002MSN03A07001

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to