SIPUserAgent objSIPUserAgent = new SIPUserAgent();
WindowsAudioEndPoint objWindowsAudioEndPoint = new WindowsAudioEndPoint(new AudioEncoder());
VoIPMediaSession objVoIPMediaSession = new VoIPMediaSession(objWindowsAudioEndPoint.ToMediaEndPoints());
objVoIPMediaSession.AcceptRtpFromAny = true;
string strDestinationAddress = strDialledNumber + gblStrDomain;
bool blnCallResult = await objSIPUserAgent.Call(strDestinationAddress, gblStrExtentionNumber, gblStrExtentionPassword, objVoIPMediaSession);
- Server is calling to the reciver by using above snippet.
- Receiver notified with incoming call
I have two questions in this scenario.
- How the server can reject/cancel outgoing call?
- How receiver can detect that the call is rejected/cancelled by server?
This can be used to reject or cancel the outgoing call.
And Below, we can subscribe to the event OnCallRejected which gets fired the call is rejected by the server
Also can OnCallTerminated event . This is fired when the call is cancelled by the server.
Hope this helps.
OnCallRejected and OnCallTerminated events are not available in version 6.0.12 of the library. These events were added in a later version, specifically version 7.0.0
For older version,