K
K
karibskii_koks2017-03-16 13:29:42
MySQL
karibskii_koks, 2017-03-16 13:29:42

How ASterisk get data from Mariadb table?

Hello!
I would like to set up a call to mobile phones in case the main one is not available.
Implementation with the help of a DB is necessary.
In Func_odbc.conf I have the following function:
[OPERATOR]
dsn=MySQL-asterisk
read=SELECT value FROM settings WHERE name='operator'
In dialplan:
'673' => 1. Answer() [pbx_config]
2. Set( operator=${ODBC_OPERATOR}) [pbx_config]
3. Noop(${operator}) [pbx_config]
In Verbose:
-- Executing [[email protected]:1] Answer("PJSIP/4102-00000013", "") in new stack
> 0x7f0fc4769c90 -- Probation passed - setting RTP source address to 192.168.0.206:16966
-- Executing [[email protected]:2] Set("PJSIP/4102-00000013", "operator=") in new stack
-- Executing [673 @outbound:3] NoOp("PJSIP/4102-00000013", "") in new stack -- Auto fallthrough
, channel 'PJSIP/4102-00000013' status is 'UNKNOWN'
DB

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
karibskii_koks, 2017-03-16
@karibskii_koks

Solved with MYSQL application Turned
out faster

A
Alexander Aksentiev, 2017-03-16
@Sanasol

easier through an external AGI script in a convenient language.
https://github.com/rillian/asterisk-opus/blob/mast...
write readsql everywhere

S
silverjoe, 2017-03-16
@silverjoe

Perhaps not fully configured odbc?
In addition to the settings in the asterisk, you must also specify the settings in the system file /etc/odbc.ini
And also check that the Asterisk is built with ODBC support and the same ODBC is present in the system

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question