ruby-agi 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/DOWNLOAD +1 -1
- data/INSTALL +6 -1
- data/README +7 -10
- data/Release-Notes +13 -18
- data/lib/ruby-agi/asterisk_variable.rb +13 -8
- data/lib/ruby-agi/command.rb +1 -1
- data/lib/ruby-agi/return_status.rb +6 -0
- metadata +2 -2
data/ChangeLog
CHANGED
data/DOWNLOAD
CHANGED
data/INSTALL
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
I strongly suggest to install ruby-agi using gem,
|
2
|
-
gem install ruby-agi
|
2
|
+
% gem install ruby-agi
|
3
|
+
To update your existing ruby-agi using gem, try
|
4
|
+
% gem update ruby-agi
|
5
|
+
|
6
|
+
If you don't have gem intalled on your computer, download it from here
|
7
|
+
http://www.rubygems.org
|
3
8
|
|
4
9
|
Alternatively, do
|
5
10
|
1. ruby extconf.rb
|
data/README
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
This library comes with absolutely no warranty.
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
ruby-agi is a library to write AGI scripts in ruby language for Asterisk. ruby-agi does not depend of Asterisk Manager.
|
4
|
+
There have a very simple AGI script in example/call_log.rb
|
5
|
+
I couldn't write any tutorial for ruby-agi and I am not good at it, if anybody want to give me a hand on writing documentation and tutorial, would be greatly appreciated.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
If anybody want to give a hand to write documentation for this project would be greatly appreciated.
|
7
|
+
Here are a sites that may help to know more about ruby-agi
|
8
|
+
http://ruby-agi.rubyforge.org (ruby-agi homepage)
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
Please feel free to email me with your feature request, bug report or any suggession.
|
10
|
+
Feel free to send me email, if you don't find any answer related to ruby-agi.
|
14
11
|
|
15
12
|
Thank you,
|
16
13
|
Mohammad Khan,
|
17
|
-
email: info
|
14
|
+
email: info <AT> beeplove <DOT> com
|
data/Release-Notes
CHANGED
@@ -1,20 +1,15 @@
|
|
1
|
-
1.1.
|
2
|
-
|
3
|
-
jump_to would take three arguments ex. jump_to(context, extension, priority)
|
4
|
-
enhanced callerid, calleridname and calleridnumber. calleridnumber is an addtional method to this release.
|
5
|
-
Regardless of Asterisk version above three caller variables would return uniform value.
|
6
|
-
Such as, callerid would return "John Smith" <1234567890> or empty string, if unidentified
|
7
|
-
calleridnumber would return number part of callerid (as string) ex. 1234567890 or empty string, if unidentified
|
8
|
-
calleridname would return name part of callerid ex. John Smith or emtpy string, if unidentified
|
9
|
-
|
10
|
-
1.0.2 (2006-01-09)
|
11
|
-
Because of a yaml bug in ruby-1.8.3, rubyforge server doesn't support any package that were built on ruby-1.8.3
|
12
|
-
This version is basically re-build of version 1.0.1 on ruby-1.8.4 instead of ruby-1.8.3
|
1
|
+
Release notes of ruby-agi-1.1.1
|
2
|
+
February 09, 2006
|
13
3
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
You can use call_log.rb to keep your incoming call history in syslog.
|
4
|
+
This is a bug fix release of ruby-agi. Below two bugs have fixed in this release.
|
5
|
+
-- ReturnStatus#timeout? was not functional, which has fixed.
|
6
|
+
-- AsteriskVariable#init_caller_variable updated to fix callerid bug which was returning 'nil' for number only callerid. method init_caller_variable is a private method that manage callerid, calleridname and calleridnumber
|
18
7
|
|
19
|
-
|
20
|
-
|
8
|
+
|
9
|
+
Feedback, suggestion, feature request, bug report is always appreciated.
|
10
|
+
|
11
|
+
|
12
|
+
Thanks,
|
13
|
+
Mohammad Khan
|
14
|
+
info <AT> beeplove <DOT> com
|
15
|
+
February 09, 2006
|
@@ -194,15 +194,22 @@ class AsteriskVariable < AGI
|
|
194
194
|
return read_env('agi_callingtns')
|
195
195
|
end
|
196
196
|
|
197
|
+
# asterisk-1.0.9 : agi_callerid (default value is 'unknown')
|
198
|
+
# asterisk-1.0.10 : agi_callerid (default value is 'unknown')
|
199
|
+
# asterisk-1.0.10 : agi_callerid, agi_calleridname (default value for both is 'unknown')
|
197
200
|
protected
|
198
201
|
def init_caller_variable
|
199
|
-
|
202
|
+
@callerid = read_env('agi_callerid').to_s.strip
|
203
|
+
if @callerid == "unknown"
|
200
204
|
@callerid = ""
|
201
205
|
@calleridname = ""
|
202
206
|
@calleridnumber = ""
|
207
|
+
elsif Regexp.new(/^\d+\d$/).match(@callerid)
|
208
|
+
@calleridname = ""
|
209
|
+
@calleridnumber = @callerid
|
203
210
|
else
|
204
|
-
|
205
|
-
|
211
|
+
@calleridname = read_env('agi_calleridname')
|
212
|
+
if @calleridname.nil? # for asterisk that don't have agi variable 'agi_calleridname'
|
206
213
|
name = Regexp.new(/\".+\"/).match(@callerid)
|
207
214
|
number = Regexp.new(/\<\d+\>/).match(@callerid)
|
208
215
|
|
@@ -211,7 +218,7 @@ class AsteriskVariable < AGI
|
|
211
218
|
else
|
212
219
|
name = name.to_s
|
213
220
|
name.gsub!(/\"/, '')
|
214
|
-
@calleridname = name.strip
|
221
|
+
@calleridname = name.to_s.strip
|
215
222
|
end
|
216
223
|
|
217
224
|
if number.nil?
|
@@ -220,14 +227,12 @@ class AsteriskVariable < AGI
|
|
220
227
|
number = number.to_s
|
221
228
|
number.sub!(/\</, '')
|
222
229
|
number.sub!(/\>/, '')
|
223
|
-
@calleridnumber = number
|
230
|
+
@calleridnumber = number.to_s.strip
|
224
231
|
end
|
225
232
|
else # for asterisk that have agi variable 'agi_calleridname'
|
226
|
-
@calleridnumber =
|
227
|
-
@calleridname = read_env('calleridname')
|
233
|
+
@calleridnumber = @callerid
|
228
234
|
@callerid = "\"#{@calleridname}\" <#{@calleridnumber}>"
|
229
235
|
end
|
230
236
|
end
|
231
237
|
end
|
232
|
-
|
233
238
|
end
|
data/lib/ruby-agi/command.rb
CHANGED
@@ -651,7 +651,7 @@ class Command < AGI
|
|
651
651
|
|
652
652
|
|
653
653
|
#
|
654
|
-
|
654
|
+
# stream file: Sends audio file on channel
|
655
655
|
# Send the given file, allowing playback to be interrupted by the given digits, if any.
|
656
656
|
# Use double quotes for the digits if you wish none to be permitted.
|
657
657
|
# If sample offset is provided then the audio will seek to sample offset before play starts.
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-agi
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2006-
|
6
|
+
version: 1.1.1
|
7
|
+
date: 2006-02-09 00:00:00 -05:00
|
8
8
|
summary: Ruby Language API for Asterisk
|
9
9
|
require_paths:
|
10
10
|
- lib
|