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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e13c9966a4b4c84d25ec9e900d1b640f3650f6d33989c152070ccd67a707cc51
4
- data.tar.gz: e22c248064c8ae003c45a84dc871d24c4070f01ac1951ffcf7504e2351792cc3
3
+ metadata.gz: 1831d86726b1bf7da5ceaa0e705cf777dc625a6ceafc471ffb8750f7a2d7a12d
4
+ data.tar.gz: 2539ab2e197b634e3f5cf8e12c2be1893424cd5352f83dbb24fbbfa9aa58e168
5
5
  SHA512:
6
- metadata.gz: 77fefce67ccc8ef925daeca1726e8efb22fc1746889108aa6fbbb571f07857b305b9ccf4de62a2cf229481cf7bbf628a5bfc3e5df8a9a04a03bb281fa0667e29
7
- data.tar.gz: 552c0cbfaaf7d5c38bf0a931acd1a05bd6eb5f6649d23175943ca291a19474e62ceaaeb36e74f1d89cb157f2d90aee9d39663e57dcfd40c30d2060e21355f215
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.png)](http://badge.fury.io/rb/opensips-mi)
6
- [![Coverage Status](https://coveralls.io/repos/staskobzar/opensips-mi/badge.png?branch=master)](https://coveralls.io/r/staskobzar/opensips-mi)
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
- :reply_fifo => 'opensips_reply' . $$,
81
- :reply_dir => '/tmp'
80
+ :reply_dir => '/tmp',
81
+ :timeout => 3
82
82
 
83
83
  ```
84
84
 
@@ -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 = ".", socket = ".", body = nil)
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 = [method, ruri, next_hop, socket, headers]
96
- params << body unless body.nil?
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, ".", ".", body
159
+ uac_dlg "NOTIFY", uri, hdrs, nil, nil, body
154
160
  end
155
161
 
156
162
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Opensips
4
4
  module MI
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
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.0
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-08-11 00:00:00.000000000 Z
11
+ date: 2023-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xmlrpc