Unable to put call on hold. (JsSip)

Hello,

We are having problem implementing session.hold().

JsSip version 3.3.11

Asterisk 16 (chan_sip)

Options, Audio only.

Case 1:

Hold initiated from local WebRTC client like: session.hold({ useUpdate: false });

Problem: Local WebRTC client is set on hold (stops sending audio) but still receives audio from remote peer (hard phone).

Case 2:

Hold initiated from local WebRTC client like: session.hold({ useUpdate: true });

Problem: Call immediately dropped (Terminated)

Info:

If hold is initiated from remote (hard phone) then it behaves as it should. (We hear music on hold on WebRTC client and no audio both parties)

Thank you!

Case 1 log

JsSIP:RTCSession hold() +10s jssip-3.3.11.js:26426:11
JsSIP:RTCSession session onhold +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "hold" +0ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendReinvite() +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession createLocalDescription() +3ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "sdp" +4ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession mangleOffer() | me on hold, mangling offer +2ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "sdp" +2ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendRequest() +2ms jssip-3.3.11.js:26426:11
JsSIP:Transport send() +6s jssip-3.3.11.js:26426:11
JsSIP:Transport sending message:

INVITE sip:Ervin@192.168.199.221:5060;transport=ws SIP/2.0

Via: SIP/2.0/WSS h691esb5gctq.invalid;branch=z9hG4bK4758432

Max-Forwards: 69

To: <sip:Ervin@192.168.199.221>;tag=as504f93e7

From: "TraLaLa" <sip:4girk0kl@h691esb5gctq.invalid;transport=ws>;tag=otr643i56e

Call-ID: 61206d02642728f029be447e46f4e978@192.168.199.221:5060

CSeq: 7329 INVITE

Contact: <sip:4girk0kl@h691esb5gctq.invalid;transport=ws>

Content-Type: application/sdp

Session-Expires: 90;refresher=uac

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

Supported: timer,ice,replaces,outbound

User-Agent: JsSIP 3.3.11

Content-Length: 1275



v=0

o=mozilla...THIS_IS_SDPARTA-71.0 5351068468336062115 1 IN IP4 0.0.0.0

s=-

t=0 0

a=sendrecv

a=fingerprint:sha-256 4B:81:66:81:D1:29:16:C1:B7:17:3B:18:BC:41:12:56:F7:56:F9:08:A2:9C:03:3D:BA:B2:6E:4E:BC:F9:F4:58

a=ice-options:trickle

a=msid-semantic: WMS *

a=group:BUNDLE 0

m=audio 55980 RTP/SAVPF 0 107 8 101 9

c=IN IP4 192.168.56.1

a=rtpmap:0 PCMU/8000

a=rtpmap:107 opus/48000/2

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=rtpmap:9 G722/8000/1

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

a=fmtp:101 0-15

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=setup:actpass

a=mid:0

a=msid:{1d2f7146-a4f9-4235-b2cb-fc35402adc04} {6aac99e6-2aed-46ba-a2a6-b3d45a3874bc}

a=sendonly

a=ice-ufrag:f2ab9389

a=ice-pwd:57f56f97eedd78bfcfbda84c3dfeb077

a=candidate:0 1 UDP 2122252543 192.168.56.1 55980 typ host

a=candidate:1 1 UDP 2122187007 192.168.199.182 55981 typ host

a=candidate:2 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

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

a=end-of-candidates

a=ssrc:1540844468 cname:{818565c4-338e-4f9a-82f9-9cb7d2e8f7b6}

a=rtcp-mux


 +1ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface send() +6s jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface received WebSocket message +6ms jssip-3.3.11.js:26426:11
JsSIP:Transport received text message:

SIP/2.0 100 Trying

Via: SIP/2.0/WSS h691esb5gctq.invalid;branch=z9hG4bK4758432;received=192.168.199.182;rport=56725

From: "TraLaLa" <sip:4girk0kl@h691esb5gctq.invalid;transport=ws>;tag=otr643i56e

To: <sip:Ervin@192.168.199.221>;tag=as504f93e7

Call-ID: 61206d02642728f029be447e46f4e978@192.168.199.221:5060

CSeq: 7329 INVITE

Server: Asterisk PBX 16.6.2

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

Supported: replaces, timer

Session-Expires: 90;refresher=uac

Contact: <sip:Ervin@192.168.199.221:5060;transport=ws>

Content-Length: 0




 +8ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface received WebSocket message +6ms jssip-3.3.11.js:26426:11
JsSIP:Transport received text message:

SIP/2.0 200 OK

Via: SIP/2.0/WSS h691esb5gctq.invalid;branch=z9hG4bK4758432;received=192.168.199.182;rport=56725

