Sip.js: Unable to unhold call in 9.2.0 through 0.11.1

Created on 28 Mar 2018  ·  12Comments  ·  Source: onsip/SIP.js

This may be related to #514 and this works fine in 0.7.3

When I tell the session to hold everything works fine. The other end hears music (as that's how its setup).

However I don't seem to be able to unhold. I tell the session to unhold and SIP.js acts like it has unheld the call yet the other end is still held and there seems to be no way to unhold the call

when I tell the session to "hold"

Wed Mar 28 2018 13:56:39 GMT-0700 (PDT) | sip.transport | sending WebSocket message:

INVITE sip:127.0.0.1:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;branch=z9hG4bK3369134
Max-Forwards: 70
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
Call-ID: 4v02jm1pg859lh8e2p55
CSeq: 4034 INVITE
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SipJS
Content-Type: application/sdp
Content-Length: 2021

v=0
o=- 8079173116322237565 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE
m=audio 51709 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 myIpAddress
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:4164431658 1 udp 2122260223 10.224.50.20 55981 typ host generation 0 network-id 3 network-cost 50
a=candidate:3805835391 1 udp 2122194687 192.168.0.107 51709 typ host generation 0 network-id 1
a=candidate:2066175263 1 udp 2122126591 2002:8ae5:8e88:1::103 51710 typ host generation 0 network-id 2
a=candidate:3065762778 1 tcp 1518280447 10.224.50.20 9 typ host tcptype active generation 0 network-id 3 network-cost 50
a=candidate:2891680911 1 tcp 1518214911 192.168.0.107 9 typ host tcptype active generation 0 network-id 1
a=candidate:899983855 1 tcp 1518146815 2002:8ae5:8e88:1::103 9 typ host tcptype active generation 0 network-id 2
a=candidate:1670411979 1 udp 1685987071 myIpAddress 51709 typ srflx raddr 192.168.0.107 rport 51709 generation 0 network-id 1
a=ice-ufrag:kMDA
a=ice-pwd:IiOndfoStEhqfYzWZ3CGacxT
a=fingerprint:sha-256 52:B7:FB:7F:D8:DE:72:A8:BB:4D:BF:37:43:93:FD:9E:8B:88:C1:AC:92:16:5C:8A:E0:A0:4C:07:7D:CD:40:69
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:238021649 cname:VlDKI8CAn7VHRtDG
a=ssrc:238021649 msid:HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE c1a03914-6bb8-4e40-8672-995fb3e27993
a=ssrc:238021649 mslabel:HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE
a=ssrc:238021649 label:c1a03914-6bb8-4e40-8672-995fb3e27993


sip-0.9.2.js:807 Wed Mar 28 2018 13:56:40 GMT-0700 (PDT) | sip.transport | received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;rport=56300;received=127.0.0.1;branch=z9hG4bK3369134
Call-ID: 4v02jm1pg859lh8e2p55
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
CSeq: 4034 INVITE
Contact: <sip:127.0.0.1:8089;transport=ws>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub
Server: PBXact-14.0.2.11(13.19.1)
Content-Type: application/sdp
Content-Length:   596

v=0
o=- 3712339069 5 IN IP4 serverIpAddress
s=Asterisk
c=IN IP4 serverIpAddress
t=0 0
m=audio 13160 UDP/TLS/RTP/SAVPF 0 8 126
a=connection:existing
a=setup:active
a=fingerprint:SHA-256 58:EF:21:42:78:C5:B4:9F:0E:93:F8:CB:EB:00:AF:89:4C:AB:C0:EA:26:AA:75:1B:4D:D8:15:04:6A:77:7C:9C
a=ice-ufrag:5b52096f0e8d5cf51a58ab8f61951541
a=ice-pwd:5b9141a6470f97c2425bc0f72dbe5b4f
a=candidate:Hc766ef2b 1 UDP 2130706431 serverIpAddress 13160 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=ptime:20
a=maxptime:150
a=rtcp-mux
a=recvonly


sip-0.9.2.js:807 Wed Mar 28 2018 13:56:40 GMT-0700 (PDT) | sip.transport | sending WebSocket message:

ACK sip:127.0.0.1:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;branch=z9hG4bK5989093
Max-Forwards: 70
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
Call-ID: 4v02jm1pg859lh8e2p55
CSeq: 4034 ACK
Supported: outbound
User-Agent: SipJS
Content-Length: 0



sip-0.9.2.js:807 Wed Mar 28 2018 13:56:40 GMT-0700 (PDT) | sip.invitecontext.sessionDescriptionHandler | stream removed: default

When I tell the session to unhold

Wed Mar 28 2018 13:56:52 GMT-0700 (PDT) | sip.transport | sending WebSocket message:

INVITE sip:127.0.0.1:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;branch=z9hG4bK2539286
Max-Forwards: 70
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
Call-ID: 4v02jm1pg859lh8e2p55
CSeq: 4035 INVITE
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SipJS
Content-Type: application/sdp
Content-Length: 2021

v=0
o=- 8079173116322237565 4 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE
m=audio 51709 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 myIpAddress
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:4164431658 1 udp 2122260223 10.224.50.20 55981 typ host generation 0 network-id 3 network-cost 50
a=candidate:3805835391 1 udp 2122194687 192.168.0.107 51709 typ host generation 0 network-id 1
a=candidate:2066175263 1 udp 2122126591 2002:8ae5:8e88:1::103 51710 typ host generation 0 network-id 2
a=candidate:3065762778 1 tcp 1518280447 10.224.50.20 9 typ host tcptype active generation 0 network-id 3 network-cost 50
a=candidate:2891680911 1 tcp 1518214911 192.168.0.107 9 typ host tcptype active generation 0 network-id 1
a=candidate:899983855 1 tcp 1518146815 2002:8ae5:8e88:1::103 9 typ host tcptype active generation 0 network-id 2
a=candidate:1670411979 1 udp 1685987071 myIpAddress 51709 typ srflx raddr 192.168.0.107 rport 51709 generation 0 network-id 1
a=ice-ufrag:kMDA
a=ice-pwd:IiOndfoStEhqfYzWZ3CGacxT
a=fingerprint:sha-256 52:B7:FB:7F:D8:DE:72:A8:BB:4D:BF:37:43:93:FD:9E:8B:88:C1:AC:92:16:5C:8A:E0:A0:4C:07:7D:CD:40:69
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:238021649 cname:VlDKI8CAn7VHRtDG
a=ssrc:238021649 msid:HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE c1a03914-6bb8-4e40-8672-995fb3e27993
a=ssrc:238021649 mslabel:HHp6rFldE8spr4aQmJuLknxkz9ZIgN8Q6XNE
a=ssrc:238021649 label:c1a03914-6bb8-4e40-8672-995fb3e27993


sip-0.9.2.js:807 Wed Mar 28 2018 13:56:52 GMT-0700 (PDT) | sip.transport | received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;rport=56300;received=127.0.0.1;branch=z9hG4bK2539286
Call-ID: 4v02jm1pg859lh8e2p55
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
CSeq: 4035 INVITE
Contact: <sip:127.0.0.1:8089;transport=ws>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub
Server: PBXact-14.0.2.11(13.19.1)
Content-Type: application/sdp
Content-Length:   591

v=0
o=- 3712339069 6 IN IP4 serverIpAddress
s=Asterisk
c=IN IP4 serverIpAddress
t=0 0
m=audio 13160 UDP/TLS/RTP/SAVPF 0 8 126
a=connection:new
a=setup:active
a=fingerprint:SHA-256 58:EF:21:42:78:C5:B4:9F:0E:93:F8:CB:EB:00:AF:89:4C:AB:C0:EA:26:AA:75:1B:4D:D8:15:04:6A:77:7C:9C
a=ice-ufrag:5b52096f0e8d5cf51a58ab8f61951541
a=ice-pwd:5b9141a6470f97c2425bc0f72dbe5b4f
a=candidate:Hc766ef2b 1 UDP 2130706431 serverIpAddress 13160 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=ptime:20
a=maxptime:150
a=rtcp-mux
a=recvonly


sip-0.9.2.js:807 Wed Mar 28 2018 13:56:52 GMT-0700 (PDT) | sip.transport | sending WebSocket message:

ACK sip:127.0.0.1:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS e5j1m5vhpb1g.invalid;branch=z9hG4bK3270851
Max-Forwards: 70
To: <sip:19512594723@myHostName>;tag=e2c04da9-2c6e-42c5-aabf-d4d1bb2cbb04
From: "Testing" <sip:904012@myHostName>;tag=9ridgtn27i
Call-ID: 4v02jm1pg859lh8e2p55
CSeq: 4035 ACK
Supported: outbound
User-Agent: SipJS
Content-Length: 0
Session Description Handler bug

Most helpful comment

So I was able to fix this through a hack.

I simply took what SIP.js was doing to hold a call and reversed it through a modifier on the unhold method and it works.

Those modifiers are pretty awesome.

If this needs a real fix I can do a PR no problem.

var inviteOptions = {
  inviteWithoutSdp: false //I know its default false but this is for debugging
}
session.unhold(inviteOptions, [
    function(description) {
        if (!/a=(sendrecv|sendonly|recvonly|inactive)/.test(description.sdp)) {
            description.sdp = description.sdp.replace(/(m=[^\r]*\r\n)/g, '$1a=sendrecv\r\n');
        } else {
            description.sdp = description.sdp.replace(/a=sendonly\r\n/g, 'a=sendrecv\r\n');
            description.sdp = description.sdp.replace(/a=recvonly\r\n/g, 'a=sendrecv\r\n');
        }
        return SIP.Utils.Promise.resolve(description);
    }
])

All 12 comments

So I was able to fix this through a hack.

I simply took what SIP.js was doing to hold a call and reversed it through a modifier on the unhold method and it works.

Those modifiers are pretty awesome.

If this needs a real fix I can do a PR no problem.

var inviteOptions = {
  inviteWithoutSdp: false //I know its default false but this is for debugging
}
session.unhold(inviteOptions, [
    function(description) {
        if (!/a=(sendrecv|sendonly|recvonly|inactive)/.test(description.sdp)) {
            description.sdp = description.sdp.replace(/(m=[^\r]*\r\n)/g, '$1a=sendrecv\r\n');
        } else {
            description.sdp = description.sdp.replace(/a=sendonly\r\n/g, 'a=sendrecv\r\n');
            description.sdp = description.sdp.replace(/a=recvonly\r\n/g, 'a=sendrecv\r\n');
        }
        return SIP.Utils.Promise.resolve(description);
    }
])

@tm1000 What browser and version are you running? Can you provide more complete SIP.js logs?

Wed Jun 06 2018 17:08:14 GMT+0600 (+06) | sip.invitecontext.mediahandler | already have local media src/ui-scroll.js:72248:3
Wed Jun 06 2018 17:08:14 GMT+0600 (+06) | sip.transport | sending WebSocket message:
INVITE sip:10.0.0.114:54648;transport=wss SIP/2.0
Via: SIP/2.0/TCP 57r77gsvve40.invalid;branch=z9hG4bK3816437
Max-Forwards: 70
To: ;tag=0f1bc3ef-4635-4146-a90a-3c096818adcf

From: ;tag=f8diago72o

Call-ID: l8miallcfpc3vqmd6tmn

CSeq: 5848 INVITE

Contact:

Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER

Supported: outbound

User-Agent: SIP.js/0.7.8

Content-Type: application/sdp

Content-Length: 3038

v=0

o=mozilla...THIS_IS_SDPARTA-60.0.1 4321317267883975995 2 IN IP4 0.0.0.0

s=-

t=0 0

a=sendrecv

a=fingerprint:sha-256 D4:B7:11:FC:58:D7:76:30:EA:05:5B:9B:BF:F5:E5:59:A9:65:0B:7B:75:E7:1B:FF:40:8C:7B:87:CD:C7:A8:3C

a=ice-options:trickle

a=msid-semantic:WMS *

m=audio 53619 UDP/TLS/RTP/SAVPF 0 101 109 8 9

c=IN IP4 10.0.0.114

a=candidate:0 1 UDP 2122252543 10.0.0.114 53619 typ host

a=candidate:1 1 UDP 2122187007 10.0.0.85 52082 typ host

a=candidate:2 1 UDP 2121924863 172.22.0.1 50467 typ host

a=candidate:3 1 UDP 2121859327 172.19.0.1 48197 typ host

a=candidate:4 1 UDP 2122121471 172.18.0.1 34879 typ host

a=candidate:5 1 UDP 2121793791 172.17.0.1 34386 typ host

a=candidate:6 1 UDP 2122055935 172.21.0.1 56323 typ host

a=candidate:7 1 UDP 2121990399 172.20.0.1 48083 typ host

a=candidate:8 1 TCP 2105524479 10.0.0.114 9 typ host tcptype active

a=candidate:9 1 TCP 2105458943 10.0.0.85 9 typ host tcptype active

a=candidate:10 1 TCP 2105196799 172.22.0.1 9 typ host tcptype active

a=candidate:11 1 TCP 2105131263 172.19.0.1 9 typ host tcptype active

a=candidate:12 1 TCP 2105393407 172.18.0.1 9 typ host tcptype active

a=candidate:13 1 TCP 2105065727 172.17.0.1 9 typ host tcptype active

a=candidate:14 1 TCP 2105327871 172.21.0.1 9 typ host tcptype active

a=candidate:15 1 TCP 2105262335 172.20.0.1 9 typ host tcptype active

a=candidate:0 2 UDP 2122252542 10.0.0.114 36547 typ host

a=candidate:1 2 UDP 2122187006 10.0.0.85 35253 typ host

a=candidate:2 2 UDP 2121924862 172.22.0.1 37062 typ host

a=candidate:3 2 UDP 2121859326 172.19.0.1 57339 typ host

a=candidate:4 2 UDP 2122121470 172.18.0.1 35715 typ host

a=candidate:5 2 UDP 2121793790 172.17.0.1 53583 typ host

a=candidate:6 2 UDP 2122055934 172.21.0.1 45269 typ host

a=candidate:7 2 UDP 2121990398 172.20.0.1 34890 typ host

a=candidate:8 2 TCP 2105524478 10.0.0.114 9 typ host tcptype active

a=candidate:9 2 TCP 2105458942 10.0.0.85 9 typ host tcptype active

a=candidate:10 2 TCP 2105196798 172.22.0.1 9 typ host tcptype active

a=candidate:11 2 TCP 2105131262 172.19.0.1 9 typ host tcptype active

a=candidate:12 2 TCP 2105393406 172.18.0.1 9 typ host tcptype active

a=candidate:13 2 TCP 2105065726 172.17.0.1 9 typ host tcptype active

a=candidate:14 2 TCP 2105327870 172.21.0.1 9 typ host tcptype active

a=candidate:15 2 TCP 2105262334 172.20.0.1 9 typ host tcptype active

a=sendrecv

a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level

a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid

a=fmtp:101 0-15

a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1

a=ice-pwd:4847d16509ff0bad0258fe88c7e8027b

a=ice-ufrag:1509ee49

a=msid:{9222a09a-290b-4296-a352-61b33356a21e} {8f372f15-40a2-4585-a007-3cecf53a0410}

a=rtcp:36547 IN IP4 10.0.0.114

a=rtcp-mux

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=rtpmap:109 opus/48000/2

a=rtpmap:8 PCMA/8000

a=rtpmap:9 G722/8000/1

a=setup:actpass

a=ssrc:3783163129 cname:{ad2212d6-10b6-41a8-843e-98af78759904}

src/ui-scroll.js:72248:3
Wed Jun 06 2018 17:08:14 GMT+0600 (+06) | sip.transport | received WebSocket text message:

SIP/2.0 200 OK

Via: SIP/2.0/TCP 57r77gsvve40.invalid;rport=54648;received=10.0.0.114;branch=z9hG4bK3816437

Call-ID: l8miallcfpc3vqmd6tmn

From: ;tag=f8diago72o

To: ;tag=0f1bc3ef-4635-4146-a90a-3c096818adcf

CSeq: 5848 INVITE

Contact:

Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE

Supported: 100rel, timer, replaces, norefersub

Server: Asterisk PBX certified/13.8-cert4

Content-Type: application/sdp

Content-Length: 1510

v=0

o=- 3925632315 4 IN IP4 10.0.0.114

s=Asterisk

c=IN IP4 10.0.0.114

t=0 0

m=audio 7704 UDP/TLS/RTP/SAVPF 0 101

a=connection:new

a=setup:active

a=fingerprint:SHA-256 10:BE:30:DF:76:3A:E5:AC:A9:CA:FE:2D:8F:73:82:BA:39:07:8A:1E:FB:78:61:EC:3D:6E:FF:5D:5A:93:D7:D1

a=ice-ufrag:6716eee22f965b402cddee3948775140

a=ice-pwd:74789484745808414976db4563995d8a

a=candidate:Ha000072 1 UDP 2130706431 10.0.0.114 7704 typ host

a=candidate:Ha000055 1 UDP 2130706431 10.0.0.85 7704 typ host

a=candidate:Hac160001 1 UDP 2130706431 172.22.0.1 7704 typ host

a=candidate:Hac130001 1 UDP 2130706431 172.19.0.1 7704 typ host

a=candidate:Hac120001 1 UDP 2130706431 172.18.0.1 7704 typ host

a=candidate:Hac110001 1 UDP 2130706431 172.17.0.1 7704 typ host

a=candidate:Hac150001 1 UDP 2130706431 172.21.0.1 7704 typ host

a=candidate:Hac140001 1 UDP 2130706431 172.20.0.1 7704 typ host

a=candidate:Ha000072 2 UDP 2130706430 10.0.0.114 7705 typ host

a=candidate:Ha000055 2 UDP 2130706430 10.0.0.85 7705 typ host

a=candidate:Hac160001 2 UDP 2130706430 172.22.0.1 7705 typ host

a=candidate:Hac130001 2 UDP 2130706430 172.19.0.1 7705 typ host

a=candidate:Hac120001 2 UDP 2130706430 172.18.0.1 7705 typ host

a=candidate:Hac110001 2 UDP 2130706430 172.17.0.1 7705 typ host

a=candidate:Hac150001 2 UDP 2130706430 172.21.0.1 7705 typ host

a=candidate:Hac140001 2 UDP 2130706430 172.20.0.1 7705 typ host

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

a=maxptime:150

a=sendrecv

src/ui-scroll.js:72248:3
Wed Jun 06 2018 17:08:14 GMT+0600 (+06) | sip.transport | sending WebSocket message:

ACK sip:10.0.0.114:54648;transport=wss SIP/2.0

Via: SIP/2.0/TCP 57r77gsvve40.invalid;branch=z9hG4bK1290453

Max-Forwards: 70

To: ;tag=0f1bc3ef-4635-4146-a90a-3c096818adcf

From: ;tag=f8diago72o

Call-ID: l8miallcfpc3vqmd6tmn

CSeq: 5848 ACK

Supported: outbound

User-Agent: SIP.js/0.7.8

Content-Length: 0

src/ui-scroll.js:72248:3

@engineermusleh please update to a newer version of SIP.js. We are no longer supporting 0.7.8.

@engineermusleh I can't work here. Below is the Unhold log
(After Unhold, the other side cannot hear my voice. The other side hears noise. I can hear the other side's voice)

`sip-0.9.2.js:807 Wed Jul 11 2018 20:35:30 GMT+0800 (中国标准时间) | sip.simple | Unmuting Audio
call.js:132 unmute
Simple {video: false, audio: true, options: {…}, ua: UA, state: 3, …}
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:30 GMT+0800 (中国标准时间) | sip.simple | Placing call off hold
sip-0.9.2.js:807
RTCSessionDescription {type: "offer", sdp: "v=0
↵o=- 4860273749047556562 10 IN IP4 127.0.0.1
↵…9471 label:5bca06f9-69a9-4b7e-8790-528381f887c4
↵"}
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.transport | sending WebSocket message:

INVITE sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/WSS j8rc9aea3229.invalid;branch=z9hG4bK1964197
Max-Forwards: 70
To: ;tag=3yB2y190e6XDp
From: "aaa" ;tag=2hqlskliv0
Call-ID: 0v34q5nct4l7mnvmk68c
CSeq: 1774 INVITE
Contact:
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SIP.js/0.9.2
Content-Type: application/sdp
Content-Length: 1360

v=0
o=- 4860273749047556562 10 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS RK0MphPXuDE7kptUfJU3jcg7r1D8LWE3o1pw
m=audio 64360 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 192.168.1.182
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:702335762 1 udp 2113937151 192.168.1.182 64360 typ host generation 0 network-cost 50
a=ice-ufrag:16pM
a=ice-pwd:dzob+lmjkjUFYRXJZckdPXa2
a=ice-options:trickle
a=fingerprint:sha-256 40:C7:ED:A5:5C:B7:5B:66:6A:C1:D3:42:7D:EF:9C:61:E4:DC:64:77:BC:19:B4:52:59:82:B4:FC:05:AD:F5:C9
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2493239471 cname:8s7Eng8xUFGXFawy
a=ssrc:2493239471 msid:RK0MphPXuDE7kptUfJU3jcg7r1D8LWE3o1pw 5bca06f9-69a9-4b7e-8790-528381f887c4
a=ssrc:2493239471 mslabel:RK0MphPXuDE7kptUfJU3jcg7r1D8LWE3o1pw
a=ssrc:2493239471 label:5bca06f9-69a9-4b7e-8790-528381f887c4

sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.transport | received WebSocket text message:

SIP/2.0 100 Trying
Via: SIP/2.0/WSS j8rc9aea3229.invalid;branch=z9hG4bK1964197;received=171.217.52.129;rport=54816
From: "aaa" ;tag=2hqlskliv0
To: ;tag=3yB2y190e6XDp
Call-ID: 0v34q5nct4l7mnvmk68c
CSeq: 1774 INVITE
User-Agent: Ecall/huaqiweb.com
Content-Length: 0

sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.transport | received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WSS j8rc9aea3229.invalid;branch=z9hG4bK1964197;received=171.217.52.129;rport=54816
From: "aaa" ;tag=2hqlskliv0
To: ;tag=3yB2y190e6XDp
Call-ID: 0v34q5nct4l7mnvmk68c
CSeq: 1774 INVITE
Contact:
User-Agent: Ecall/huaqiweb.com
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 836

v=0
o=FreeSWITCH 1531287273 1531287282 IN IP4 47.106.214.87
s=FreeSWITCH
c=IN IP4 47.106.214.87
t=0 0
a=msid-semantic: WMS JB9n30DDcDeL5OnK6VgdF9d0Uezsrl60
m=audio 24952 UDP/TLS/RTP/SAVPF 0 126
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=ptime:20
a=fingerprint:sha-256 BB:09:7D:03:2A:9F:38:DA:E8:8D:50:64:1C:4D:B9:CC:4F:51:67:36:EA:8F:2D:70:63:1D:A5:61:1B:31:0D:63
a=setup:active
a=rtcp-mux
a=rtcp:24952 IN IP4 47.106.214.87
a=ice-ufrag:APU5PYWz3lRkxObb
a=ice-pwd:KgIxOJmRPOQzspgS51OKPA9I
a=candidate:2464900823 1 udp 659136 47.106.214.87 24952 typ host generation 0
a=end-of-candidates
a=ssrc:390836417 cname:N6eHWIbZcfB8UOJR
a=ssrc:390836417 msid:JB9n30DDcDeL5OnK6VgdF9d0Uezsrl60 a0
a=ssrc:390836417 mslabel:JB9n30DDcDeL5OnK6VgdF9d0Uezsrl60
a=ssrc:390836417 label:JB9n30DDcDeL5OnK6VgdF9d0Uezsrl60a0

sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.transport | sending WebSocket message:

ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/WSS j8rc9aea3229.invalid;branch=z9hG4bK2117054
Max-Forwards: 70
To: ;tag=3yB2y190e6XDp
From: "aaa" ;tag=2hqlskliv0
Call-ID: 0v34q5nct4l7mnvmk68c
CSeq: 1774 ACK
Supported: outbound
User-Agent: SIP.js/0.9.2
Content-Length: 0

sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.invitecontext.sessionDescriptionHandler | Using deprecated stream API
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.invitecontext.sessionDescriptionHandler | stream added
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.simple | A stream has been added, trigger new remoteMedia setup
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.invitecontext.sessionDescriptionHandler | track added
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.simple | A track has been added, triggering new remoteMedia setup
sip-0.9.2.js:807 Wed Jul 11 2018 20:35:31 GMT+0800 (中国标准时间) | sip.simple | play was rejected`

@egreenmachine this is still an issue in 0.11.1 and I can't give you logs because when I "unhold" sipjs does nothing. There is nothing logged because it does nothing. If I run hold again it says "Session is already on hold, cannot put it on hold again"

When I mutate the session it's correctly unheld and held:

session.unhold(inviteOptions, [
          function(description) {
            if (!/a=(sendrecv|sendonly|recvonly|inactive)/.test(description.sdp)) {
              description.sdp = description.sdp.replace(/(m=[^\r]*\r\n)/g, '$1a=sendrecv\r\n');
            } else {
              description.sdp = description.sdp.replace(/a=sendonly\r\n/g, 'a=sendrecv\r\n');
              description.sdp = description.sdp.replace(/a=recvonly\r\n/g, 'a=sendrecv\r\n');
            }
            return SIP.Utils.Promise.resolve(description);
          }
        ])

Calling "hold" without mutation

Wed Jul 11 2018 11:14:20 GMT-0700 (PDT) | sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: complete sip-0.11.1.js:586:5
Wed Jul 11 2018 11:14:20 GMT-0700 (PDT) | sip.transport | sending WebSocket message:
INVITE sip:10.195.3.21:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS 7is445l2noqp.invalid;branch=z9hG4bK967409
Max-Forwards: 70
To: <sip:*[email protected]>;tag=8e3e3961-baf3-4d13-986c-5e7985ff8d27
From: "Test" <sip:[email protected]>;tag=65crqtr0oi
Call-ID: on5sr31c1pgo8b147jsv
CSeq: 6182 INVITE
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Contact: <sip:[email protected];transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: 100rel, outbound
User-Agent: Zulu
Content-Type: application/sdp
Content-Length: 1536

v=0
o=mozilla...THIS_IS_SDPARTA-62.0 4829589672524069622 1 IN IP4 0.0.0.0
s=-
t=0 0
a=sendonly
a=fingerprint:sha-256 85:58:60:5C:C8:D6:0E:0A:65:AB:39:1F:6F:99:3E:5B:07:3A:C7:44:8A:B1:D0:88:21:36:74:01:A2:0F:6B:4B
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 61164 UDP/TLS/RTP/SAVPF 0 8 101 9 109
c=IN IP4 <personal address?
a=candidate:0 1 UDP 2122187007 192.168.0.111 61164 typ host
a=candidate:2 1 UDP 2122252543 2002:8ae5:8e88:1::102 61165 typ host
a=candidate:4 1 UDP 2122121471 10.224.50.12 57005 typ host
a=candidate:6 1 TCP 2105458943 192.168.0.111 9 typ host tcptype active
a=candidate:7 1 TCP 2105524479 2002:8ae5:8e88:1::102 9 typ host tcptype active
a=candidate:8 1 TCP 2105393407 10.224.50.12 9 typ host tcptype active
a=candidate:1 1 UDP 1685987327 <personal address> 61164 typ srflx raddr 192.168.0.111 rport 61164
a=sendonly
a=end-of-candidates
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:101 0-15
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=ice-pwd:bf67e649ec125ede683738f92e42abd7
a=ice-ufrag:a8697f71
a=msid:{732eb3d7-061c-a746-a2f6-ee34c8828a66} {f3a0f9ea-75ac-b146-847b-3d6b07f195f4}
a=rtcp:56604 IN IP4 138.229.142.136
a=rtcp-mux
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=rtpmap:9 G722/8000/1
a=rtpmap:109 opus/48000/2
a=setup:actpass
a=ssrc:3712086669 cname:{84be1675-f8ee-1d46-860f-303693bf29db}

sip-0.11.1.js:586:5
Wed Jul 11 2018 11:14:20 GMT-0700 (PDT) | sip.transport | received WebSocket text message:
SIP/2.0 200 OK
Via: SIP/2.0/WSS 7is445l2noqp.invalid;rport=63064;received=10.224.50.12;branch=z9hG4bK967409
Call-ID: on5sr31c1pgo8b147jsv
From: "Test" <sip:[email protected]>;tag=65crqtr0oi
To: <sip:*[email protected]>;tag=8e3e3961-baf3-4d13-986c-5e7985ff8d27
CSeq: 6182 INVITE
Contact: <sip:10.195.3.21:8089;transport=ws>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Server: FPBX-15.0.1alpha2(15.4.0)
Content-Type: application/sdp
Content-Length:  1038

v=0
o=- 162609910 3 IN IP4 10.195.3.21
s=Asterisk
c=IN IP4 10.195.3.21
t=0 0
m=audio 14810 UDP/TLS/RTP/SAVPF 0 8 101
a=connection:existing
a=setup:active
a=fingerprint:SHA-256 FD:C3:E6:E9:78:D9:F1:D7:CE:95:C8:86:F2:11:D4:6C:E9:2C:E7:61:3D:23:4F:B2:5A:99:40:C7:13:F8:FA:AC
a=ice-ufrag:224be45915ad5a080251075f3ce9bfef
a=ice-pwd:1876789e06e8b7a0262bb7463410a939
a=candidate:H82598fb9 1 UDP 2130706431 fe80::250:56ff:feb4:f072 14810 typ host
a=candidate:H4a2a2644 1 UDP 2130706431 fe80::42:44ff:fed4:2926 14810 typ host
a=candidate:H983a67bf 1 UDP 2130706431 fe80::5cd2:4fff:fe14:555e 14810 typ host
a=candidate:H61d80a8c 1 UDP 2130706431 fe80::646d:a4ff:fea6:9f37 14810 typ host
a=candidate:Hac30315 1 UDP 2130706431 10.195.3.21 14810 typ host
a=candidate:Hac110001 1 UDP 2130706431 172.17.0.1 14810 typ host
a=candidate:Hac120001 1 UDP 2130706431 172.18.0.1 14810 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=rtcp-mux
a=recvonly

sip-0.11.1.js:586:5
Wed Jul 11 2018 11:14:20 GMT-0700 (PDT) | sip.transport | sending WebSocket message:
ACK sip:10.195.3.21:8089;transport=ws SIP/2.0
Via: SIP/2.0/WSS 7is445l2noqp.invalid;branch=z9hG4bK2454305
Max-Forwards: 70
To: <sip:*[email protected]>;tag=8e3e3961-baf3-4d13-986c-5e7985ff8d27
From: "Test" <sip:[email protected]>;tag=65crqtr0oi
Call-ID: on5sr31c1pgo8b147jsv
CSeq: 6182 ACK
Supported: 100rel, outbound
User-Agent: Zulu
Content-Length: 0

Calling unhold without mutation

there are no logs

I am not able to reproduce this in Firefox 61. Can you provide some instructions about what you are doing to cause this? Firefox 61 is working as expected for us.

Are you connecting to an asterisk server?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Eric Green notifications@github.com
Sent: Wednesday, July 11, 2018 1:54:38 PM
To: onsip/SIP.js
Cc: Andrew Nagy; Mention
Subject: Re: [onsip/SIP.js] Unable to unhold call in 9.2.0 through 0.11.1 (#543)

I am not able to reproduce this in Firefox 61. Can you provide some instructions about what you are doing to cause this? Firefox 61 is working as expected for us.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/onsip/SIP.js/issues/543#issuecomment-404306050, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAicIPtU8Z10WC4mPOXrn4iQshvBDzwlks5uFmYOgaJpZM4S_W65.

No. We only support Asterisk to extent of our guide. Generally, we test against the OnSIP platform where hold/unhold is working with SIP.js flawlessly.

I need full SIP.js logs of it not working. Not just the SIP messages. You can remove any passwords or IP addresses.

@seanbright pointed out to me that it was my code causing this.

I had set

var inviteOptions = {
  inviteWithoutSdp: false
}

I don't know why I thought this was correct. Obviously I wasn't sending SDP so the library couldn't do anything with it. Argh.

Dumb move of the day. Thanks @seanbright for taking two hours out of your day to randomly debug this for me, without me even asking

@tm1000 Are you saying that sending the options 'inviteWithoutSdp: false' is what fixed it or what broke it? I am having the same problem, however it would seem that 'inviteWithoutSdp: false' is the default - as stated in the docs.

@Ethergeist I just removed setting it all together.

Was this page helpful?
0 / 5 - 0 ratings