opensips-mi 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/opensips/mi/command.rb +10 -4
- data/lib/opensips/mi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1831d86726b1bf7da5ceaa0e705cf777dc625a6ceafc471ffb8750f7a2d7a12d
|
4
|
+
data.tar.gz: 2539ab2e197b634e3f5cf8e12c2be1893424cd5352f83dbb24fbbfa9aa58e168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd6db00fc4a17046d69b00f9e7b175d5e045150a3323c091ab14bae26119a6705d4f0004c0b5bf74e8b3d54ecc07ae238a277a08f230b2e1c225fcf265bdef76
|
7
|
+
data.tar.gz: 6dec5be60acacf7648e30b67ad9c2b2e15786390274588554bb7d192e35281421f7e2e1178f9b19e4ea550299081bfb870fd5b3bd245b8ae2e1317f4e7062991
|
data/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
[![Ruby Build](https://github.com/staskobzar/opensips-mi/actions/workflows/main.yml/badge.svg)](https://github.com/staskobzar/opensips-mi/actions/workflows/main.yml)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/staskobzar/opensips-mi.png)](https://codeclimate.com/github/staskobzar/opensips-mi)
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/opensips-mi.
|
6
|
-
[![Coverage Status](https://coveralls.io/repos/staskobzar/opensips-mi/badge.
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/opensips-mi.svg)](https://badge.fury.io/rb/opensips-mi)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/github/staskobzar/opensips-mi/badge.svg?branch=master)](https://coveralls.io/github/staskobzar/opensips-mi?branch=master)
|
7
7
|
|
8
8
|
OpenSIPs management interface library.
|
9
9
|
This library supports following management interfaces OpenSIPs modules:
|
@@ -77,8 +77,8 @@ opensips = Opensips::MI.connect :datagram,
|
|
77
77
|
require 'opensips/mi'
|
78
78
|
opensips = Opensips::MI.connect :fifo,
|
79
79
|
:fifo_name => '/tmp/opensips_fifo',
|
80
|
-
:
|
81
|
-
:
|
80
|
+
:reply_dir => '/tmp',
|
81
|
+
:timeout => 3
|
82
82
|
|
83
83
|
```
|
84
84
|
|
data/lib/opensips/mi/command.rb
CHANGED
@@ -86,14 +86,20 @@ module Opensips
|
|
86
86
|
# Ex.: udp:10.130.8.21:5060
|
87
87
|
# body: (optional, may not be present) request body (if present, requires the "Content-Type"
|
88
88
|
# and "Content-length" headers)
|
89
|
-
def uac_dlg(method, ruri, hdrs, next_hop =
|
89
|
+
def uac_dlg(method, ruri, hdrs, next_hop = nil, socket = nil, body = nil)
|
90
90
|
validate_hf(hdrs)
|
91
91
|
|
92
92
|
headers = hdrs.map { |name, val| "#{name}: #{val}" }.join("\r\n")
|
93
93
|
headers << "\r\n\r\n"
|
94
94
|
|
95
|
-
params =
|
96
|
-
|
95
|
+
params = {
|
96
|
+
"method" => method,
|
97
|
+
"ruri" => ruri,
|
98
|
+
"headers" => headers
|
99
|
+
}
|
100
|
+
params["next_hop"] = next_hop if next_hop
|
101
|
+
params["socket"] = socket if socket
|
102
|
+
params["body"] = body if body
|
97
103
|
command "t_uac_dlg", params
|
98
104
|
end
|
99
105
|
|
@@ -150,7 +156,7 @@ module Opensips
|
|
150
156
|
"Content-Type" => "application/simple-message-summary" }
|
151
157
|
|
152
158
|
body = hbody.map { |k, v| "#{k}: #{v}" }.join("\r\n") << "\r\n\r\n"
|
153
|
-
uac_dlg "NOTIFY", uri, hdrs,
|
159
|
+
uac_dlg "NOTIFY", uri, hdrs, nil, nil, body
|
154
160
|
end
|
155
161
|
|
156
162
|
private
|
data/lib/opensips/mi/version.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stas Kobzar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xmlrpc
|