Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > VOIP > Why I can hear only one (calling) side using TAPI and H.323?

Reply
Thread Tools

Why I can hear only one (calling) side using TAPI and H.323?

 
 
semaphore semaphore is offline
Junior Member
Join Date: Feb 2009
Posts: 3
 
      06-18-2009
Hello
I am beginner in VOIP.I try to make simple calling and answering application.
Here i face this problem -I can hear only one side(calling).

Please check this following code.

//Calling-Ip Calling Function
gpAddress->CreateCall(bstr,LINEADDRESSTYPE_IPADDRESS,TAPIMED IATYPE_AUDIO,&gpCall);
hr=SelectTerminalsOnCall(gpCall);
hr=gpCall->Connect(0);

//Answer -I add Answer method in event.

LRESULT CVOIPCallDlg::OnTAPIEvent(WPARAM wParam, LPARAM lParam)
{
CString csName;
switch(wParam)
{
case TE_CALLNOTIFICATION:
{
AddLog("call notification event has occured");
// Get the ITCallNotification interface.
IDispatch* pEvent=(IDispatch *)lParam;
<b>Answer(pEvent);</b>
}
break;
case TE_CALLSTATE:
ITCallStateEvent *a=(ITCallStateEvent *)lParam;
ITCallInfo *b;
if(a->get_Call(&b) != S_OK)
AddLog("get_Call()",hr);

CALL_STATE pCallState;

if(a->get_State(&pCallState)!= S_OK)
AddLog("get_State()",hr);

switch(pCallState)
{
case CS_INPROGRESS:
AddLog("dialing");
break;
case CS_CONNECTED:
AddLog("Connected");
break;
case CS_DISCONNECTED:
AddLog("Disconnected");
break;
case CS_OFFERING:
AddLog("A party wants to communicate with you!");
break;
case CS_IDLE:
AddLog("Call is created!");
break;
}
break;
}
pEvent->Release();
return 0;
}
LRESULT CVOIPCallDlg::Answer(IDispatch* pEvent)
{
HRESULT hr;
ITCallNotificationEvent * pNotify;
pEvent->QueryInterface( IID_ITCallNotificationEvent,(void **)&pNotify);
ITCallInfo * pCallInfo;
pNotify->get_Call(&pCallInfo);

ITBasicCallControl * pBasicCall;
hr = pCallInfo->QueryInterface(IID_ITBasicCallControl,(void**)&pB asicCall);

hr = pCallInfo->get_Address(&gpAddress);
ITStreamControl * pStreamControl;
pBasicCall->QueryInterface(IID_ITStreamControl,(void **) &pStreamControl);

IEnumStream * pEnumStreams;
ITStream * pStream;
hr = pStreamControl->EnumerateStreams(&pEnumStreams);
pEnumStreams->Next(1, &pStream, NULL);
long lMediaType;
TERMINAL_DIRECTION dir;
pStream->get_MediaType(&lMediaType);
hr = pStream->get_Direction( &dir );
ITTerminal * pTerminal;
ITTerminalSupport * pTerminalSupport;

gpAddress->QueryInterface(IID_ITTerminalSupport,(void **)&pTerminalSupport);

hr = pTerminalSupport->GetDefaultStaticTerminal(lMediaType,dir,&pTermina l);
hr = pStream->SelectTerminal(pTerminal);
hr = pBasicCall->Answer();
return hr;
}

Can you help me how it resolve.

Thanks
Mahendra
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Hear Ye Hear Ye] 0lde Timers - War3z Hounds - 0ne and All.... Hermes Digital Photography 0 03-26-2007 07:28 AM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
hear ye, hear ye.help is needed....... estella aguilar Digital Photography 55 09-01-2006 02:37 AM
Browser Control and TAPI =?Utf-8?B?S3Jpcw==?= ASP .Net 1 03-02-2004 02:07 AM
ATAT 186, CallManager and TAPI Akarama VOIP 0 02-05-2004 10:05 AM



Advertisments