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
......@@ -257,7 +257,6 @@ IAXVoIPLink::sendAudioFromMic(void)
}
AudioCodec* ac = currentCall -> getCodecMap().getCodec( currentCall -> getAudioCodec() );
_debug("Audiocodec name = %s\n" , ac->getCodecName().c_str());
if (!ac) {
// Audio codec still not determined.
if (audiolayer) {
......@@ -666,7 +665,6 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
if (event->ies.format) {
call->setFormat(event->ies.format);
}
break;
case IAX_EVENT_ANSWER:
......@@ -697,6 +695,9 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
break;
case IAX_EVENT_VOICE:
//_debug("Should have a decent value!!!!!! = %i\n" , call -> getAudioCodec());
if( !audiolayer -> isCaptureActive())
audiolayer->startStream();
iaxHandleVoiceEvent(event, call);
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment