opensips-mi 0.0.5 → 0.0.6
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.
- checksums.yaml +8 -8
- data/lib/opensips/mi/command.rb +1 -2
- data/lib/opensips/mi/version.rb +1 -1
- data/test/test_command.rb +0 -12
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWU5ZWY5NzUwZDAwZjEyZmNmMDMxYmRlYzE5MDY4YTIzNDY2NzY4Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTc0Y2MwZjI3YmExY2VlZjhiMDVhMjZlMjdhYmMyMjA5YjlmZTYyYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjkxOTI1Mzg4NjQ3N2ExN2M0MjMzMWM4NDZlYzRiNjlmNjY1MTBmZWRiYTE4
|
10
|
+
YzFkMmE0MGYwZWY4MTBlYjRkMjJmMWM2MGZjZmUzNDI0ZTUwNTNkOWE3OWM4
|
11
|
+
ZDZjOGEyYjZiZDFmNTQzZGNmOGFhODYwMGY5M2M3MzdhYTk0ZDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGRiYTdkNGFiYzRkM2Q4MjdlMDU1NWMxZmNkNzFjM2E4ZDRkMjA5MzkwNzk3
|
14
|
+
MGFkODkzYzJjNmE4ZmU2NmFhYjIzZjc3OGM3OTQ0M2NhMjlmM2Q1ZDdmY2Uy
|
15
|
+
MDcxYjA4ZmI4MmQ1NWVkN2U2Y2FjZDkwNzE0OTA0MWY2YTQwMGU=
|
data/lib/opensips/mi/command.rb
CHANGED
@@ -78,7 +78,7 @@ module Opensips
|
|
78
78
|
#
|
79
79
|
def uac_dlg method, ruri, hf, next_hop = ?., socket = ?., body = nil
|
80
80
|
mandatory_hf = Array['To', 'From']
|
81
|
-
mandatory_hf += ['Content-Type'
|
81
|
+
mandatory_hf += ['Content-Type'] unless body.nil?
|
82
82
|
mandatory_hf.map{|h|h.downcase}.each do |n|
|
83
83
|
raise ArgumentError,
|
84
84
|
"Missing mandatory header #{n.capitalize}" unless hf.keys.map{|h| h.downcase}.include?(n)
|
@@ -151,7 +151,6 @@ module Opensips
|
|
151
151
|
'Event' => "message-summary",
|
152
152
|
'Subscription-State'=> "active",
|
153
153
|
'Content-Type' => "application/simple-message-summary",
|
154
|
-
'Content-Length' => mbody.map{|k,v| "#{k}: #{v}"}.join("\r\n").length,
|
155
154
|
'nl' => "",
|
156
155
|
]
|
157
156
|
|
data/lib/opensips/mi/version.rb
CHANGED
data/test/test_command.rb
CHANGED
@@ -36,17 +36,6 @@ describe Command, "commands for transport classes" do
|
|
36
36
|
|
37
37
|
end
|
38
38
|
|
39
|
-
it "must raise when missing body mandatory headers" do
|
40
|
-
mi = init_class_fifo
|
41
|
-
ret = proc {
|
42
|
-
mi.uac_dlg "NOTIFY",
|
43
|
-
"sip:alice@wanderland.com",
|
44
|
-
{"From" => "<sip:opensips>", "To" => "<sip:bob>", "content-type" => "xml"},
|
45
|
-
?., ?., "<body>Hello</body>"
|
46
|
-
}.must_raise ArgumentError
|
47
|
-
ret.message.must_match(/header Content-length/)
|
48
|
-
end
|
49
|
-
|
50
39
|
it "must have good parameters" do
|
51
40
|
mi = init_class_fifo
|
52
41
|
mi.expects(:command).with('t_uac_dlg', [
|
@@ -105,7 +94,6 @@ describe Command, "commands for transport classes" do
|
|
105
94
|
'Event' => 'message-summary',
|
106
95
|
'Subscription-State' => 'active',
|
107
96
|
'Content-Type' => 'application/simple-message-summary',
|
108
|
-
'Content-Length' => 86,
|
109
97
|
'nl' => '',
|
110
98
|
'Messages-Waiting' => 'yes',
|
111
99
|
'Message-Account' => 'sip:*97@asterisk.com',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opensips-mi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stas Kobzar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -111,4 +111,3 @@ test_files:
|
|
111
111
|
- test/test_command.rb
|
112
112
|
- test/test_response.rb
|
113
113
|
- test/test_transport.rb
|
114
|
-
has_rdoc:
|