New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support DTMF out of band? #38
Comments
The best approach is to use DTMF via SIP Info. That mechanism puts DTMF events into SIP INFO requests and means there's no extraction from audio RTP packets required. If you do need to go down the out of band path then there's nothing specifically useful in the sipsorcery code base as I've never worked with it. |
Lightning fast :) Which implies to me that "telephone-event" might actually arrive in the same RTP Channel and so it might be a matter of replacing ProcessRTPPackets? If I pull https://github.com/sipsorcery/sipsorcery/tree/master/sipsorcery-core will that match 1.5.6? |
Just to say I "think" I've managed to submit a change to you that allows you to intercept an RTP Packet and choose to handle it first (such as for handling DTMF) Change was in RTPChannel.cs which I've attached, just in case. |
You should hook up the RTPChannel.OnFrameReady event. There's no need for your additional ProcessRTPPacketsCustom property. The additional advantage of using the OnFrameReady event is that you will get full RTP frames rather than partial ones. If your DTMF was spread across multiple RTP packets you'd need the full frame to be able to extract them. |
Yeah, that got it. |
Only other thing I've got is a Before Send Request/Response event added to SIP Transaction because the server I'm talking to isn't happy with a blank "user" in the contact field for some reason. I couldn't find any other way to gain access to the "OK" response. |
RTP events are now available. An example program and explanatory article are also available. |
Hi Aaron.
I'm looking at having to support DTMF via OOB using SIPSorcery.
So far pretty much everything in the service providers end has seemed to change for this project.
I've got little idea where to start, but it looks like I need to check the invite for
a=rtpmap:101 telephone-event/8000
And then connect a port to an RTPChannel to handle it if it's present?
And from reading through the RTPChannel and RTPPacket code, the RTPPacket should be fine, but RTPChannel assumes it is either a single packet audio frame, or a video frame, so I would need to implement a DTMF RTPChannel?
The text was updated successfully, but these errors were encountered: