rastman 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/README +17 -1
- data/bin/rastman_mkcalls.rb +0 -0
- data/lib/rastman.rb +2 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
*0.1.6* (May 30th, 2008)
|
2
|
+
|
3
|
+
* fix that getvar! doesn't return the variable value (thanks to Andrius Kairiukstis for reporting the bug)
|
4
|
+
|
5
|
+
* added information to README regarding the banged and not banged version of the commands
|
6
|
+
|
1
7
|
*0.1.5* (February 8th, 2008)
|
2
8
|
|
3
9
|
* fix the return value of ping! so it returns true in case of success [Franz Schwartau]
|
data/README
CHANGED
@@ -5,6 +5,18 @@
|
|
5
5
|
# and listens to events published by the server. The instance can also
|
6
6
|
# be used to send Manager API requests to the server.
|
7
7
|
#
|
8
|
+
# All the Asterisk Manager API commands are accessible. They can be used in two
|
9
|
+
# different ways:
|
10
|
+
#
|
11
|
+
# - name of the command in lowercase: the command is sent but Rastman doesn't wait
|
12
|
+
# for the answer (asynchronous).
|
13
|
+
# i.e.: rastman.setvar :variable => "my_time", :value => "12"
|
14
|
+
#
|
15
|
+
# - name of the command in lowercase with a bang: the command is sent and Rastman
|
16
|
+
# waits for the answer (synchronous). If the answer contains a value (for Getvar)
|
17
|
+
# then it is returned, else true is returned.
|
18
|
+
# i.e.: value = rastman.getvar! 1, :variable => "extension"
|
19
|
+
#
|
8
20
|
# == Download
|
9
21
|
#
|
10
22
|
# You can download Rastman from the Rubyforge project page: http://rubyforge.org/projects/rastman
|
@@ -22,11 +34,15 @@
|
|
22
34
|
#
|
23
35
|
# rastman.events(:eventmask => "user,call")
|
24
36
|
#
|
25
|
-
# rastman.ping
|
37
|
+
# rastman.ping!
|
26
38
|
#
|
27
39
|
# rastman.originate :channel => "SIP/myphone@mydomain.com",
|
28
40
|
# :context => "default", :exten => "voicemail",
|
29
41
|
# :priority => 1
|
42
|
+
#
|
43
|
+
# response_timeout = 1
|
44
|
+
# value = rastman.getvar! response_timeout, :channel => "SIP/5060-44d225d0",
|
45
|
+
# :variable => "extension"
|
30
46
|
#
|
31
47
|
# rastman.logoff
|
32
48
|
#
|
data/bin/rastman_mkcalls.rb
CHANGED
File without changes
|
data/lib/rastman.rb
CHANGED
@@ -258,8 +258,9 @@ module Rastman
|
|
258
258
|
else "Success"
|
259
259
|
end
|
260
260
|
result = answer.first[:response] == success rescue false
|
261
|
+
value = answer.first[:value]
|
261
262
|
end
|
262
|
-
return result
|
263
|
+
return value || result
|
263
264
|
rescue Exception => ex
|
264
265
|
$rnlog.warn("Rastman::Manager#send_action: exception caught (connection probably closed already): #{ex}")
|
265
266
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rastman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathieu Lajugie
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-05-30 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements: []
|
59
59
|
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.
|
61
|
+
rubygems_version: 1.1.1
|
62
62
|
signing_key:
|
63
63
|
specification_version: 2
|
64
64
|
summary: Asterisk Manager API interface for Ruby
|