From: "TraLaLa" <sip:4girk0kl@h691esb5gctq.invalid;transport=ws>;tag=otr643i56e

To: <sip:Ervin@192.168.199.221>;tag=as504f93e7

Call-ID: 61206d02642728f029be447e46f4e978@192.168.199.221:5060

CSeq: 7329 INVITE

Server: Asterisk PBX 16.6.2

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

Supported: replaces, timer

Session-Expires: 90;refresher=uac

Contact: <sip:Ervin@192.168.199.221:5060;transport=ws>

Content-Type: application/sdp

Require: timer

Content-Length: 766



v=0

o=root 1470857469 1470857470 IN IP4 192.168.199.221

s=Asterisk PBX 16.6.2

c=IN IP4 192.168.199.221

t=0 0

m=audio 16036 RTP/SAVPF 0 107 8 3 101

a=rtpmap:0 PCMU/8000

a=rtpmap:107 opus/48000/2

a=fmtp:107 useinbandfec=1

a=rtpmap:8 PCMA/8000

a=rtpmap:3 GSM/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

a=maxptime:20

a=ice-ufrag:1ebc6e38065c31052668527e597d0714

a=ice-pwd:3fae5a8d648c560d46bbc1683fd57c1a

a=candidate:Hc0a8c7dd 1 UDP 2130706431 192.168.199.221 16036 typ host

a=candidate:Hc0a8c7dd 2 UDP 2130706430 192.168.199.221 16037 typ host

a=connection:existing

a=setup:passive

a=fingerprint:SHA-256 05:EF:8B:AE:1D:B7:1E:44:E2:60:C5:F5:DB:A8:9F:05:3C:AA:65:C0:28:ED:97:0B:5C:6F:C5:FF:F9:3A:1C:97

a=rtcp-mux

a=sendrecv


 +6ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendRequest() +27ms jssip-3.3.11.js:26426:11
JsSIP:Transport send() +13ms jssip-3.3.11.js:26426:11
JsSIP:Transport sending message:

ACK sip:Ervin@192.168.199.221:5060;transport=ws SIP/2.0

Via: SIP/2.0/WSS h691esb5gctq.invalid;branch=z9hG4bK6595611

Max-Forwards: 69

To: <sip:Ervin@192.168.199.221>;tag=as504f93e7

From: "TraLaLa" <sip:4girk0kl@h691esb5gctq.invalid;transport=ws>;tag=otr643i56e

Call-ID: 61206d02642728f029be447e46f4e978@192.168.199.221:5060

CSeq: 7329 ACK

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

Supported: outbound

User-Agent: JsSIP 3.3.11

Content-Length: 0




 +1ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface send() +16ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "sdp" +6ms jssip-3.3.11.js:26426:11

Case 2 log

JsSIP:RTCSession hold() +5s jssip-3.3.11.js:26426:11
JsSIP:RTCSession session onhold +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "hold" +2ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendUpdate() +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession createLocalDescription() +4ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "sdp" +3ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession mangleOffer() | me on hold, mangling offer +5ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "sdp" +3ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendRequest() +0ms jssip-3.3.11.js:26426:11
JsSIP:Transport send() +5s jssip-3.3.11.js:26426:11
JsSIP:Transport sending message:

UPDATE sip:Ervin@192.168.199.221:5060;transport=ws SIP/2.0

Via: SIP/2.0/WSS i43rthfv1p36.invalid;branch=z9hG4bK5311788

Max-Forwards: 69

To: <sip:Ervin@192.168.199.221>;tag=as3021b8dd

From: "TraLaLa" <sip:60f84rbm@i43rthfv1p36.invalid;transport=ws>;tag=l8pp4l49nu

Call-ID: 305d7f38311e0ec97885852d05c36633@192.168.199.221:5060

CSeq: 2859 UPDATE

Contact: <sip:60f84rbm@i43rthfv1p36.invalid;transport=ws>

Session-Expires: 90;refresher=uac

Content-Type: application/sdp

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

Supported: timer,ice,outbound

User-Agent: JsSIP 3.3.11

Content-Length: 1275



v=0

o=mozilla...THIS_IS_SDPARTA-71.0 7908447161562362556 1 IN IP4 0.0.0.0

s=-

t=0 0

a=sendrecv

a=fingerprint:sha-256 42:AD:71:76:63:32:E1:0B:8B:E4:81:DB:32:E5:B0:3B:81:1D:58:A1:C6:48:0A:54:9B:B9:48:5B:2C:4D:87:63

a=ice-options:trickle

a=msid-semantic: WMS *

