Asterisk cmd RealTime
RealTime
Synopsis
Realtime Data LookupDescription
Use the RealTime config handler system to read data into channel variables.RealTime(<family>|<colmatch>|<value>[|<prefix>])
All unique column names will be set as channel variables with optional prefix to the name.
E.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}
For example assume the following:
In extconfig.conf:
sipusers => mysql,asterisk,asterisk_sip
In extensions.conf:
exten => 11223344,1,RealTime(sipusers|name|12023243260|var_)
exten => 11223344,n,NoOp(RealTime variable containing data from the column field is '${var_column}')
This will execute the following SQL on the asterisk_sip table in the asterisk database:
Select * from asterisk_sip where name = 12023243260
The variable ${var_column} will contain the contents of the column field from the matching record
See also
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Comments