Page 453 - Asterisk™: The Future of Telephony
P. 453
with an optional prefix to the name (e.g., a prefix of var_ would make the column
name become the variable ${var_name}).
; retrieve all columns from the sipfriends table where the name column
; matches "John", and prefix all the variables with "John_"
exten => 123,1,RealTime(sipfriends,name,John,John_)
; now, let's read the value of the column named "port"
exten => 123,n,SayNumber(${John_port})
See Also
RealTimeUpdate()
RealTimeUpdate() Updates a value via the RealTime configuration handler
RealTimeUpdate(family,colmatch,value,newcol,newval)
Uses the RealTime configuration handler system to update a value. The column new-
col in family matching column colmatch = value will be updated to newval.
A channel variable named REALTIMECOUNT will be set with the number of rows updated
or -1 if an error occurs.
; this will update the port column in the sipfriends table to a new
; value of 5061, where the name column matches "John"
exten => 123,1,RealTimeUpdate(sipfriends,name,John,port,5061)
See Also
RealTime
Record() Records channel audio to a file
Record(filename.format[,silence[,maxduration[,options]]])
Records audio from the channel in to the given filename. If the file already exists, it will
be overwritten.
Optional arguments include:
format
Specifies the format of the file type to be recorded.
silence
Specifies the number of seconds of silence to allow before ending the recording and
continuing on with the next priority in the dialplan.
maxduration
Specifies the maximum recording duration, in seconds. If not specified or 0, there
is no maximum.
options
May contain any of the following letters:
RealTimeUpdate() | 425