Rayyan Reda
Rayyan Reda

Reputation: 1

Is there a function or method to use voice response (say) in twilio inside the streaming function?

def call():
    """Accept a phone call."""
    global response
    start = Start()
    start.stream(url=f'wss://{request.host}/stream')
    response.append(start)
    response.say('Please leave a message')
    response.pause(length=60)

I want to able to use response.say inside stream function

def stream(ws):
    global response
    response.say("Hi")

I tried to run with the above code but it didn't work anyway although it didn't show any errors at run time.

Upvotes: 0

Views: 65

Answers (0)

Related Questions