Click here to Skip to main content
15,902,731 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Create shared Registry Key Pin
KarstenK18-Jun-09 2:10
mveKarstenK18-Jun-09 2:10 
GeneralRe: Create shared Registry Key Pin
Monu_TCS18-Jun-09 2:49
Monu_TCS18-Jun-09 2:49 
QuestionRe: Create shared Registry Key Pin
David Crow18-Jun-09 2:55
David Crow18-Jun-09 2:55 
AnswerRe: Create shared Registry Key Pin
Stuart Dootson18-Jun-09 7:49
professionalStuart Dootson18-Jun-09 7:49 
GeneralRe: Create shared Registry Key Pin
Monu_TCS22-Jun-09 3:56
Monu_TCS22-Jun-09 3:56 
GeneralRe: Create shared Registry Key Pin
Stuart Dootson22-Jun-09 4:00
professionalStuart Dootson22-Jun-09 4:00 
GeneralRe: Create shared Registry Key Pin
Monu_TCS23-Jun-09 0:05
Monu_TCS23-Jun-09 0:05 
QuestionWhy I can hear only one (calling) side using TAPI and H.323? Pin
GAJERA18-Jun-09 0:59
GAJERA18-Jun-09 0:59 
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,TAPIMEDIATYPE_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;
Answer(pEvent);
}
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**)&pBasicCall);

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,&pTerminal);
hr = pStream->SelectTerminal(pTerminal);
hr = pBasicCall->Answer();
return hr;
}

Can you help me how it resolve.

Thanks
Mahendra
QuestionCString Pin
p_196017-Jun-09 23:45
p_196017-Jun-09 23:45 
AnswerRe: CString Pin
Nishad S17-Jun-09 23:51
Nishad S17-Jun-09 23:51 
GeneralRe: CString Pin
p_196018-Jun-09 0:25
p_196018-Jun-09 0:25 
GeneralRe: CString Pin
Nishad S18-Jun-09 0:39
Nishad S18-Jun-09 0:39 
GeneralRe: CString Pin
chandu00418-Jun-09 0:57
chandu00418-Jun-09 0:57 
AnswerRe: CString Pin
CPallini18-Jun-09 0:09
mveCPallini18-Jun-09 0:09 
AnswerRe: CString Pin
KarstenK18-Jun-09 2:42
mveKarstenK18-Jun-09 2:42 
QuestionHow do Non - Unicode applications support different language strings? Pin
Super Hornet17-Jun-09 23:41
Super Hornet17-Jun-09 23:41 
GeneralRe: How do Non - Unicode applications support different language strings? Pin
Super Hornet18-Jun-09 0:20
Super Hornet18-Jun-09 0:20 
GeneralRe: How do Non - Unicode applications support different language strings? Pin
CPallini18-Jun-09 0:34
mveCPallini18-Jun-09 0:34 
AnswerRe: How do Non - Unicode applications support different language strings? Pin
KarstenK18-Jun-09 2:14
mveKarstenK18-Jun-09 2:14 
AnswerRe: How do Non - Unicode applications support different language strings? Pin
Emilio Garavaglia18-Jun-09 21:42
Emilio Garavaglia18-Jun-09 21:42 
QuestionHow to get control of context menu? Pin
Md. Ali Naser Khan17-Jun-09 23:02
Md. Ali Naser Khan17-Jun-09 23:02 
AnswerRe: How to get control of context menu? Pin
KarstenK18-Jun-09 2:16
mveKarstenK18-Jun-09 2:16 
QuestionHow to avoid value repetition in the CListCtrl Pin
Murugan k17-Jun-09 22:26
Murugan k17-Jun-09 22:26 
AnswerRe: How to avoid value repetition in the CListCtrl Pin
Nibu babu thomas17-Jun-09 22:30
Nibu babu thomas17-Jun-09 22:30 
GeneralRe: How to avoid value repetition in the CListCtrl Pin
Murugan k17-Jun-09 23:05
Murugan k17-Jun-09 23:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.