@babblevoice/babble-drachtio-callmanager 1.6.0 → 1.6.1

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.
Files changed (2) hide show
  1. package/lib/call.js +9 -2
  2. package/package.json +1 -1
package/lib/call.js CHANGED
@@ -1756,7 +1756,14 @@ class call {
1756
1756
  let sdp = sdpgen.create( req.msg.body )
1757
1757
  let media = sdp.getmedia()
1758
1758
 
1759
- if( ( "inactive" === media.direction || "0.0.0.0" === sdp.sdp.connection.ip ) && !this.state.held ) {
1759
+ let ip
1760
+ if( sdp && sdp && sdp.sdp.connection && sdp.sdp.connection.ip ) {
1761
+ ip = sdp.sdp.connection.ip
1762
+ }
1763
+
1764
+ /* this was tested against jssip - which I don't think is correct. It was sending us
1765
+ sendonly when placing the call on hold. It didn't change the connection IP (although it did set the rtcp connection ip to 0.0.0.0!). */
1766
+ if( ( "inactive" === media.direction || "sendonly" === media.direction || "0.0.0.0" === ip ) && !this.state.held ) {
1760
1767
  this._hold()
1761
1768
  res.send( 200, {
1762
1769
  "headers": {
@@ -1767,7 +1774,7 @@ class call {
1767
1774
  },
1768
1775
  "body": this.sdp.local.toString()
1769
1776
  } )
1770
- } else if( "inactive" !== media.direction && "0.0.0.0" !== sdp.sdp.connection.ip && this.state.held ) {
1777
+ } else if( "inactive" !== media.direction && "sendonly" !== media.direction && "0.0.0.0" !== ip && this.state.held ) {
1771
1778
  this._unhold()
1772
1779
  res.send( 200, {
1773
1780
  "headers": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/babble-drachtio-callmanager",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Call processing to create a PBX",
5
5
  "main": "index.js",
6
6
  "scripts": {