Unable to open sound device: Undefined external error [status=450001]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
  I'm having intermitent problems to make a audio call.
  Sometimes, i get the message "Unable to open sound device: Undefined 
external error [status=450001]"
  And, sometimes, i get this message, but adding a infor saying that 
there is no sound driver in the system.
  And, sometimes, it works :)
  DTMFs only are caught in the Python version (i've made a simple test 
app to it) in the C++ version it doesn't fire the overwrite event in my 
callback.
  I've been debuging the pjsip source to check if i'd found something, 
but, no success. I'm stopping in *sound_port.c*, function 
*pjmedia_aud_stream_create* (line 1993).

  I had similar problems in my virtual machine using Ubuntu 14.04.

  My environment:

SO: Windows 10 Professional x64.
PJSIP: 2.4.5 (targeted to x86)
IDE: Visual Studio 2015, with administrative privilegies.
DirectX SDK: (June 2010)
Hardware: Dell Inspirion 15RSE
                    Audio: Speaker (Conexant SmartAudio HD)

My Code:
*Constructor of LibManager (i use it to configure everything).*
LibManager::LibManager(bool enableRegistration, bool noSound, bool 
twoWaySound, string recordFile, string playAudio, bool enableDTMFdetection)
{
     this->twoWayCall = twoWayCall;
     this->recordFile = recordFile;
     this->playFile = playAudio;
     this->noSound = noSound;
     this->enableRegistration = enableRegistration;
     this->enableDTMFdetection = enableDTMFdetection;
     try {
         this->endpoint.libCreate();

         EpConfig endpointConfig;
         endpointConfig.logConfig.level = LibManager::LOG_LEVEL;
         this->endpoint.libInit(endpointConfig);

         if (this->noSound) {
             this->endpoint.audDevManager().setNullDev();
         }

         TransportConfig transportConfig;
         this->endpoint.transportCreate(PJSIP_TRANSPORT_UDP, 
transportConfig);

         this->endpoint.libStart();

         if (this->enableRegistration) {
             this->doRegistration();
         }

         if (!this->recordFile.empty()) {
             this->prepareRecorder();
         }
     }
     catch (Error error) {
         cout << "################  Startup error ################ " << 
endl;
         cout << error.info() << endl;
         cout << "################################################ " << 
endl;
     }
}

*Call method, where the problems occurs.*
void LibManager::call(string contact) {
     this->currentCall = new 
AnchorCall(*this->account,this->enableDTMFdetection);
     CallOpParam opParam(true);
     try {
         cout << "################  Calling  ################" << endl;
         cout << contact << endl;
         cout << "###########################################" << endl;
         this->currentCall->makeCall(contact, opParam);
         if (this->twoWayCall) {
             this->connectCallerToCallee(*this->currentCall);
         }
     }
     catch (Error error) {
         cout << "################     Error making call 
################" << endl;
         cout << error.info() << endl;
         cout << 
"#######################################################" << endl;
     }
}

*This executes without problem.*
void LibManager::listSoundDevices() {
     AudioDevInfoVector devices = this->endpoint.audDevManager().enumDev();
     cout << "#############     Available Sound Devices ##############" 
<< endl;
     //int id = this->endpoint.audDevManager().getPlaybackDev();
     //this->endpoint.audDevManager().setPlaybackDev(id);
     for each (AudioDevInfo* device in devices)
     {
         cout << device->name << " - Driver: " << device->driver << " - 
Rate: " << device->defaultSamplesPerSec << endl;
     }
     cout << "Sound is active: " << 
(this->endpoint.audDevManager().sndIsActive() ? "Yes" : "No") << endl;
     cout << "#######################################################" 
<< endl;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151112/522335d1/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux