나는 루비와 Twilio 번호를 호출하고 음성 녹음을 녹음 할 수있는 twilio API를 사용하여 웹 응용 프로그램을 만들고 있습니다.Twilio Skip Options (ruby)
def getRecord()
Twilio::TwiML::Response.new do |response|
// userResponse = response.Gather --> does this Gather anything someone types at anytime?
response.Say "Hello"
response.Say "Record your message.", :voice => 'woman'
response.Record :maxLength => '5', :trim => "trim-silence", :playBeep => "false", :action => '/feed', :method => 'get'
end.text
end
내가 같은 "는 말 메시지를 건너"또는으로 "부활절 달걀"기능에 추가하려면 어떻게, 따라 완전히 다른 방법을 실행
이
은 당신의 음성을 녹음하기 위해 호출되는 방법입니다 사용자가 조회하는 자릿수 녹음이 시작된 후 사용자가*
에 도달했을 때만 작동하고 통화가 시작되는 순간부터 시작되도록하고 싶을지라도 다음
if
문을 내
response.Record
전화 바로 다음에 추가하려고 시도했지만 작동합니다.
def getRecord()
Twilio::TwiML::Response.new do |response|
// userResponse = response.Gather --> does this Gather anything someone types at anytime?
until userResponse == '*' do
response.Say "Hello"
response.Say "Record your message.", :voice => 'woman'
response.Record :maxLength => '5', :trim => "trim-silence", :playBeep => "false", :action => '/feed', :method => 'get'
end
if userResponse == '*'
getFeed()
end
end.text
end
하지만 until
루프 내에서 이런 식으로 아무것도 전혀 실행 :
if userResponse['Digits'] == "*"
getFeed()
end
은 또한 다음과 같은 시도했다.
response.Gather
을 추가하는 방법은 무엇입니까? 사용자가 전화하는 동안 언제든지 사용자의 전화를 청취하려면 어떻게해야합니까?