Hi All,

I'm trying to create a VoipEngine similar to the one that is at the VAS example. For some reason after opening the down link I get an event that the DL is closed and when I try to open it again my app crashes.

The code is below, Please Help.
Thanks,
Nahum
______________________________________________________________________________________

void CVoipEngine::ConstructL()
{
const TVersion ver(1, 0, 0);
CActiveScheduler::Add(this);
User::LeaveIfError(iTimer.CreateLocal());
User::LeaveIfError(CVoIPUtilityFactory::CreateFactory(iFactory));

// Note: Real client implementations should check for supported
// codec formats first before creating streaming sessions.
User::LeaveIfError(iFactory->CreateDownlinkStream(ver,
CVoIPUtilityFactory::EVoIPCall,
iVoIPDnlink));

iFactory->CreateBuffer(iPlayBuf, CVoIPDataBuffer::EStandard);

User::LeaveIfError(iFactory->CreateUplinkStream(ver,
CVoIPUtilityFactory::EVoIPCall,
iVoIPUplink));

iDnLinkCodec = ENULL;
iUpLinkCodec = ENULL;
iDnLinkStatus = ENotReady;
iUpLinkStatus = ENotReady;


CVoIPFormatIntfc* formatIntfcDL = NULL;
CVoIPFormatIntfc* formatIntfcUL = NULL;
User::LeaveIfError(iVoIPDnlink->SetFormat(EG711, formatIntfcDL));
iG711DecFormatIntfc = (CVoIPG711DecoderIntfc*)formatIntfcDL;
User::LeaveIfError(iG711DecFormatIntfc->SetObserver(*this));

User::LeaveIfError(iVoIPUplink->SetFormat(EG711, formatIntfcUL));

iG711DecFormatIntfc = (CVoIPG711DecoderIntfc*)formatIntfcUL;
User::LeaveIfError(iG711DecFormatIntfc->SetObserver(*this));

OpenDownlink () ;
OpenUplink () ;
}