a=group:BUNDLE 0

m=audio 57700 RTP/SAVPF 0 107 8 101 9

c=IN IP4 192.168.56.1

a=rtpmap:0 PCMU/8000

a=rtpmap:107 opus/48000/2

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=rtpmap:9 G722/8000/1

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

a=fmtp:101 0-15

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=setup:actpass

a=mid:0

a=msid:{4f531a7b-a3d3-4142-9e95-b6975ebb9460} {19b104ce-0269-4632-b83e-6471f1674557}

a=sendonly

a=ice-ufrag:39dd3ced

a=ice-pwd:58911f8a18b6fcb0e2efa22ee6e6a97b

a=candidate:0 1 UDP 2122252543 192.168.56.1 57700 typ host

a=candidate:1 1 UDP 2122187007 192.168.199.182 57701 typ host

a=candidate:2 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

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

a=end-of-candidates

a=ssrc:4195678702 cname:{ce87f2f9-c5ca-412a-88cf-4fd7dba4394e}

a=rtcp-mux


 +1ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface send() +5s jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface received WebSocket message +10ms jssip-3.3.11.js:26426:11
JsSIP:Transport received text message:

SIP/2.0 501 Method Not Implemented

Via: SIP/2.0/WSS i43rthfv1p36.invalid;branch=z9hG4bK5311788;received=192.168.199.182;rport=56781

From: "TraLaLa" <sip:60f84rbm@i43rthfv1p36.invalid;transport=ws>;tag=l8pp4l49nu

To: <sip:Ervin@192.168.199.221>;tag=as3021b8dd

Call-ID: 305d7f38311e0ec97885852d05c36633@192.168.199.221:5060

CSeq: 2859 UPDATE

Server: Asterisk PBX 16.6.2

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

Supported: replaces, timer

Content-Length: 0




 +13ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession terminate() +33ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession terminating session +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession sendRequest() +1ms jssip-3.3.11.js:26426:11
JsSIP:Transport send() +20ms jssip-3.3.11.js:26426:11
JsSIP:Transport sending message:

BYE sip:Ervin@192.168.199.221:5060;transport=ws SIP/2.0

Via: SIP/2.0/WSS i43rthfv1p36.invalid;branch=z9hG4bK1533977

Max-Forwards: 69

To: <sip:Ervin@192.168.199.221>;tag=as3021b8dd

From: "TraLaLa" <sip:60f84rbm@i43rthfv1p36.invalid;transport=ws>;tag=l8pp4l49nu

Call-ID: 305d7f38311e0ec97885852d05c36633@192.168.199.221:5060

CSeq: 2860 BYE

Reason: SIP ;cause=500; text="Hold Failed"

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

Supported: outbound

User-Agent: JsSIP 3.3.11

Content-Length: 0




 +1ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface send() +23ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession session ended +8ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession close() +1ms jssip-3.3.11.js:26426:11
JsSIP:RTCSession close() | closing local MediaStream +1ms jssip-3.3.11.js:26426:11
JsSIP:Dialog dialog 305d7f38311e0ec97885852d05c36633@192.168.199.221:5060l8pp4l49nuas3021b8dd deleted +6s jssip-3.3.11.js:26426:11
JsSIP:RTCSession emit "ended" +3ms jssip-3.3.11.js:26426:11
JsSIP:WebSocketInterface received WebSocket message +67ms jssip-3.3.11.js:26426:11
JsSIP:Transport received text message:

SIP/2.0 200 OK

Via: SIP/2.0/WSS i43rthfv1p36.invalid;branch=z9hG4bK1533977;received=192.168.199.182;rport=56781

From: "TraLaLa" <sip:60f84rbm@i43rthfv1p36.invalid;transport=ws>;tag=l8pp4l49nu

To: <sip:Ervin@192.168.199.221>;tag=as3021b8dd

Call-ID: 305d7f38311e0ec97885852d05c36633@192.168.199.221:5060

CSeq: 2860 BYE

Server: Asterisk PBX 16.6.2

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

Supported: replaces, timer

Content-Length: 0




 +68ms jssip-3.3.11.js:26426:11

What is the Asterisk console output with SIP trace? (pjsip set logger on)

debug_log.txt (391.9 KB)

We are using chan_sip. Plase find attached the log file from Asterisk.

What was the initial serial number? It wasn’t, by any chance, also 1?

Please note that chan_sip only has community support and its use is not advised except when there are specific reasons for not using chan_pjsip. It is unlikely to be up to date with the latest in web-rtc.

Thank you jcolp, david551,

We switched to pjsip and it works nice :slight_smile:

Best

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.