Hang up voice calls(转)
来源:互联网 发布:网络球机需要几根网线 编辑:程序博客网 时间:2024/06/05 07:55
Hanging up Phone calls
There are several ways on hanging up the phone calls, here’s a list on what isavailable for S60 in public space:
1. CTelephony 2. AT commands 3.CPhCltCommandHandler
Call can only be hang up in certaincall states, thus you should also have a look into call state monitoring example
Hanging up with CTelephony
With CTelephony you can only hang upcalls that you own and which are connected. Thus hanging up with CTelephony isonly usable if you either: Dialed the call with DialNewCall() or answrered thecall with AnswerIncomingCall() functions.
With both of these functions you getCTelephony::TCallId parameter, which you need to pass to the CTelephony’sHangup() function. The actual code is this simple:
iTelephony->Hangup(iStatus, iCallId);
SetActive();
The full code is also shown in How to terminate call
Hanging up with At Commands
AT commands sending example can befound from Send_AT_Commands.zip.
With the example you just sendAT+CHUP while having call in dialing,ringing or connected state.
Hangingup with CPhCltCommandHandler
First you need to construct ainstance of CPhCltCommandHandler, this can be done with following code:
_LIT( KPhCltExtLib, "PhoneClientExt.dll");
User::LeaveIfError(iLibrary.Load(KPhCltExtLib ) ); // LoadPhoneClientExt dll
TInt res =0; TInt err=0;
TRAP(err,res= iLibrary.Lookup( 1 )());
if (err == KErrNone)
{
iFactory =reinterpret_cast<CPhCltExtFactory * >( res );
if ( iFactory )
{
iHandler= iFactory->CPhCltCommandHandlerLD();
User::LeaveIfError(iServer.Connect());
iHandler->Open(iServer);
}
}
After using the instance, you canclose and delete it as follows:
if(iHandler)
{
iHandler->Close();
}
deleteiHandler;
iHandler =NULL;
iLibrary.Close();
The actual hanging up is handledwith following active object function call:
iHandler->Chup(iStatus);
SetActive();
Note:CPhCltCommandHandler will notwork from 3rd ed FP2 onwards
- Hang up voice calls(转)
- Error: socket hang up
- iOS Simulator hang up ( Xcode4.6.3)
- ZOJ 1639 Hang Up the System
- java runtime exec hang up 运行挂起的问题
- 关于安装node-inspector报错 "socket hang up"
- ZOJ 1639 Hang Up the System (状态压缩)
- nodejs的http请求是报错 socket hang up
- nodejs http调用报错:socket hang up
- 在unity5中减少Draw Calls(SetPass Calls)[转]
- SQOOP从Oracle导入数据到Hive时hang up在MapReduce作业过程
- 微信小程序:wx.downloadFile 不成功,没报错 downloadFile:fail Error: socket hang up 错误
- 【转】简单说一说 Oracle库的Hang
- Mobile Voice
- google voice
- Voice VLAN
- ios voice
- Voice study
- TD-SCDMA系统中的1A-7c事件简介
- 使用asp.net mvc 创建一个blog发布系统
- 设计模式文摘
- live555 soure filter
- C static
- Hang up voice calls(转)
- Communications link failure,The last packet successfully received from the server was *** millisecon
- 1
- C++运算优先级
- cairngorm3.0
- 分页功能的java实现
- 线程
- JS创建HTML标签
- ps切片的使用