question

$$ANON_USER$$ avatar image
$$ANON_USER$$ asked

how to collect the digit by the user from an outgoing call in PHP?

I managed to make an outgoing call, I was standing still for days trying to read the input of the user who received the call. Any idea how this can be done?

outgoing-callsphp
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

vishal avatar image
vishal answered

Hello,

You can use gather command to read the input from the user.

Please check this endpoint for more info on how to use it in PHP

10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

$$ANON_USER$$ avatar image
$$ANON_USER$$ answered

Hi, thanks for reply :) is there a way to make user input run a script with the value selected by the user?

another thing I need and can't find in the documentation is to play another audio in the same phone call based on the user's choice:

for example: the user clicks 1, I play audio 1; user clicks 2, I play audio 2 etc. etc

it's possible to do it?

10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

klane@telnyx.com avatar image
klane@telnyx.com answered

For the script question you'd have to design and make a html form and have it do an action, but this isn't Telnyx related.

You can play different audio files based on DTMF. You would chain API calls together. So when you run DTMF gather, you can have it play specific audio based on the response.

Audio file can be mp3 or wav, not aware of any limits in size.

10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Manage Your Content