Skip to content
Snippets Groups Projects
Commit be2c5779 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

IAX2 bug fix: Accept incoming calls

You have to add your IAX2 account in /etc/asterisk/extensions.conf
No more segmentation fault when an incoming call is answered.
parent 00b85552
Branches
Tags
No related merge requests found
...@@ -257,7 +257,6 @@ IAXVoIPLink::sendAudioFromMic(void) ...@@ -257,7 +257,6 @@ IAXVoIPLink::sendAudioFromMic(void)
} }
AudioCodec* ac = currentCall -> getCodecMap().getCodec( currentCall -> getAudioCodec() ); AudioCodec* ac = currentCall -> getCodecMap().getCodec( currentCall -> getAudioCodec() );
_debug("Audiocodec name = %s\n" , ac->getCodecName().c_str());
if (!ac) { if (!ac) {
// Audio codec still not determined. // Audio codec still not determined.
if (audiolayer) { if (audiolayer) {
...@@ -666,7 +665,6 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call) ...@@ -666,7 +665,6 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
if (event->ies.format) { if (event->ies.format) {
call->setFormat(event->ies.format); call->setFormat(event->ies.format);
} }
break; break;
case IAX_EVENT_ANSWER: case IAX_EVENT_ANSWER:
...@@ -697,6 +695,9 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call) ...@@ -697,6 +695,9 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
break; break;
case IAX_EVENT_VOICE: case IAX_EVENT_VOICE:
//_debug("Should have a decent value!!!!!! = %i\n" , call -> getAudioCodec());
if( !audiolayer -> isCaptureActive())
audiolayer->startStream();
iaxHandleVoiceEvent(event, call); iaxHandleVoiceEvent(event, call);
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment