meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

Change SipPlugin's dtmf pt hardcoded to get from sdp #3299

Closed ywmoyue closed 11 months ago

ywmoyue commented 11 months ago

Fix bug raised by @ycherniavskyi from https://github.com/meetecho/janus-gateway/pull/3280#issuecomment-1830743601

https://github.com/meetecho/janus-gateway/pull/3280 set a hardcoded payload type of 101 for the telephone-event RTP payload format.

This PR Change dtmf payload hardcoded to get the telephone-event payload value from sdp

ywmoyue commented 11 months ago

First of all, thank you for notes, and secondly, thank's for the reminder about the 'helper' session. I haven't used 'helper' session before, I will use and test this dtmf detection later.

For the first note,did you mean the janus_sip_media_reset function? I have just modified it. I am not sure whether I need to add the dtmf_pt field to janus_no_sip_media struct.

lminiero commented 11 months ago

did you mean the janus_sip_media_reset function?

Yes, apologies for the typo!

lminiero commented 11 months ago

I haven't used 'helper' session before, I will use and test this dtmf detection later.

It may also be a bug in the demos, as that's what I was using to test a call between two users via the SIP plugin and injecting DTMF digits. I'll make some more tests on that later.

lminiero commented 11 months ago

It may also be a bug in the demos

That's indeed it: there's a bug when using the DTMF controls from the SIP demo on helper calls. If I manually invoke the DTMF sending methods, DTMF tones are correctly intercepted on the other end, and correctly sent as events on the right helper handle. I'll fix that demo bug separately.

lminiero commented 11 months ago

Looks good to me, merging then!