-
Notifications
You must be signed in to change notification settings - Fork 446
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
OnDtmfTone event when incomingcall #1251
Comments
OnRtpEvent is not triggered: |
Will take a look at this in the next few days. |
You can use the SIPCallServer and SendDtmf examples to see how to receive DTMF.
|
Sorry for the late reply. This does look like a bug in this library. The DTMF format negotiation does not seem to be taking place proprely so if there is a different DTMF payload type ID in an offer it will be ignored. I'm working out how to fix now. |
If the OnDtmfTone event is not triggered after an incoming call, the ONDTMFTONE event is triggered after an outgoing call.
`var audioSource = AudioSourcesEnum.None;
var codecs = new List { AudioCodecsEnum.PCMU, AudioCodecsEnum.PCMA, AudioCodecsEnum.G722 };
var audioExtrasSource = new AudioExtrasSource(new AudioEncoder(), new AudioSourceOptions { AudioSource = audioSource });
audioExtrasSource.RestrictFormats(formats => codecs.Contains(formats.Codec));
sipChannel.MediaSession = new VoIPMediaSession(new MediaEndPoints { AudioSource = audioExtrasSource, AudioSink = null });
sipChannel.MediaSession.AcceptRtpFromAny = true;
sipChannel.ServerUserAgent = sipChannel.UserAgent.AcceptCall(req);
sipChannel.State = ChannelStates.RINGING;
sipChannel.DestNo = req.Header.From.FromURI.User;
sipChannel.DestName = req.Header.From.FromName;
sipChannel.UserAgent.OnDtmfTone += (k, du) =>
{
//untriggered
};`
The text was updated successfully, but these errors were encountered: