Replace B2BUA with a new one, without loosing transfer states

I'm having some issues with replacing my B2BUA for transfer purpose.
I have a link between 2 participant by using a B2BUA. I want to transfer one of these participants into another B2BUA, and that new B2BUA will repaces the previous one. I can accomplish this succesfully without any troubles, by using self-transfer and B2BUA
utilitize.
But when the link is established in B2BUA between two participants, when creating a new B2BUA, the participants can still talk untill the new B2BUA is established (this is the issue).
I doesn't loose the link of participant in Call leg 1, since I'm using a Self-transfer leaving the call state as incoming. But if I call BeginTerminate() of the 1st B2BUA while establishing the 2nd B2BUA, then I'll loose my transfer states of the first Call,
and I'm using this event state to tell me when a transfer is succesfully done.
How can I cancel the stream between the two participants in the first B2BUA, as soon as I begin to establish the second B2BUA??

If either leg of the B2B is terminated, the B2B call is terminated. In a transfer scenario the leg of the participating in the self transfer will end before the transfer itself is completed, leading to an OperationFailureException on the EndTransfer. 
There is really no way to avoid this, so you should just expect it.
Here is a snip from one of my test programs:
private void InitiateSelfTransfer()
Console.WriteLine("Initiating self-transfer on p2p call...");
//Copy inCall since we will replace it with the new inCall prior to the completion of the transfer.
AudioVideoCall p2pOldInCall = (AudioVideoCall)inCall;
//Pass a reference to this instance in the Context so the new inbound call can reattach to this session.
p2pOldInCall.ApplicationContext = this;
p2pOldInCall.TransferStateChanged += new EventHandler<TransferStateChangedEventArgs>(oldInCall_TransferStateChanged);
CallTransferOptions cto = new CallTransferOptions(CallTransferType.Attended);
//Execute the transfer.
Console.WriteLine("Beginning Self-Transfer...");
try
p2pOldInCall.BeginTransfer(p2pOldInCall, cto,
ar =>
Console.WriteLine("Self-Transfer Completed...");
try
p2pOldInCall.EndTransfer(ar);
Console.WriteLine("Self-Transfer was successful!");
SendTransferNotification(200, "Succeeded at self-transfer");
//In this scenario the BackToBackCall seems to always terminate the call before we are made aware the transfer is complete.
//This operation has to execute as Attended, so we simply catch the exception generated, it doesn't seem to cause us any problems.
catch (OperationFailureException)
Console.WriteLine("Exception ignored on self-transfer...");
SendTransferNotification(487, "Call already terminated...");
catch (RealTimeException ex)
SendTransferNotification(503, "Failed on self-transfer of inbound leg");
Console.WriteLine(ex);
, null);
catch (InvalidOperationException iOpEx)
Console.WriteLine("Invalid Operation Exception: " + iOpEx.ToString());

Similar Messages

Maybe you are looking for

  • File name and place question.

    How would you file the following. I have a series to edit, so for example you have "Show 1" and within this you have V.1, V.2 and V.3.All 3 versions share the same beginnings, but are then different from half way through. You also have 2 sources of H

  • How to use program RFBISA00?

    Dear all, We want to update our account descriptions in several languages. In order to do this we need process in mass using RFBISA00 which is standard. But I do not understand how to use it because we only have for only one structure BSKX. This stru

  • Two Elements in Main Window

    Hello, I am working on sapscript. MAIN window has two elements ( Order Info, Carrier Info. ) First page display only 1 - 10 records for each element in Main Window. ( In my scenario, it's possbile the either one of the element may have more then 10 r

  • Urgent helep: socket write error

              Hi All,           My application is continuously writing the following error message to the domain           log of WLS eventhough app is running ok           javax.servlet.ServletException: Connection aborted by peer: socket write error   

  • How can we change Topic Names Generated after linking a document

    Hi:      I linked a document and generated a topic in RoboHelp for HTML. The topics are generated with some names and i am not able to rename them after they are generated. I tried doing this as per help Define the topic name pattern for generated to