nimbleape / asterisk-dialogflow-rtp-audioserver

MIT License
38 stars 18 forks source link

enable reacting to messages #14

Closed danjenkins closed 4 years ago

danjenkins commented 4 years ago

also enables a no audio output setting

JorgMuskens commented 4 years ago

@danjenkins I think the problem is in this piece of code

// we got the audio, so now we need to restart the dialogflow stream
                this._createNewDialogFlowStream();                  if (this._dialogFlowClient.writableEnded) {
                    this._createNewDialogFlowStream();
                }

When I comment the if function out and leave only the line this._createNewDialogFlowStream(); it works again.

I believe this._dialogFlowClient.writableEnded is empty so a new stream is never created.

Where does this function come from?