Quobis / QoffeeSIP

QoffeeSIP is a complete Javascript SIP stack that can be used in a website to exploit all the multimedia capabilities of WebRTC technology. Instead of using pure Javascript, QoffeeSIP has been coded with CoffeeScript so you can easily modify it to suit your needs.
GNU Lesser General Public License v3.0
27 stars 5 forks source link

Qoffee 0.7 with DTMF do not work #9

Open prasaddp5 opened 10 years ago

prasaddp5 commented 10 years ago

I am able trying to send DTMF value("1") using the recommended function insertDTMF(tone), however I see the following logs, however DTMF digits are not really recognized by the Mediaserver, any pointers to make it work?

RTCDTMFToneChangeEvent {tone: "1", clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: RTCDTMFSender…} qoffeesip.js:184 [INFO] DTMF send - 1 qoffeesip.js:185 RTCDTMFToneChangeEvent {tone: "", clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: RTCDTMFSender…} qoffeesip.js:184 [INFO] DTMF send - qoffeesip.js:185 RTCDTMFToneChangeEvent {tone: "1", clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: RTCDTMFSender…} qoffeesip.js:184 [INFO] DTMF send - 1 qoffeesip.js:185 RTCDTMFToneChangeEvent {tone: "", clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: RTCDTMFSender…} qoffeesip.js:184 [INFO] DTMF send - qoffeesip.js:185

Thanks, Prasad

damianfral commented 10 years ago

Hi again @prasaddp5,

Logs show DTMFs are being sent. The problem may be your server doesn't recognize RTP Events (WebRTC sends DTMFs as RTP Events, not as in-band audio). We have tested DTMFs with a WebRTC-PSTN gateway and I could heard the tones.

prasaddp5 commented 10 years ago

Thanks for the information, it looks like a drawback in webrtc not to have support for in-band DTMF signalling and nothing specific only to Qoffee.

prasaddp5 commented 10 years ago

Hi Damian, Quick question, should'nt Qoffee send INFO with the DTMF Event, I do not see INFO sent from Qoffee.

Thanks, Prasad

damianfral commented 10 years ago

Hi @prasaddp5,

We could send DTMFs these ways:

  1. SIP INFO
  2. RTP audio
  3. RTPC event

We chose option 3, because WebRTC API supports this. This means signalling is not aware of DTMFs and DTMFs are not directly audible because they are not in the audio, but a server could read these events and insert them as tones in the audio (in order to get DTMFs wotking through PSTN).

We haven't plans to implement option 1 or 2. You can do it by yourself. Option 1 is just working with a new king of SIP message. Option 2 may be the harder one, in fact, I'm not sure it is possible. You could try to use WebAudio API to "inject" tones in the local audio object.

By the way, what server are you using?

prasaddp5 commented 10 years ago

Thanks, I am using Dialogic and a Radisys media server. Not sure if any of these can support RTPC events?

Which server did you test DTMF with?

-Padma Prasad

prasaddp5 commented 10 years ago

I am using wertc2sip as the Mediaproxy to connect to external media server(Dialogic) for announcments.

damianfral commented 10 years ago

We tested it with a third party SBC. I'll test it again with FreeSwitch.

prasaddp5 commented 10 years ago

If I understand correctly in your setup, Javascript( Webrtc client) used to send DTMF as Event based signaling to SBC. And SBC used to convert it to either Inband or INFO based DTMF and send it to mediaserver?

damianfral commented 10 years ago

Event based signaling

No. RTP events travel in the media plane but out of band (see RFC 2833). SBC translates DTMFs to inband tones (in order to work in analog lines). I guess SBC can be configured to translate them to SIP INFO messages. @antonroman could give you a better answer. :smile:

prasaddp5 commented 10 years ago

I will try to test dtmf with Freeswitch got it installed in my labs, were you able to test qoffee dtmf with freeswitch.