Skip to content

Instantly share code, notes, and snippets.

@bjhaid
Created July 25, 2011 14:58
Show Gist options
  • Save bjhaid/1104320 to your computer and use it in GitHub Desktop.
Save bjhaid/1104320 to your computer and use it in GitHub Desktop.
current_calls = {"provider"=>"Internal", "start_time"=>"2011-07-25 16:29:29", "duration"=>"60", "to_caller_id_number"=>"7003", "state"=>"leaving_voicemail", "from_caller_id_name"=>"CC Agent Station", "to_caller_id_name"=>"tttttt aaaaaaaaa", "format"=>"slin", "from_caller_id_number"=>"4100", "id"=>"Local/4100~1122@pre_process_call_api-cf84,1"}
{"provider"=>"Internal", "start_time"=>"2011-07-25 16:29:29", "duration"=>"60", "to_caller_id_number"=>"4100", "state"=>"leaving_voicemail", "from_caller_id_name"=>"CC Agent Station", "to_caller_id_name"=>"CC Agent Station", "format"=>"slin", "from_caller_id_number"=>"4100", "id"=>"Local/4100~1122@pre_process_call_api-cf84,2"}
def getlist
current_calls = currentcalls.current_calls.current_call
a = current_calls.select {|h| h["to_caller_id_number"] == "7003" }
puts a
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment