저는 빌드 한 UMCA IVR 앱에서 전화 전송을하는 데 어려움을 겪고 있습니다. 이것은 Lync를 사용하지 않습니다.UCMA에서 참석 통화 전환을 만드는 방법
기본적으로 외부 사용자로부터 설정된 호출이 있으며 IVR 응용 프로그램의 일부로 전송할 옵션을 선택합니다. 이 전송은 구성된 외부 번호입니다 (예 : 우리의 운영자). 내가하고 싶은 일은 원래 발신자를 외부 번호로 이전하는 것입니다. 유효한 전송이 이루어지면 원래 전화를 끊고 싶습니다. 전송이 설정되지 않은 경우이 컨트롤을 정상적으로 처리 할 수 있도록 IVR 응용 프로그램에 제어를 보내려고합니다.
제 문제는 전송이 설정되면 내 EndTransferCall이 맞지 않습니다. 나는 그것을 명중하고, 나의 AutoResetEvent를 놓고 참을 돌려 보내고, 그때 나의 신청에서 나는 본래 외침을 연결을 끊을다는 것을 예상 할 것입니다. 누가 내가 여기에없는 걸 말해 줄 수 있니?
_call은 (는) 설립 된 AudioVideoCall입니다. 내 응용 프로그램에서 Transfer 메서드를 호출합니다.
private AutoResetEvent _waitForTransferComplete = new AutoResetEvent(false);
public override bool Transfer(string number, int retries = 3)
{
var success = false;
var attempt = 0;
CallTransferOptions transferOptions = new CallTransferOptions(CallTransferType.Attended);
while ((attempt < retries) && (success == false))
{
try
{
attempt++;
_call.BeginTransfer(number, transferOptions, EndTransferCall, null);
// Wait for the transfer to complete
_waitForTransferComplete.WaitOne();
success = true;
}
catch (Exception)
{
//TODO: Log that the transfer failed
//TODO: Find out what exceptions get thrown and catch the specific ones
}
}
return success;
}
private void EndTransferCall(IAsyncResult ar)
{
try
{
_call.EndTransfer(ar);
}
catch (OperationFailureException opFailEx)
{
Console.WriteLine(opFailEx.ToString());
}
catch (RealTimeException realTimeEx)
{
Console.WriteLine(realTimeEx.ToString());
}
finally
{
_waitForTransferComplete.Set();
}
}