简介
imsdroid 是全功能的SIP / IMS的客户端,它基于doubango框架开发的app,doubango是目前世界上最好的3GPP IMS/RCS 嵌入式桌面系统框架,该框架提供了一套独特的功能,包括音频/视频通话、内容共享、消息、会议、通讯录等。
官网地址:http://code.google.com/p/imsdroid/
组件
1、Boghe
IMS/ RCS Windows客户端
2、IMSDroid
IMS/ RCS Android客户端(使用NGN堆栈)
3、iDoubs
IMS/ RCS iOS客户端(iPhone,iPad和iPod Touch)
4、OpenVCS
开源视频会议服务器,用于管理多点控制单元(MCU),每个MCU可以处理多达64人参与
5、Flash2IMS
使用Adobe Flash 的SIP/ IMS网关
支持功能
1、SIP ( RFC 3261 3GPP TS 24.229 REL- 9 )
2、 IPv4 IPv6 TCP UDP
3、信号编码 SigComp (RFC 3320 、3485、 4077 、4464 、4465、4896、5049、5112、1951)
4、通讯录
5、GSMA 通信
6、 语音(GSMA VoLTE)
7、GSMA RCS and GSMA VoLTE
8 、IMS 登陆 MD5加密
9、3GPP
10、服务路由探索
11、注册事件监听(注册事件、拨打事件、来电事件、消息事件。。。)
12、3GPP IP ( 3GPP TS 23.038 、24.040 、 24.011、 24.341、24.451短信)
13、语音呼叫( G729AB1 、 AMR - NB 、iLBC、 GSM 、 PCMA 、 PCMU、 Speex NB )
14、视频通话( H264、MP4V - ES 、Theora、 H.263 、 H.263 -1998 、H.261 )
15、双音多频DTMF ( RFC 4733 )
16、解决网络延迟和阻塞技术QoS negotiation using Preconditions (RFC 3312, 4032 and 5027)
17、SIP会话定时器( RFC 4028 )
18、临时响应( PRACK )
19、通信保持(3GPP TS 24.610 )
20、消息等待指示( 3GPP TS 24.606 )
21、E.164号码呼叫通过使用ENUM协议( RFC 3761 )
22、NAT穿越
23、一对一和群组聊天
项目如图
效果如图
项目分析
如何注册一个SIP / IMS服务器?如下:
final String realm = "sip:doubango.org";
final String privateIdentity = "001";
final String publicIdentity = "sip:[email protected]";
final String password = "my secret";
final String proxyHost = "192.168.0.1";
RegistrationSession registrationSession;
// Sip Callback
final SipCallback callback = new SipCallback(){
@Override
public int OnDialogEvent(DialogEvent e) {
final SipSession sipSession = e.getBaseSession();
final long sipSessionId = sipSession.getId();
final short code = e.getCode();
switch (code){
case tinyWRAPConstants.tsip_event_code_dialog_connecting:
if(registrationSession != null && registrationSession.getId()
== sipSessionId){
// Registration in progress
}
break;
case tinyWRAPConstants.tsip_event_code_dialog_connected:
if(registrationSession != null && registrationSession.getId()
== sipSessionId){
// You are registered
}
break;
case tinyWRAPConstants.tsip_event_code_dialog_terminating:
if(registrationSession != null && registrationSession.getId()
== sipSessionId){
// You are unregistering
}
break;
case tinyWRAPConstants.tsip_event_code_dialog_terminated:
if(registrationSession != null && registrationSession.getId()
== sipSessionId){
// You are unregistered
}
break;
}
return 0;
}
@Override
public int OnRegistrationEvent(RegistrationEvent e) {
// low level events
return 0;
}
};
// Create the SipStack
SipStack sipStack = new SipStack(callback, realm, privateIdentity, publicIdentity);
// Set Proxy Host and port
sipStack.setProxyCSCF(proxyHost, 5060, "UDP", "IPv4");
// Set password
sipStack.setPassword(password);
if(sipStack.isValid()){
if(sipStack.start()){
registrationSession = new RegistrationSession(sipStack);
registrationSession.setFromUri(publicIdentity);
// Send SIP register request
registrationSession.register_();
}
}
final NgnEngine mEngine = NgnEngine.getInstance();
获取配置服务:
INgnConfigurationService mConfigurationService = mEngine.getConfigurationService();
获取SIP / IMS服务:
INgnSipService mSipService = mEngine.getSipService();
启动/停止引擎:
// Starts the engine
mEngine.start();
// Stops the engine
mEngine.stop();
Contact Service
服务用于检索从本地地址簿
HTTP/HTTPS Service
HTTP / HTTPS服务用来发送和检索数据到/从远程服务器使用HTTP / HTTPS协议
Network Service
网络服务是用来管理WiFi和3G/4G网络连接
Sound Service
铃声,彩铃业务,警报
//获取和NGN引擎实例
NgnEngine mEngine = NgnEngine.getInstance();
//播放铃音
mEngine.getSoundService().startRingBackTone();
//停止铃音
mEngine.getSoundService().stopRingBackTone();
Storage Service
管理存储功能
Configuration Service
用来存储用户的设置,设置好后重新启动
final INgnConfigurationService mConfigurationService = NgnEngine.getInstance().getConfigurationService();
History Service
用于存储/检索历史事件(音频/视频,通讯,……)
final INgnHistoryService mHistoryService = NgnEngine.getInstance().getHistoryService();
管理SIP/IMS栈
final INgnSipService mSipService = NgnEngine.getInstance().getSipService();
Audio/Video calls
音频/视频通话
得到有关的音频/视频呼叫状态如下:
final String remoteUri = "+33600000000";
final String validUri = NgnUriUtils.makeValidSipUri(remoteUri); // sip:+33600000000"@doubango.org
NgnAVSession avSession = NgnAVSession.createOutgoingSession(mSipService.getSipStack(), NgnMediaType.Audio);
if(avSession.makeCall(validUri)){
Log.d(TAG,"all is ok");
}
else{
Log.e(TAG,"Failed to place the call");
}
拨打电话如下:
final String remoteUri = "+33600000000";
final String validUri = NgnUriUtils.makeValidSipUri(remoteUri); // sip:+33600000000"@doubango.org
NgnAVSession avSession = NgnAVSession.createOutgoingSession(mSipService.getSipStack(), NgnMediaType.AudioVideo);
if(avSession.makeCall(validUri)){
Log.d(TAG,"all is ok");
}
else{
Log.e(TAG,"Failed to place the call");
}
SMS and Chat
3GPP短信流
final String SMSC = "sip:[email protected]"; // SMS Center
final String remotePartyUri = "sip:[email protected]"; // remote party
final String textToSend = "hello world!";
final NgnMessagingSession imSession = NgnMessagingSession.createOutgoingSession(mSipService.getSipStack(),
remotePartyUri);
if(!imSession.SendBinaryMessage(textToSend,SMSC)){
Log.e(TAG,"Failed to send");
}
else{
Log.d(TAG,"Message sent");
}
// release session
NgnMessagingSession.releaseSession(imSession);
IM寻呼模式
final String textToSend = "hello world!";
final String remotePartyUri = "sip:[email protected]"; // remote party
final NgnMessagingSession imSession = NgnMessagingSession.createOutgoingSession(mSipService.getSipStack(),
remotePartyUri);
if(!imSession.sendTextMessage(textToSend)){
Log.e(TAG,"Failed to send");
}
else{
Log.d(TAG,"Message sent");
}
// release session
NgnMessagingSession.releaseSession(imSession);
监听事件
SIP/IMS服务负责对SIP协议相关的所有任务(登记,音频/视频电话,寻呼机模式IM…)等都有监听,所有的通知都是异步方式。
final TextView mTvInfo = (TextView)findViewById(R.id.textViewInfo);
final BroadcastReceiver mSipBroadCastRecv = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
// Registration Event
if(NgnRegistrationEventArgs.ACTION_REGISTRATION_EVENT.equals
(action)){
NgnRegistrationEventArgs args =
intent.getParcelableExtra(NgnEventArgs.EXTRA_EMBEDDED);
if(args == null){
Log.e(TAG, "Invalid event
args");
return;
}
switch(args.getEventType()){
case REGISTRATION_NOK:
mTvInfo.setText("Failed to register :(");
break;
case UNREGISTRATION_OK:
mTvInfo.setText("You are now unregistered :)");
break;
case REGISTRATION_OK:
mTvInfo.setText("You are now registered :)");
break;
case REGISTRATION_INPROGRESS:
mTvInfo.setText("Trying to register...");
break;
case UNREGISTRATION_INPROGRESS:
mTvInfo.setText("Trying to unregister...");
break;
case UNREGISTRATION_NOK:
mTvInfo.setText("Failed to unregister :(");
break;
}
}
}
};
final IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(NgnRegistrationEventArgs.ACTION_REGISTRATION_EVENT);
registerReceiver(mSipBroadCastRecv, intentFilter);
Listening for audio/video call state change
You can listen to the audio/video call state change in order to get notified when the call state change (incoming, incall,
outgoing, terminated, ...).
final BroadcastReceiver mSipBroadCastRecv = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
InviteState state;
final String action = intent.getAction();
if(NgnInviteEventArgs.ACTION_INVITE_EVENT.equals(action)){
NgnInviteEventArgs args = intent.getParcelableExtra
(NgnEventArgs.EXTRA_EMBEDDED);
if(args == null){
Log.e(TAG, "Invalid event args");
return;
}
Log.d(TAG, "This is an event for session number
"+args.getSessionId());
// Retrieve the session from the store
NgnAVSession avSession = NgnAVSession.getSession
(args.getSessionId());
if(avSession == null){
Log.e(TAG, "Cannot find session");
return;
}
switch((state = avSession.getState())){
case NONE:
default:
break;
case INCOMING:
Log.i(TAG, "Incoming call");
break;
case INPROGRESS:
Log.i(TAG, "Call in progress");
break;
case REMOTE_RINGING:
Log.i(TAG, "Remote party is
ringing");
break;
case EARLY_MEDIA:
Log.i(TAG, "Early media
started");
break;
case INCALL:
Log.i(TAG, "Call connected");
break;
case TERMINATING:
Log.i(TAG, "Call terminating");
break;
case TERMINATED:
Log.i(TAG, "Call terminated");
break;
}
}
}
};
Realm
这个领域是身份验证的域名称,一个有效的SIP URI(sip:open-ims.test or sip:10.0.0.1),程序开始之前设置信息,如果Proxy-CSCF的地址丢失,那么堆栈将自动使用DNS SRV NAPTR 和DHCP机制动态发现。
final String myRealm = "sip:doubango.org";
final boolean bSaveNow = true;
mConfigurationService(ConfigurationEntry.NETWORK_REALM, myRealm, bSaveNow);
SIP 之 imsdroid(二)
上篇简单分析imsdroid项目,本篇继续上一篇继续分析。
继续分析
IMS Private Identity (IMPI) 身份认证 用户的id 例如:banketree
IMS Public Identity (IMPU) 公共认证 如:sip:[email protected]
服务设置:
- // Sets IP address
- final String proxyHost = "192.168.0.1";
- mConfigurationService(ConfigurationEntry.NETWORK_PCSCF_HOST, proxyHost);
- // Sets port
- final int proxyPort = 5060;
- mConfigurationService.putInt(ConfigurationEntry.NETWORK_PCSCF_PORT, proxyPort);
- Save changes
- mConfigurationService.commit();
类接口
org.doubango.ngn.sip.NgnAVSession
- boolean makeCall (String remoteUri)
- boolean makeVideoSharingCall (String remoteUri)
- Context getContext ()
- void setContext (Context context)
- final View startVideoConsumerPreview ()
- final View startVideoProducerPreview ()
- boolean isSendingVideo ()
- void toggleCamera ()
- void setRotation (int rot)
- void setSpeakerphoneOn (boolean speakerOn)
- void toggleSpeakerphone ()
- void setState (InviteState state)
- boolean acceptCall ()
- boolean hangUpCall ()
- boolean holdCall ()
- boolean resumeCall ()
- boolean isLocalHeld ()
- boolean isRemoteHeld ()
- boolean sendDTMF (int digit)
- Static Public Member Functions
- static NgnAVSession createOutgoingSession (NgnSipStack sipStack, NgnMediaType mediaType)
- static NgnAVSession getSession (long id)
- static int getSize ()
- static boolean hasSession (long id)
- static boolean hasActiveSession ()
- static NgnAVSession getFirstActiveCallAndNot (long id)
- static boolean makeAudioCall (String remoteUri, NgnSipStack sipStack)
- static boolean makeAudioVideoCall (String remoteUri, NgnSipStack sipStack)
- boolean org.doubango.ngn.sip.NgnAVSession.acceptCall () //接受一个传入的音频/视频呼叫
- Returns:
- true is succeed and false otherwise
- See also:
- hangUpCall()
-
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.createOutgoingSession (NgnSipStack sipStack, NgnMediaType mediaType)
-
- [static]
- 创建一个去电音频/视频会话
- Parameters:
- sipStack the IMS/SIP stack to use to make the call
- mediaType the media type.
- Returns:一个去电音频/视频会话
-
- Context org.doubango.ngn.sip.NgnAVSession.getContext ()//获取此会话相关的上下文
- Returns:上下文
-
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.getFirstActiveCallAndNot (long id) [static]
- 根据指定ID获取不同于第一有源音频/视频会议
-
- Parameters:会话id
- Returns:一个会议
-
-
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.getSession (long id) [static]
- 检索音频/视频会话的ID
-
- Parameters:会议id
- Returns:一个会议
-
- static int org.doubango.ngn.sip.NgnAVSession.getSize () [static]
- 获取一些暂停的音频/视频会议
- Returns:会议
-
- boolean org.doubango.ngn.sip.NgnAVSession.hangUpCall ()
- 通话结束
- Returns:
-
- static boolean org.doubango.ngn.sip.NgnAVSession.hasActiveSession () [static]
- 一个活动的音频/视频会议
- Returns:
-
- static boolean org.doubango.ngn.sip.NgnAVSession.hasSession (long id) [static]
- 是否有会议
-
- Parameters:会议id
- Returns:
-
- boolean org.doubango.ngn.sip.NgnAVSession.holdCall ()
- 检查是否有保持呼叫
- Returns:
-
- boolean org.doubango.ngn.sip.NgnAVSession.isLocalHeld ()
- 是否为内部电话
- Returns:
-
- boolean org.doubango.ngn.sip.NgnAVSession.isRemoteHeld ()
- 是否为远程电话
- Returns:
-
- boolean org.doubango.ngn.sip.NgnAVSession.isSendingVideo ()
- 是否发送视频
-
- static boolean org.doubango.ngn.sip.NgnAVSession.makeAudioCall (String remoteUri, NgnSipStack sipStack) [static]
- 音频呼叫
-
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
-
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
- sipStack the SIP/IMS stack to use
-
- static boolean org.doubango.ngn.sip.NgnAVSession.makeAudioVideoCall (String remoteUri, NgnSipStack sipStack) [static]
- 同上
-
- boolean org.doubango.ngn.sip.NgnAVSession.makeCall (String remoteUri)
- 创建一个会话
-
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
-
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
-
- boolean org.doubango.ngn.sip.NgnAVSession.makeVideoSharingCall (String remoteUri)
- 开始视频分享
-
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
-
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
-
- boolean org.doubango.ngn.sip.NgnAVSession.resumeCall ()
- 恢复会议
-
- boolean org.doubango.ngn.sip.NgnAVSession.sendDTMF (int digit)
- 发送dtmf数字信息
- Parameters:数字
-
- void org.doubango.ngn.sip.NgnAVSession.setContext (Context context)
- 设置句柄
-
- void org.doubango.ngn.sip.NgnAVSession.setRotation (int rot)
- 设置本地视频的旋转角度
-
- void org.doubango.ngn.sip.NgnAVSession.setSpeakerphoneOn (boolean speakerOn)
- 设置是否开启扬声器
-
- void org.doubango.ngn.sip.NgnAVSession.setState (InviteState state)
- 设置会议状态
-
- final View org.doubango.ngn.sip.NgnAVSession.startVideoConsumerPreview ()
- 启动视频
-
- final View org.doubango.ngn.sip.NgnAVSession.startVideoProducerPreview ()
- 同上
-
- void org.doubango.ngn.sip.NgnAVSession.toggleCamera ()
- 切换相机
-
- void org.doubango.ngn.sip.NgnAVSession.toggleSpeakerphone ()
- 切换扬声器
org.doubango.ngn.NgnEngine
- synchronized boolean start ()
- synchronized boolean stop ()
- synchronized boolean isStarted ()
- void setMainActivity (Activity mainActivity)
- Activity getMainActivity ()
- INgnConfigurationService getConfigurationService ()
- INgnStorageService getStorageService ()
- INgnNetworkService getNetworkService ()
- INgnHttpClientService getHttpClientService ()
- INgnContactService getContactService ()
- INgnHistoryService getHistoryService ()
- INgnSipService getSipService ()
- INgnSoundService getSoundService ()
- Classextends NgnNativeService > getNativeServiceClass ()
- Static Public Member Functions
- static NgnEngine getInstance ()
- Protected Member Functions
- NgnEngine ()
- org.doubango.ngn.NgnEngine.NgnEngine () [protected]
- 默认构造
-
- INgnConfigurationService org.doubango.ngn.NgnEngine.getConfigurationService ()
- 获取配置服务
-
- INgnContactService org.doubango.ngn.NgnEngine.getContactService ()
- 获取联系人服务
-
- INgnHistoryService org.doubango.ngn.NgnEngine.getHistoryService ()
- 获取记录服务
-
- INgnHttpClientService org.doubango.ngn.NgnEngine.getHttpClientService ()
- 获取http交互服务
-
- static NgnEngine org.doubango.ngn.NgnEngine.getInstance () [static]
- 获取ngn引擎实例
-
- Activity org.doubango.ngn.NgnEngine.getMainActivity ()
- 获取主activity
-
- Class extends NgnNativeService> org.doubango.ngn.NgnEngine.getNativeServiceClass ()
- 获取本地服务
-
- INgnNetworkService org.doubango.ngn.NgnEngine.getNetworkService ()
- 获取网络服务
-
- INgnSipService org.doubango.ngn.NgnEngine.getSipService ()
- 获取sip服务
-
- INgnSoundService org.doubango.ngn.NgnEngine.getSoundService ()
- 获取声音服务
-
- INgnStorageService org.doubango.ngn.NgnEngine.getStorageService ()
- 获取存贮服务
-
- synchronized boolean org.doubango.ngn.NgnEngine.isStarted ()
- 是否开始
-
- void org.doubango.ngn.NgnEngine.setMainActivity (Activity mainActivity)
-
- synchronized boolean org.doubango.ngn.NgnEngine.start ()
- 开启引擎
-
- synchronized boolean org.doubango.ngn.NgnEngine.stop ()
- 停止引擎
推荐文章:
http://www.cnblogs.com/DreamSea-for-Jimmy/archive/2011/07/28/2119877.html
SIP 之 imsdroid(二)
上篇简单分析imsdroid项目,本篇继续上一篇继续分析。
继续分析
IMS Private Identity (IMPI) 身份认证 用户的id 例如:banketree
IMS Public Identity (IMPU) 公共认证 如:sip:[email protected]
服务设置:
- // Sets IP address
- final String proxyHost = "192.168.0.1";
- mConfigurationService(ConfigurationEntry.NETWORK_PCSCF_HOST, proxyHost);
- // Sets port
- final int proxyPort = 5060;
- mConfigurationService.putInt(ConfigurationEntry.NETWORK_PCSCF_PORT, proxyPort);
- Save changes
- mConfigurationService.commit();
类接口
org.doubango.ngn.sip.NgnAVSession
- boolean makeCall (String remoteUri)
- boolean makeVideoSharingCall (String remoteUri)
- Context getContext ()
- void setContext (Context context)
- final View startVideoConsumerPreview ()
- final View startVideoProducerPreview ()
- boolean isSendingVideo ()
- void toggleCamera ()
- void setRotation (int rot)
- void setSpeakerphoneOn (boolean speakerOn)
- void toggleSpeakerphone ()
- void setState (InviteState state)
- boolean acceptCall ()
- boolean hangUpCall ()
- boolean holdCall ()
- boolean resumeCall ()
- boolean isLocalHeld ()
- boolean isRemoteHeld ()
- boolean sendDTMF (int digit)
- Static Public Member Functions
- static NgnAVSession createOutgoingSession (NgnSipStack sipStack, NgnMediaType mediaType)
- static NgnAVSession getSession (long id)
- static int getSize ()
- static boolean hasSession (long id)
- static boolean hasActiveSession ()
- static NgnAVSession getFirstActiveCallAndNot (long id)
- static boolean makeAudioCall (String remoteUri, NgnSipStack sipStack)
- static boolean makeAudioVideoCall (String remoteUri, NgnSipStack sipStack)
- boolean org.doubango.ngn.sip.NgnAVSession.acceptCall () //接受一个传入的音频/视频呼叫
- Returns:
- true is succeed and false otherwise
- See also:
- hangUpCall()
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.createOutgoingSession (NgnSipStack sipStack, NgnMediaType mediaType)
- [static]
- 创建一个去电音频/视频会话
- Parameters:
- sipStack the IMS/SIP stack to use to make the call
- mediaType the media type.
- Returns:一个去电音频/视频会话
- Context org.doubango.ngn.sip.NgnAVSession.getContext ()//获取此会话相关的上下文
- Returns:上下文
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.getFirstActiveCallAndNot (long id) [static]
- 根据指定ID获取不同于第一有源音频/视频会议
- Parameters:会话id
- Returns:一个会议
- static NgnAVSession org.doubango.ngn.sip.NgnAVSession.getSession (long id) [static]
- 检索音频/视频会话的ID
- Parameters:会议id
- Returns:一个会议
- static int org.doubango.ngn.sip.NgnAVSession.getSize () [static]
- 获取一些暂停的音频/视频会议
- Returns:会议
- boolean org.doubango.ngn.sip.NgnAVSession.hangUpCall ()
- 通话结束
- Returns:
- static boolean org.doubango.ngn.sip.NgnAVSession.hasActiveSession () [static]
- 一个活动的音频/视频会议
- Returns:
- static boolean org.doubango.ngn.sip.NgnAVSession.hasSession (long id) [static]
- 是否有会议
- Parameters:会议id
- Returns:
- boolean org.doubango.ngn.sip.NgnAVSession.holdCall ()
- 检查是否有保持呼叫
- Returns:
- boolean org.doubango.ngn.sip.NgnAVSession.isLocalHeld ()
- 是否为内部电话
- Returns:
- boolean org.doubango.ngn.sip.NgnAVSession.isRemoteHeld ()
- 是否为远程电话
- Returns:
- boolean org.doubango.ngn.sip.NgnAVSession.isSendingVideo ()
- 是否发送视频
- static boolean org.doubango.ngn.sip.NgnAVSession.makeAudioCall (String remoteUri, NgnSipStack sipStack) [static]
- 音频呼叫
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
- sipStack the SIP/IMS stack to use
- static boolean org.doubango.ngn.sip.NgnAVSession.makeAudioVideoCall (String remoteUri, NgnSipStack sipStack) [static]
- 同上
- boolean org.doubango.ngn.sip.NgnAVSession.makeCall (String remoteUri)
- 创建一个会话
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
- boolean org.doubango.ngn.sip.NgnAVSession.makeVideoSharingCall (String remoteUri)
- 开始视频分享
- Parameters:
- remoteUri the remote party uri. Could be a SIP/TEL uri, nomadic number, MSISDN number, ... example:
- sip:test@doubango.org, tel:+33600000000, 78888667, ...
- boolean org.doubango.ngn.sip.NgnAVSession.resumeCall ()
- 恢复会议
- boolean org.doubango.ngn.sip.NgnAVSession.sendDTMF (int digit)
- 发送dtmf数字信息
- Parameters:数字
- void org.doubango.ngn.sip.NgnAVSession.setContext (Context context)
- 设置句柄
- void org.doubango.ngn.sip.NgnAVSession.setRotation (int rot)
- 设置本地视频的旋转角度
- void org.doubango.ngn.sip.NgnAVSession.setSpeakerphoneOn (boolean speakerOn)
- 设置是否开启扬声器
- void org.doubango.ngn.sip.NgnAVSession.setState (InviteState state)
- 设置会议状态
- final View org.doubango.ngn.sip.NgnAVSession.startVideoConsumerPreview ()
- 启动视频
- final View org.doubango.ngn.sip.NgnAVSession.startVideoProducerPreview ()
- 同上
- void org.doubango.ngn.sip.NgnAVSession.toggleCamera ()
- 切换相机
- void org.doubango.ngn.sip.NgnAVSession.toggleSpeakerphone ()
- 切换扬声器
org.doubango.ngn.NgnEngine
- synchronized boolean start ()
- synchronized boolean stop ()
- synchronized boolean isStarted ()
- void setMainActivity (Activity mainActivity)
- Activity getMainActivity ()
- INgnConfigurationService getConfigurationService ()
- INgnStorageService getStorageService ()
- INgnNetworkService getNetworkService ()
- INgnHttpClientService getHttpClientService ()
- INgnContactService getContactService ()
- INgnHistoryService getHistoryService ()
- INgnSipService getSipService ()
- INgnSoundService getSoundService ()
- Classextends NgnNativeService > getNativeServiceClass ()
- Static Public Member Functions
- static NgnEngine getInstance ()
- Protected Member Functions
- NgnEngine ()
- org.doubango.ngn.NgnEngine.NgnEngine () [protected]
- 默认构造
- INgnConfigurationService org.doubango.ngn.NgnEngine.getConfigurationService ()
- 获取配置服务
- INgnContactService org.doubango.ngn.NgnEngine.getContactService ()
- 获取联系人服务
- INgnHistoryService org.doubango.ngn.NgnEngine.getHistoryService ()
- 获取记录服务
- INgnHttpClientService org.doubango.ngn.NgnEngine.getHttpClientService ()
- 获取http交互服务
- static NgnEngine org.doubango.ngn.NgnEngine.getInstance () [static]
- 获取ngn引擎实例
- Activity org.doubango.ngn.NgnEngine.getMainActivity ()
- 获取主activity
- Class extends NgnNativeService> org.doubango.ngn.NgnEngine.getNativeServiceClass ()
- 获取本地服务
- INgnNetworkService org.doubango.ngn.NgnEngine.getNetworkService ()
- 获取网络服务
- INgnSipService org.doubango.ngn.NgnEngine.getSipService ()
- 获取sip服务
- INgnSoundService org.doubango.ngn.NgnEngine.getSoundService ()
- 获取声音服务
- INgnStorageService org.doubango.ngn.NgnEngine.getStorageService ()
- 获取存贮服务
- synchronized boolean org.doubango.ngn.NgnEngine.isStarted ()
- 是否开始
- void org.doubango.ngn.NgnEngine.setMainActivity (Activity mainActivity)
- synchronized boolean org.doubango.ngn.NgnEngine.start ()
- 开启引擎
- synchronized boolean org.doubango.ngn.NgnEngine.stop ()
- 停止引擎
推荐文章:
http://www.cnblogs.com/DreamSea-for-Jimmy/archive/2011/07/28/2119877.html