Skip to content

extend DTMF support for interfacing with a wider range of networks - #496

Closed
emiliorcueto wants to merge 4 commits into
versatica:masterfrom
liveninja:feature/DTMF-additional-support
Closed

emiliorcueto wants to merge 4 commits into
versatica:masterfrom
liveninja:feature/DTMF-additional-support

Conversation

@emiliorcueto

Copy link
Copy Markdown

The option of supporting RFC2833/4733 and/or inband DTMF should be strongly considered. Currently, global providers such as Twilio still do not support DTMF via SIP INFO. Also, as in our use case, we need to support interfacing with legacy networks which require a user's interaction via IVR.

As it stands here, this pull request leaves the default functionality of DTMF over SIP INFO as is. The transport can be changed however by setting a new UA config: session_dtmf_transport to either "RFC2388" or "IN_BAND".

Note: Although the option for RFC2833 now exists, it's functionality must still be implemented. Only inband DTMF functionality within the audio stream is implemented in this pull request

Comment thread lib/Config.js
no_answer_timeout : 60,

// DTMF transport parameters
session_dtmf_transport : JsSIP_C.DTMF_TRANSPORT.DEFAULT,

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.

DTMF type cannot be fixed at UA level. Otherwise should I create a new UA when I'm willing to change the DTMF type?

The RTCSession.sendDtmf() method should take an option (ie: type: INFO|INBAND)

Comment thread lib/Constants.js
DEFAULT : this.INFO,
RFC2833 : 'RFC2833', // TODO: support payload 101, et al.
IN_BAND : 'IN_BAND'
},

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.

Not Here. DTMF is a business of RTCSession only.

Comment thread lib/Constants.js
// DTMF transport methods
DTMF_TRANSPORT : {
DEFAULT : this.INFO,
RFC2833 : 'RFC2833', // TODO: support payload 101, et al.

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.

If RFC2833 functionality (or any other) is not being implemented, just don't leave this TODO for future

Comment thread lib/RTCSession.js

case JsSIP_C.DTMF_TRANSPORT.IN_BAND:
// send DTMF in current audio RTP stream
this._getDTMFRTPSender().insertDTMF(tone, duration, interToneGap);

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.

This will throw everytime _getDTMFRTPSender() doesn't return a RTCDTMFSender instance.

Also it is not notifying the user about the new sent DTMF, as we do with the INFO DTMFs.

If sendDTMF() is called before a previous call to this method has finished sending all the tones, the remaining ones will be discarded and not sent.

@jmillan

jmillan commented Jan 26, 2018

Copy link
Copy Markdown
Member

Hi @emiliorcueto,

I've commented on your code. Overall this feature belongs to RTCSession only. It is the only file that should be changed.

A new option on RTCSession::sendDTMF() would suffice. Ie: (type: INFO|INBAND)

The additions on RTCSession::sendDTMF() are not properly done. (details on inline comments ).

I'd suggest you to check the RTCDTMFSender specification.

@jmillan

jmillan commented Dec 19, 2018

Copy link
Copy Markdown
Member

I'm closing this PR due to inactivity

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.

2 participants