K
K
karibskii_koks2017-04-04 06:43:48
MySQL
karibskii_koks, 2017-04-04 06:43:48

How to compare input variable with value in MySQL database?

Hello! Please tell me how to compare the entered variable with the value in the MariaDB database?
The database can contain up to 10 unique combinations.
When calling an external number, the system asks to enter the code:
exten => trunk,1,Background(enter-secure)
We enter the code:
same => n,Read(enter-digits,,8)
Enter the entered value into the table:
same => n(check),Set(ODBC_ENTER_DIGITS(${CALLERID(num)},${enter-digits})="")
And now the question arises, how to compare two values ​​- entered and one of the ten available ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2017-04-04
@Rsa97

And what for to enter entered value in base? You need to describe a query function in func_odbc.conf that returns the presence of a specified value in the database, for example, via COUNT (), and call this function in Asterisk and check the value returned to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question