-
Notifications
You must be signed in to change notification settings - Fork 444
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.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: