문제

I am trying to make an application with twilio. The overall functionality is that a user is going to call into a system, and right away be presented with a voice menu to either press 1 through 9 or hang up. Is there a way to make twilio disconnect the call (and pass me the keypress) as soon as the user presses a digit (I don't want them to have to press #)? If they don't press anything, I want to hang up after a minute and the system would pass me something that says they pressed nothing.

Thanks

도움이 되었습니까?

해결책

I think you could accomplish this with the following TwiML:

<Response>
    <Gather numDigits="1" action="keypressed.php">
         <Pause length="60" />
    </Gather>
    <Redirect method="GET">nokeypressed.php</Redirect>
</Response>

In each keypressed.php and nokeypressed.php you would respond accordingly.

<Gather> Hints and Advanced Uses

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top