Y
Y
yozhik752020-11-23 11:51:51
PHP
yozhik75, 2020-11-23 11:51:51

How to write an AGI script for Asterisk to send DTMF data to the server?

Good day, people!
I ran into a problem that I can’t solve in any way, because I’m not strong in Asterisk and I’m already sick of it
. In general, we have Rostelecom telephony in our company. There is a call center. Girls on the hotline receive a lot of calls to check the balance on the transport card. The boss gave back, to unload the work of the call center. The essence of his task is that:
1. Telephony remains Rostelecom. (well, this has already been decided, just the robot will send it to Asterisk when you press 1)
2. The user dials 19 digits on the phone and completes the set *
3. His card number goes to the server via a GET or POST request
4. Having received the balance there, it returns to Asterisk
5. With the help of TTS reproduces its balance by voice
Help someone who understands this. All the best!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rsa97, 2020-11-23
@Rsa97

AGI is not needed here, use the CURL dialplan feature .

A
Andrey Barbolin, 2020-11-23
@dronmaxman

Tough of course) 19 digits on the phone without error)
I'll make a couple of suggestions:
- bind to the client's number in order to automatically pull up his 19 digit account.
- transfer this functionality to the telegram bot
Show that you already got it so)?

E
Egor Smolyakov, 2020-11-23
@yehors

Here - https://github.com/romkazor/aioari#examples-python37 - there is an example of how to catch DTMF and play a file in Asterisk.

A
Anton, 2020-11-30
@anton99zel

The correct answer was given by Andrey Barbolin about linking to a phone number.
I will add that you can not enter the number, but recognize the voice and issue a synthesized answer using Yandex SpeechKit https://cloud.yandex.ru/services/speechkit#demo
As a result, you should have this:
If the phone number is in the database, then pull it up otherwise

Нажмите 1, чтобы узнать баланс...бла-бла-бла...
Продиктуйте номер
Яндекс распознает голос
Смотрим баланс в базе
Яндекс диктует баланс
End

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question