rami 0.3 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/rami.rb +18 -0
  3. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ * 0.4 (Nov 18, 2005)
2
+
3
+ * Added QueueStatus (Patch submitted by Alan)
4
+
1
5
  * 0.3 (Nov 2, 2005)
2
6
 
3
7
  * Added Client.stop and Server.stop.
@@ -189,6 +189,11 @@ class Client
189
189
  return @client.send_action({'ActionID' => @action_id, 'Action' => 'MailboxStatus', 'Mailbox' => mailbox},@timeout)
190
190
  end
191
191
 
192
+ def queue_status
193
+ increment_action_id
194
+ @client.send_action({'ActionID' => @action_id, 'Action' => 'QueueStatus'}, @timeout)
195
+ end
196
+
192
197
  def mailbox_count(mailbox=nil)
193
198
  increment_action_id
194
199
  return @client.send_action({'ActionID' => @action_id, 'Action' => 'MailboxCount', 'Mailbox' => mailbox},@timeout)
@@ -737,6 +742,19 @@ def send_action(action=nil,t=10)
737
742
  end
738
743
  end
739
744
 
745
+ ## QueueStatus - multiple responses has ActionID
746
+ if action['Action'] == 'QueueStatus'
747
+ if e['Message'] == 'Queue status will follow'
748
+ @action_events.delete(e)
749
+ elsif e['Event'] == 'QueueStatusComplete'
750
+ @action_events.delete(e)
751
+ finished =1
752
+ else
753
+ @action_events.delete(e)
754
+ result << e
755
+ end
756
+ end
757
+
740
758
  ## SIPpeers - multiple responses has ActionID
741
759
  if action['Action'] == 'SIPpeers'
742
760
  if e['Message'] == 'Peer status list will follow'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rami
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.3"
7
- date: 2005-11-02 00:00:00 -08:00
6
+ version: "0.4"
7
+ date: 2005-11-18 00:00:00 -08:00
8
8
  summary: A proxy server/client api for the Asterisk Manager Interface
9
9
  require_paths:
10
10
  - lib