Skip to content

DTMF-additional-support - add support for IN_BAND DTMF - #629

Merged
ibc merged 7 commits into
versatica:masterfrom
acharlop:DTMF-additional-support
May 13, 2020
Merged

ibc merged 7 commits into
versatica:masterfrom
acharlop:DTMF-additional-support

Conversation

@acharlop

Copy link
Copy Markdown
Contributor

based off of comments for #496 and #601

@acharlop acharlop changed the title add support for IN_BAND DTMF DTMF-additional-support - add support for IN_BAND DTMF May 11, 2020
@acharlop

Copy link
Copy Markdown
Contributor Author

See documentation PR as well versatica/jssip.net#5

@jmillan

jmillan commented May 11, 2020

Copy link
Copy Markdown
Member

It is based on this PR, yes? #601

Comment thread lib/RTCSession.js Resolved
Comment thread lib/RTCSession.js Resolved
Comment thread lib/RTCSession.js Resolved
Comment thread lib/RTCSession.js Resolved
@acharlop

Copy link
Copy Markdown
Contributor Author

It is based on this PR, yes? #601

See PR description both #601 and the original #496

Comment thread lib/RTCSession.js Resolved
Comment thread lib/RTCSession.js Resolved
Comment thread lib/RTCSession.js Resolved
@acharlop

Copy link
Copy Markdown
Contributor Author

Should be g2g now

Comment thread lib/Constants.js Resolved
Comment thread lib/RTCSession.js Resolved

@ibc ibc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes requested, but even when those are handled, I don't think this is ok. What about this line which is also called even when using in band DTMF?:

// Set timeout for the next tone.
setTimeout(_sendDTMF.bind(this), timeout);

@jmillan what to do here?

Comment thread lib/RTCSession.js
Comment on lines +1068 to +1069
}
case JsSIP_C.DTMF_TRANSPORT.INFO: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line between case. BTW: does hit pass gulp lint or not? You did not answer before.

Suggested change
}
case JsSIP_C.DTMF_TRANSPORT.INFO: {
}
case JsSIP_C.DTMF_TRANSPORT.INFO: {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it does pass. I will add the blank line as requested

Comment thread lib/RTCSession.js Resolved
@acharlop

Copy link
Copy Markdown
Contributor Author

What about this line which is also called even when using in band DTMF?:

Isn't this just for handling if multiple tones are sent? What would the problem be?

@rshpount

Copy link
Copy Markdown

I think the terminology here is wrong (or confusing). For instance https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Using_DTMF refers to in-band as sending DTMF as an audio signal using G.711. RFC4733 tones, which are generated by RTCDTMFSender.insertDTMF, are referred to as out of band. SIP INFO messages are technically out-of-band as well. Better name, instead of IN_BAND, should be something like TELEPHONE_EVENT or RFC2833 or RFC4733.

@ibc

ibc commented May 11, 2020

Copy link
Copy Markdown
Member

Right, thanks @rshpount.
@acharlop please, rename the type to TELEPHONE_EVENT.

Regarding "multiple tones" you are right, just let's wait for @jmillan to jump into this again and confirm.

@acharlop

Copy link
Copy Markdown
Contributor Author

Since this PR is based off of #601 I believe RFC2833 would be the correct terminology to use.

Comment thread lib/RTCSession.js Resolved
@ibc

ibc commented May 12, 2020

Copy link
Copy Markdown
Member

Just a last minor request change and we are ready to merge.

@jmillan

jmillan commented May 12, 2020

Copy link
Copy Markdown
Member
// Set timeout for the next tone.
setTimeout(_sendDTMF.bind(this), timeout);

@jmillan what to do here?

It's OK, since we are sending a DTMF at a time in both cases.

Co-authored-by: Iñaki Baz Castillo <ibc@aliax.net>
@acharlop

Copy link
Copy Markdown
Contributor Author

Just a last minor request change and we are ready to merge.

@ibc done

@ibc
ibc merged commit 8f12a74 into versatica:master May 13, 2020
@acharlop
acharlop deleted the DTMF-additional-support branch May 13, 2020 12:56
@ibc

ibc commented May 13, 2020

Copy link
Copy Markdown
Member

Thanks, shipped in JsSIP 3.4.5.

@ibc ibc mentioned this pull request May 13, 2020
@ibc

ibc commented May 19, 2020

Copy link
Copy Markdown
Member

Hi, @acharlop. Did you really test your code? It was not working due to a clear bug:

#630

Fixing it now.

lcl987512 pushed a commit to lcl987512/JsSIP that referenced this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants