Method: AGI#database_deltree
- Defined in:
- lib/AGI.rb
#database_deltree(family, keytree = nil) ⇒ Object
Signals Asterisk to delete the appropriate ASTDB database key/value family.
Returns an AGIResponse object
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/AGI.rb', line 225 def database_deltree(family, keytree=nil) response = AGIResponse.new if keytree.nil? then command_str = "DATABASE DELTREE #{family}" else command_str = "DATABASE DELTREE #{family} #{keytree}" end begin response.native = execute(command_str) rescue AGITimeoutError, AGICommandError, AGIHangupError raise end if response.native == -1 then raise AGIChannelError.new(@last_response, "Channel Failure in (#{command_str})") elsif response.native == 1 then response.success = true end return response end |