+) Development Guide 01(PC, API, C+ - Huawei

87
eSDK eLTE V200R001C00 Development Guide 01(PC, API, C+ +) Issue 01 Date 2016-10-25 HUAWEI TECHNOLOGIES CO., LTD.

Transcript of +) Development Guide 01(PC, API, C+ - Huawei

Development Guide 01(PC, API, C++)Issue 01
Date 2016-10-25
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2016. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Notice The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied.
Huawei Technologies Co., Ltd. Address: Huawei Industrial Base
Bantian, Longgang Shenzhen 518129 People's Republic of China
Website: http://www.huawei.com
Email: [email protected]
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
ii
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
iii
About eLTE Broadband Trunking
Huawei eLTE broadband trunking solution is based on the most advanced LTE wireless broadband technologies, where the maximum uplink throughput is 100 Mbit/s and the maximum downlink throughput is 50 Mbit/s. An eLTE network supports the following services: multimedia trunking voice, video dispatching, high-definition wireless video surveillance, ultra-remote data collection, and mobile office.
This solution is the first broadband trunking solution in the industry. It supports both voice and video dispatching. The delay of eLTE professional group calls is less than 300 ms and the floor preemption delay is less than 150 ms, meeting requirements of mission critical services. In addition, the video upload and video distribution functions allow the sound and image transmission during the dispatching process, achieving visible live scene and attainable commanding. The eLTE solution improves the dispatching efficiency and the quick response capability and can be applied in industries such as public safety, transportation, electric power, and energy.
For details, see the homepage of eLTE broadband trunking.
Introduction to eSDK eLTE SDK
Huawei eSDK eLTE is a set of standardly encapsulated SDK interfaces for developing the eLTE broadband trunking product, eAPP. The eSDK eLTE provides partners with the following management and dispatching functions: trunking user management, group management, P2P voice call, group voice call, attendant forwarding, discreet listening, ambiance listening, real-time video uploading and distribution, video projection, short/ multimedia message sending and receiving, trunking terminal GIS subscription, and geographical location reporting.
Powerful functions and standardized interface encapsulation facilitate partners to integrate Huawei eSDK eLTE SDK with industrial upper-layer applications for constructing secure, convenient, and practical voice and video dispatching platforms for the government, transportation, education, and high-end enterprise customers.
To prevent underlying database conflicts during third-party integration with multiple products, the eSDK eLTE SDK is encapsulated in two parts: the local service and the local API. The local service is not open, while the local API can be invoked directly. The eSDK eLTE falls into the SDK and OCX formats.
eSDK eLTE Development Guide 01(PC, API, C++) 1 Introduction to eSDK eLTE SDK
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
If you use the C# or JavaScript language for secondary development, you are advised to use the eSDK eLTE V100R005C70 Development Guide (PC,OCX,C++). You can also invoke the SDK dynamic library if you are using C#, but this operation involves a large amount of data conversion.
If you use the C++ programming language, you are advised to directly use the SDK. The Windows SDK dynamic library is encapsulated based on various function APIs. This development guide describes the details.
Contents of eSDK eLTE SDK The eSDK eLTE SDK supports secondary development on the Windows system. Currently, the supported systems include Windows7 (32-bit or 64-bit) and Windows8 (32-bit or 64-bit). The eSDK eLTE SDK contains the following contents:
l API SDK package
The API local development package is used for invoking eLTE broadband trunking services during secondary development. Obtain this file from the SDK download path.
l Sample Codes
Huawei SDK provides a series of sample codes, showing the methods of invoking the SDK to construct application projects. Obtain this file from Sample Codes.
l IDE support
Huawei eSDK provides Windows developers with demos in different languages. To provide better experience to developers, the eSDK IDE plugin tool that applies to Visual Studio is used, allowing developers to download and open demo, and access the remote lab and online help. The IDE tool helps developers complete project creation, configuration, and commissioning, simplifying the eSDK development process. For details about the eSDK IDE for Visual Studio, see IDE Tool Plugin.
l Github source codes
Open source codes are provided for Huawei eSDK eLTE secondary development. For details about the source codes, see Github.
eSDK eLTE SDK for Windows The eSDK eLTE SDK supports secondary development on the Windows system. Currently, the supported systems include Windows7 (32-bit or 64-bit) and Windows8 (32-bit or 64-bit).
eSDK eLTE Development Guide 01(PC, API, C++) 1 Introduction to eSDK eLTE SDK
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
2 Content Navigation
This development guide helps you understand how to install, configure, and use the eSDK eLTE SDK for invoking functions of the eAPP system. Therefore, it is strongly recommended that you read this guide according to the following sequence:
1. Related Resources: This section describes the software, document links, and technical supports that may be involved during secondary development. To be specific, you can learn about the method of obtaining documentation through the developer website, the link of downloading sample codes, the eLTE IDE plugin, the method of using the eLTE IDE plugin, and how to apply for the remote lab.
2. Hello World: If you only need to run the SDK, start reading from this section. This section guides you to download and install the SDK, to configure your development environment, and to quickly invoke the initialization and login interfaces for logging in to the dispatching system.
3. Initial Configuration: This section describes initialization configuration operations before starting service development, such as setting the log path, obtaining the SDK version, initializing resources, setting message callback functions, logging in to the eAPP server, and triggering the status report.
4. Typical Development Scenarios: This section describes typical functions of the eSDK eLTE SDK, as well as the development process, sample codes, and precautions.
5. Troubleshooting Guide: This section describes how to troubleshoot common problems occurred during the development.
6. Change History: This section describes changes between development guides of different versions.
Reading Tips l If you are learning and using the eSDK eLTE SDK for the first time, read the
development guide chapter by chapter. l If you want to understand the secondary development for core services, read chapter
Typical Development Scenarios. l If the interface function required is not provided in this guide, see eSDK eLTE
V200R001C00 Interface Reference (PC,API). l If you bump into any problem during using the eSDK eLTE SDK, see chapter
Troubleshooting Guide or the online FAQ for eLTE on Huawei developer zone website. If no solution is provided, you can post you question on DevCenter and we will reply you as soon as possible. For more details, see section Technical Support Channel.
eSDK eLTE Development Guide 01(PC, API, C++) 2 Content Navigation
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
3
NOTE
This development guide is for the SDK of version 2.1.00. If you need to view development guides for the SDK of other versions, go to Huawei developer resource center - eLTE.
eSDK eLTE Development Guide 01(PC, API, C++) 2 Content Navigation
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
4
3.2 SDK Download Path
3.7 SDK Change History
3.8 Technical Support Channel
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
5
3.1 eSDK eLTE Zone Portal On Huawei eLTE developer zone, you can experience the eLTE service functions, obtain information about second development on eSDK eLTE, the Hello World, development guides, interface references, FAQ, and technical support, as well as download SDK resources.
3.2 SDK Download Path Visit the Resource Center of Huawei Developer Zone, choose SDK > eLTE Broadband Trunking > eAPP610 > eSDK eLTE API SDK service package ,and download the SDK software package of the required version.
NOTE
The SDK version of this development guide is V2.1.00.
3.3 Sample Codes Sample codes for the five functions described in Typical Development Scenarios are provided, showing how to invoke the eLTE service functions using the SDK.
NOTE
Use Visual Studio2010 or later to compile and execute the sample codes.
List of Sample Codes
eLTE_ResourceManage An eLTE SDK-based C++ sample that demonstrates the resource management capability of Huawei eSDK eLTE broadband trunking system, including the user management, group management, and recording file query functions
eLTE_Audio An eLTE SDK-based C++ sample that demonstrates the voice dispatching capability of Huawei eSDK eLTE broadband trunking system, including the P2P voice call, group voice call, emergent group call, attendant forwarding, discreet listening, and ambience listening functions
eLTE_SDK_Video_Demo An eLTE SDK-based C++ sample that demonstrates the video dispatching capability of Huawei eSDK eLTE broadband trunking system, including the real-time video uploading, video distribution, and video projection functions
eLTE_SDS An eLTE SDK-based C++ sample that demonstrates the short data capability of Huawei eSDK eLTE broadband trunking system, including the sending P2P or group SMS and MMS, and receiving SMS and MMS functions
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
Sample Codes Name Function Description
eLTE_SDK_GIS_Demo An eLTE SDK-based C++ sample that demonstrates the terminal GIS subscription capability of Huawei eSDK eLTE broadband trunking system. The location periodically reported by a UE can be obtained by subscribing to the GIS of the UE.
3.4 Interface Reference The interface reference includes the following contents:
Overview: specifies the mapping version, background, scenarios, and prerequisites, as well as the information to be obtained and functions to be achieved through the interfaces.
Interface details:
l Interface description: describes the interface function, application scenarios, and usages. l Instruction for use: describes the precautions and restrictions for using an interface
function, interfaces with similar functions or interfaces that must be used together with this interface, as well as the prerequisites.
l Method definition: describes the complete statement of an interface function. l Parameter description: describes the parameter meaning, value ranges, use restrictions,
and dependencies between parameters. l Return value: describes the returned value of an interface function. l Example: provides an example for using an interface function. Explanation is required
for key codes.
Error codes:
This section provides a complete list of error codes, including all error codes that may occur during the development process as well as the description on the error codes.
3.5 IDE Tool Plugin The IDE tool plugin that applies to Visual Studio is provided. The IDE tool plugin supports the following functions:
l One-click download and installation for the SDK One-click download and installation for SDK packages facilitates the SDK management.
l Remote access to the lab anytime anywhere Remote access anytime anywhere makes the lab access more convenient.
l Wizard for creating a demo The wizard for creating a demo helps a developer quickly configure the demo and access the remote lab for commissioning, bringing better experience.
l Easy project creation A project can be created quickly. The package manger allows reference operations on downloaded packages, not requiring manual adding.
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
l Quick online support The online support platform supports instant messages and voice calls, achieving efficient communication.
l One-click query for online documentation The one-click query function makes SDK documentation query more convenient.
The eSDK IDE plugin enables the quick configuration for eLTE demo projects and automatic installation of the eLTE SDK package, increasing the secondary development efficiency. For more information about the IDE tool, see IDE Quick Guide.
3.6 Free Application for the Remote Lab
Huawei eSDK Remote Lab Introduction
The Huawei remote lab provides a 24/7 free cloud lab environment and real Huawei devices for developers to develop and commission applications online remotely. Using the remote lab self-management platform, developers can implement secondary development related to Huawei products without the need to purchase them and can remotely test and authenticate their applications. Currently, Huawei remote lab has established 26 lab environments that are classified into seven ecosystems, which are cloud computing, SDN, Big Data, Unified Communications and Collaboration (UC&C), bring your own device (BYOD), enterprise Long Term Evolution (eLTE), and agile network.
For details, visit the remote lab homepage.
Advantages of the Remote Lab l Low entry barrier: Users who have been registered on the Huawei official website can
apply to use the remote lab. Note that the environments that can be reserved, reservation duration, and the number of times the environments can be reserved are restricted.
l Hierarchical support: Environments are divided into different domains. Key developers and partners can access premium environments.
l High-speed connection between global resources: Huawei has established labs around the world with Suzhou remote lab as the center depending on the global high performance (delay less than 100 ms) backbone network and end-to-end support for applications.
How to Apply for the Remote Lab for Free
Figure 3-1 Registration process
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
1. If you have a Huawei official website account, log in to the remote lab directly using the account.
2. If you have not registered on the Huawei official website, click Enter Remote Lab on the remote lab homepage. On the registration page, enter the registration information. Then, log in to your email account used for registration, open the confirmation email, and click the confirmation link to activate your Huawei account. When the account is successfully activated, the Huawei remote lab homepage is automatically displayed, and you are logged in.
Step 2 Reserve an environment.
1. If you have successfully reserved an environment, and the environment is available, skip this step.
2. Click RESERVE under Unified Communication 2.3.
The environment reservation window is displayed, and the reservation duration is 2 hours by default, as shown in figure.
3. After you successfully reserve the environment, the system automatically sends the Secure Sockets Layer virtual private network (SVN) gateway address, user name, and password to your registered email address.
4. Log in to your registered email account, open the email of the environment information, download the virtual private network over Secure Sockets Layer (SSL VPN) client as prompted, and install the client on the local PC.
In subsequent steps, you need to use the environment information to log in to the SVN client and connect to the environment remotely.
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
Step 3 Access the environment.
1. If you have successfully accessed the Huawei remote lab, skip this step. Open the SVN client. In the login window, enter the SVN gateway address, user name, and password you previously obtained and click Login.as shown in figure.
2. After the success of the connection will be in the system status bar prompts VPN connection success" .
Step 4 Commission and release your application.
Log in to the environment using the UC platform account, password, IP address, and port to complete the login and commission your application. For details, see UC Platform Login Information.
----End
3.7 SDK Change History The SDK is continuously updated to support new services. You can check the differences between different versions by clicking the links to history versions on the developer zone website. The updated items include:
l Version information, including the submitter, latest version, creation time, and latest update
l Download link l Feature list l Prerequisite upgrade l Deleted features l Supported API versions and the version release times
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
10
3.8 Technical Support Channel l If you have any question during the development, submit your question on DevCenter
and trace the question state there. l If you have any question during using the remote lab, contact us in either of the
following methods:
a. Huawei technical support hotline: 400-882-8000 b. Huawei technical support email: [email protected]
eSDK eLTE Development Guide 01(PC, API, C++) 3 Related Resources
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
11
4 Hello World
This section uses the C++ language as an example for secondary development of the eSDK eLTE API to achieve the login of a dispatcher in to the dispatching system.
For troubleshooting in the development process, see chapter 7 Troubleshooting Guide.
4.1 Hello World Development Process
4.2 Step1 Preparing Resources
4.5 Step4 Compiling Codes
4.6 Step5 Debugging Codes
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
12
4.1 Hello World Development Process The following example describes how to perform eSDK eLTE API secondary development in C++.
For details about how to troubleshoot during development, see Troubleshooting Guide.
The following figure shows the Hello World demo development process.
4.2 Step1 Preparing Resources
Before starting secondary development, prepare the following environment and resources:
l Operating system: Windows 7 Professional, which is available on Microsoft official website
l Microsoft Visual Studio: Visual Studio 2010 professional or later, which is available on Microsoft official website
l Microsoft Visual Studio Service Pack 1: installed on the PC running Windows 7 Professional and Visual Studio 2010 professional. For the installation method, see the Visual Studio official website.
l eLTE broadband trunking environment: If you did not purchase Huawei eLTE broadband trunking products, log in to Huawei remote lab to apply for a lab environment for free. With the remote lab environment, you can experience eLTE broadband trunking services and debug your secondary development codes.
Obtaining the SDK Resources
SDK software package name: eSDK_eLTE_API_V2.1.00.zip
SDK software package download path: See SDK Download Path, entry "eSDK eLTE OCX API SDK service package" download page.
NOTE
4.3 Step2 Installing Local Services 1. Decompress the eLTE_SDK development resource package to the project directory.
2. Run the eLTE_NativeService/InstallService.bat file in the project directory as the administrator. If a message as shown in the following figure is displayed, the service is installed successfully.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
3. To uninstall the service, run UninstallService.bat in the same directory as InstallService.bat. If a message as shown in the following figure is displayed, the service is uninstalled successfully.
4.4 Step3 Creating a Project 1. Start Microsoft Visual Studio2010 and choose File > New > Project. The New Project
window is displayed.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
14
2. In the New Project window, choose Visual C++ > MFC > MFC Application and enter the project name eLTE_API_Demo.
3. Click OK. The MFC Application Wizard is displayed, as shown in the following figure.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
15
4. Click Next. In the Application Type window, select Dialog based for Application type and deselect Use Unicode libraries, as shown in the following figure.
5. Click Finish. The project is created successfully. 6. Right-click the project and choose Properties, as shown in the following figure.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
16
7. Choose Linker > Input to add library files.
8. Choose Linker > General to add the path for library files.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
17
9. Choose C/C++ > General to add the path for header files eLTE_Types.h and eLTE_SDK.h.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
18
10. Open Resource View and choose eLTE_API_Demo > eLTE_API_Demo.rc. Double- click IDD_ELTE_API_DEMO_DIALOG. See the following figure.
11. Delete the automatically generated controls in IDD_ELTE_API_DEMO_DIALOG. Open Toolbox and add a button. Right-click the button and choose Properties from the shortcut menu. Change Caption to Login and set the ID of the button to IDC_BUTTON_LOGIN. Then, drag the control to a proper position on the page. The following figures shows the system UI.
4.5 Step4 Compiling Codes 1. Add the header file to stdafx.h. The codes are shown as follows.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
19
2. Add the event callback statement in the CeLTE_API_DemoDlg of eLTE_API_DemoDlg.h. The codes are shown as follows. public: // Event callback function static ELTE_VOID __SDK_CALL ELTE_EventCallBack(ELTE_INT32 iEventType, ELTE_VOID* pEventBuf, ELTE_UINT32 uiBufSize, ELTE_VOID* pUserData);
3. Add callback message processing in eLTE_API_DemoDlg.cpp. The codes are shown as follows. ELTE_VOID __SDK_CALL CeLTE_API_DemoDlg::ELTE_EventCallBack(ELTE_INT32 iEventType, ELTE_VOID* pEventBuf, ELTE_UINT32 uiBufSize, ELTE_VOID* pUserData) { //If the character string <StatusValue>4011</StatusValue> is found in the callback message, Login Success is displayed. char* pEventXml = (char*)pEventBuf; CString xmlStr(pEventXml); CeLTE_API_DemoDlg* pDlg = (CeLTE_API_DemoDlg*)pUserData; int i = xmlStr.Find("<StatusValue>4011</StatusValue>"); if(ELTE_Event_NotifyResourceStatus == iEventType&&i!=-1) { pDlg->MessageBox("Login Success"); } }
4. Double-click the Login button and add the codes as follows. // Initializing SDK ELTE_INT32 iRet = ELTE_SDK_Init(FALSE); if(0 != iRet) { MessageBox(_T("ELTE_SDK_Init failed.")); return; } // Setting the callback function iRet = ELTE_SDK_SetEventCallBack(ELTE_EventCallBack, this); if(iRet!=0) { MessageBox(_T("ELTE_SDK_SetEventCallBack failed.")); return; } //Configure login information as required //Username CString strUserName = ("4120"); //Password CString strPWD = ("4120"); //Server IP address CString strServerIP = ("172.22.9.120"); //Local IP address CString strLocalIP = ("172.23.0.32"); //Port number int SipPort = 5060; //Login iRet = ELTE_SDK_Login(strUserName, strPWD, strServerIP, strLocalIP, SipPort); if(iRet!=0) { MessageBox("ELTE_SDK_Login failed."); return; }
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
20
4.6 Step5 Debugging Codes 1. Right-click the project and choose Properties > Configuration > General. Set Output
Directory to the directory of the library file eLTE_SDK.dll, as shown in the following figure.
2. Right-click the project and choose Properties > C/C++ > Code Generation. In debug mode, set Runtime Library to Multi-threaded Debug DLL (/MDd), as shown in the following figure.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
21
3. Choose Build > Rebuild Solution to generate an .exe file, as shown in the following figure.
4. The following uses the user login interface as an example for debugging.
If you have purchased Huawei eLTE products, directly enter the username, password, server IP address, local IP address, and the server port in eLTE_API_DemoDlg.CPP to debug the codes.
If you did not purchase any Huawei eLTE product, log in to Huawei remote laboratory and apply for a free debugging environment to run you codes.
Type the correct username, password, server IP address, local IP address, and server port number in the codes.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
22
In the corresponding output path, such as D:\Project \eSDK_eLTE_API_V1.5.70\release\eLTE_SDK, run eLTE_API_Demo.exe and click Login. Login Success is displayed, indicating a successful login, as shown in the following figure.
eSDK eLTE Development Guide 01(PC, API, C++) 4 Hello World
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
23
5 Initial Configuration
The initial configuration described in this section must be completed before you start the eLTE service secondary development. The initialization configuration is not required in follow-up development processes but can be modified.
5.1 Setting the Log Path
5.2 Obtaining the SDK Version
5.3 Initializing Resources
5.6 Triggering a Status Report
eSDK eLTE Development Guide 01(PC, API, C++) 5 Initial Configuration
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
24
5.1 Setting the Log Path By default, the SDK generates log files in the directory of the running program. If you want to specify another log path, invoke the ELTE_SDK_SetLogPath interface to set the log path.
In the development and debugging phases, you are recommended to enable the debug logs. Debug logs provide detailed SDK running information and error messages, facilitating problem locating. In the version release phase, you are recommended to disable debug logs to reduce file input/output operations and to increase the program running efficiency.
NOTE
You must specify the log path before invoking the ELTE_SDK_Init interface. Otherwise, the setting cannot take effect. A relative path is not recommended and a relative path cannot start with \.
A code example is as follows: //cpp code ELTE_INT32 iRet = ELTE_SDK_SetLogPath("D:\\log\\"); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
Alternatively, you can set the log path and log level by modifying configuration files. To be specific, open the file eSDKClientLogCfg.ini in the directory of the secondary development package and change LogPath=./logs to LogPath=a specified path. Use an absolute path as possible.
5.2 Obtaining the SDK Version Invoke the ELTE_SDK_GetVersion interface to obtain the SDK version.
A code example is as follows: //cpp code ELTE_CHAR* pChar = NULL; ELTE_INT32 iRet = ELTE_SDK_GetVersion(&pChar); if(eLTE_SDK_ERR_SUCCESS== iRet) { //Succeed ELTE_SDK_ReleaseBuffer(pChar); }
5.3 Initializing Resources Invoke the ELTE_SDK_Init interface to initialize the SDK resource and pre-allocate the memory resource.
NOTE
Before using the function provided by the SDK, invoke this interface to initialize relevant resources. If the input parameter is set to 1, the video stream is received by a third party. If the input parameter is set to 0, the API receives the video stream and the P2P voice call and group call functions can be invoked.
A code example is as follows: //cpp code ELTE_INT32 iRet = ELTE_SDK_Init(0);
eSDK eLTE Development Guide 01(PC, API, C++) 5 Initial Configuration
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
25
if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
5.4 Setting Callback Functions Most service interfaces for eSDK eLTE are asynchronous and a successful invocation on an interface only indicates that the command is successfully delivered to the system. If you want to know the execution of an interface invocation, the ELTE_EventCallBack interface must be invoked to parse the event types in the callback function.
//cpp code //call back function declaration static ELTE_VOID __SDK_CALL ELTE_EventCallBack(ELTE_INT32 iEventType,ELTE_VOID* pEventBuf, ELTE_UINT32 uiBufSize, ELTE_VOID* pUserData); //set call back function ELTE_INT32 iRet = ELTE_SDK_SetEventCallBack(ELTE_EventCallBack, NULL); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
5.5 Logging In to the eAPP System Invoke the login interface ELTE_SDK_Login to log in to the eAPP system. In this interface invocation, you must enter the username, password, eMDC IP address, local IP address communicating with the eMDC, and SIP port number of the eMDC. A code example is as follows:
//cpp code ELTE_INT32 iRet =ELTE_SDK_Login("4120", "4120", "172.22.9.105","172.24.4.253", 5060); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
5.6 Triggering a Status Report Before invoking the state report interface, you must receive a callback message that is completed by the automatic download configuration ELTE_Event_NotifyProvisionAllResync. All service interfaces can be invoked only after this callback message is received.
Invoke the ELTE_SDK_TriggerStatusReport interface to enable the status report function. The application receives corresponding status callback messages once a user gets online or offline.
A code example is as follows:
//cpp code ELTE_INT32 iRet = ELTE_SDK_TriggerStatusReport(1); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
eSDK eLTE Development Guide 01(PC, API, C++) 5 Initial Configuration
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
26
This chapter describes the following typical development scenarios:
6.1 Resource Management
6.2 Voice Dispatching
6.3 Video Dispatching
6.5 GIS Subscription
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
27
6.1 Resource Management
6.1.1 Overview This section describes how to obtain information about users and groups in the eAPP system. User lists, group lists, group member lists, information about a user, and information about a group can be obtained. In addition, functions of creating and deleting dynamic groups are also described in this section. The resource management function allows unified management on resources.
NOTE
Operations such as adding, deleting, or modifying users and common groups can only be performed on the eAPP management system. For details, see eLTE Trunking Operation Support System Product Documentation.
The eAPP supports automatic recording for voice and video calls based on certain conditions. The recorded files can be queried using a third-party dispatching console.
In addition, you can replay the recorded files or download the files to a local PC using a third- party dispatching console.
NOTE
For details about how to configure the automatic recording policy, see the eAPP Product Documentation.
The interfaces are categorized by the following scenarios and described in detail in the following sections.
l User and Group Management l Obtaining the List of Recorded Files
6.1.2 User and Group Management Development tasks in this section: obtaining information about the dispatching console (DC), obtaining the DC user list, obtaining information about a user, obtaining the DC group list, obtaining the list of members in a specific group, obtaining information about a group, creating a dynamic group, obtaining the list of members in a dynamic group, deleting a dynamic group.
Interface Invocation Process:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
28
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
29
Prerequisites The Initial Configuration has been completed and the media plane is configured.
Obtaining Information About a DC Invoke the ELTE_SDK_GetDcInfo interface to obtain information about a DC. The input parameters include the DC user ID and a null pointer. The returned XML packet of the null pointer includes information about the DC ID, alias, role, and privilege. A null pointer must be pre-defined for any query interface.
NOTE
The information about a DC in use can only be queried by invoking this interface.
Interface invocation code example: //cpp code //Define a character null pointer ELTE_CHAR* pChar = NULL; //Gets the details of the current login schedule 4116 ELTE_INT32 iRet = ELTE_SDK_GetUserInfo("4120", &pChar); //To determine whether the interface call is successful, after the success of the release of the character pointer memory if(0 == iRet) { //Interface call success, through the message box or other means to display the results of the query MessageBox(pChar); //Release character pointer pChar of memory ELTE_SDK_ReleaseBuffer(pChar); }
The following shows an example of the returned DC information. //xml code <Content>
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
30
<DcInfo> <DcID>4116</DcID> <Priviledge>65535</Priviledge> <Role>1</Role> <Alias></Alias> </DcInfo> </Content>
The DcInfo node includes information about the DC ID, privilege, role, and alias.Node description, please refer to the ELTE_SDK_GetDcInfo interface . According to the development needs of these information processing and display
Obtaining the User List of a DC Invoke the ELTE_SDK_GetDcUsers interface to obtain the list of users managed by a DC. The returned XML packet includes the fields UserID, UserCategory, UserPriority, and UserName.
Interface invocation code example:
//cpp code //Obtaining the user list of a DC ELTE_CHAR* pChar = NULL; ELTE_INT32 iRet = ELTE_SDK_GetDcUsers("4120", &pChar); //4120 indicates the DC ID, &Pchar indicates the returned xml packet if(0 == iRet) { //Succeed ELTE_SDK_ReleaseBuffer(pChar); //The requested memory is released if the query suceeds. }
The following shows an example of the returned DC user list.
//xml code <Content> <UserInfoList> <UserInfo> <UserID>4116</UserID> <UserCategory>0</UserCategory> <UserPriority>15</UserPriority> <UserName>4116</UserName> </UserInfo> <UserInfo> <UserID>8895</UserID> <UserCategory>9</UserCategory> <UserPriority>15</UserPriority> <UserName>8895</UserName> </UserInfo> ...... </UserInfoList> </Content>
The UserInfoList node includes information about the user ID, user category, user priority, and user name.Different values of UserCategory indicate different user types, which are describes as follows:
0: Dispatcher indicates a DC user.
1: FIXEDCAMERA indicates a fixed camera.
2: PSTNUSER indicates a PSTN user.
3: TETRAUSER indicates a TETRA user.
4: PLMNUSER indicates a PLMN user.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
31
6: SDKUSER indicates an SDK gateway internal user.
7: APPUSER indicates a tAPP user.
8: UELOGINUSER indicates a logged-in terminal user.
9: PTTUSER indicates a PTT user.
50: ALLTYPEUSER indicates a user of any user type.
100: DECUSER indicates a DEC user.
255: OTHERUSER indicates a user whose type is not defined.
You can display the user list or icons based on the user types as required.
Obtaining Information About a User Invoke the ELTE_SDK_GetUserInfo interface to obtain information about a user. The returned XML packet includes the fields UserID, UserCategory, UserPriority, and UserName.
Interface invocation code example:
//cpp code //Obtaining information about a user ELTE_CHAR* pChar = NULL; //Get a user details, 8895 are to be acquired by the user &PChar, ID is the return of the user information XML message ELTE_INT32 iRet = ELTE_SDK_GetUserInfo("4120", &pChar); //Determines whether the interface call is successful if(0 == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The following shows an example of the returned user information.
//xml code <Content> <UserInfo> <UserID>8895</UserID> <UserCategory>9</UserCategory> <UserPriority>15</UserPriority> <UserName>8895</UserName> </UserInfo> </Content>
The UserInfo node includes information about the user ID, user category, user priority, and user name.
Obtaining the Group List of a DC Invoke the ELTE_SDK_GetDcGroups interface to obtain the list of groups managed by a DC. The returned XML packet includes the fields GroupID, GroupCategory, GroupPriority, and GroupName.
Interface invocation code example:
//cpp code //Obtaing the DC group list ELTE_CHAR* pChar = NULL; //Get the scheduling table of the group list, 4116 is the scheduling table
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
32
&PChar, ID is the return of the group list XML message ELTE_INT32 iRet = ELTE_SDK_GetDcGroups("4120", &pChar); //Determines whether the interface call is successful if(eLTE_SDK_ERR_SUCCESS == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The following shows an example of the returned group list. The GroupInfoList node includes information about the group ID, group category, group priority, and group name.
//xml code <Content> <GroupInfoList> <GroupInfo> <GroupID>1001</GroupID> <GroupCategory>1</GroupCategory> <GroupPriority>15</GroupPriority> <GroupName>test group</GroupName> </GroupInfo> <GroupInfo> <GroupID>1002</GroupID> <GroupCategory>1</GroupCategory> <GroupPriority>15</GroupPriority> <GroupName>test group1002</GroupName> </GroupInfo> ...... </GroupInfoList> </Content>
The GroupInfoList node includes information about the group ID, group category, group priority, and group name.
Different values of GroupCategory indicate different user types, which are describes as follows:
0: GRP_ALLBROADCAST indicates a network-wide broadcast group.
1: GRP_GENERAL indicates a common group.
2: GRP_AREABROADCAST indicates a regional broadcast group.
8: GRP_EXTERNAL indicates an external group.
9: GRP_DYNAMICGRP indicates a dynamic group.
10: GRP_ALLTYPE indicates a group of any type.
You can display the group list or icons based on the group types as required.
Obtaining the Members of a Group
Invoke the ELTE_SDK_GetGroupUsers interface to obtain the member list of a group. The returned XML packet includes the fields UserID, GroupID, UserPriority, and MemberType.
Interface invocation code example:
//cpp code //Obtaining the member list of a group ELTE_CHAR* pChar = NULL; //Gets the member list of the group 1001, and the 1001 is the group ID, and the &PChar is the XML message returned by the group member list ELTE_INT32 iRet = ELTE_SDK_GetGroupUsers("1001", &pChar); //Determines whether the interface call is successful if(0 == iRet)
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
33
{ //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The pChar character pointer returns the group member list information as follows:
//xml code <Content> <GroupUserInfoList> <GroupUserInfo> <UserID>8888</UserID> <GroupID>1001</GroupID> <UserPriorityInGroup>15</UserPriorityInGroup> <MemberType>1</MemberType> </GroupUserInfo> <GroupUserInfo> <UserID>8890</UserID> <GroupID>1001</GroupID> <UserPriorityInGroup>15</UserPriorityInGroup> <MemberType>1</MemberType> </GroupUserInfo> ...... </GroupUserInfoList> </Content>
Returns the information in each node description please refer to the interface document ELTE_SDK_GetGroupUsers.
Obtaining Information About a Group
Invoke the ELTE_SDK_GetGroupInfo interface to obtain information about a group. The returned XML packet includes the fields GroupID, GroupCategory, GroupPriority, GroupName, and GroupCreator.
Interface invocation code example:
//cpp code //Obtaing information about a group ELTE_CHAR* pChar = NULL; //Get the details of group 1001, 1001 is to get the group ID, &PChar is the return of the group information XML message ELTE_INT32 iRet = ELTE_SDK_GetGroupInfo("1001", &pChar); //Determines whether the interface call is successful if(0 == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The following shows an example of the returned group information. //xml code
//xml code //Output of the group information query <Content> <GroupInfo> <GroupID>1001</GroupID> <GroupCategory>1</GroupCategory> <GroupPriority>15</GroupPriority> <GroupName>TEST1001</GroupName> <GroupCreator></GroupCreator> </GroupInfo> </Content>
The GroupInfo node includes information about the group ID, group category, group priority, group name, and group creator.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
34
Obtaining the Patch Group List of a DC Invoke the ELTE_SDK_GetPatchGroups interface to obtain the list of patch groups managed by a DC.
Interface invocation code example:
//cpp code //Define a character null pointer ELTE_CHAR* pChar = NULL; //Gets a list of all the assigned groups in the dispatch table 4116, and the &PChar is a set of information returned by the XML message ELTE_INT32 iRet = ELTE_SDK_GetPatchGroups("4116", &pChar); //Determines whether the interface call is successful if(0 == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The returned strResult message:
//xml code <Content> <PatchGroupInfoList> <PatchGroupInfo> <GroupNumber>99899983</GroupNumber> <SetupDcId>4116</SetupDcId> <PGPriority>1</PGPriority> <DcPatchIndex>1</DcPatchIndex> <PGName>test1</PGName> <VPNID>0</VPNID> </PatchGroupInfo> <PatchGroupInfo> <GroupNumber>99899999</GroupNumber> <SetupDcId>4130</SetupDcId> <PGPriority>3</PGPriority> <DcPatchIndex>1</DcPatchIndex> <PGName>a1</PGName> <VPNID>0</VPNID> </PatchGroupInfo> ...... </PatchGroupInfoList> </Content>
The PatchGroupInfo node includes information about the patch group ID, creator ID, priority, and patch group index.
Obtaining the Members of a Patch Group Invoke the ELTE_SDK_GetGroupMemberByPatchId interface to obtain the list of members in a patch group.
Interface invocation code example:
//cpp code //Define a character null pointer ELTE_CHAR* pChar = NULL; //Gets a list of 99899999 members of the group, and &PChar is a member of the group that is returned by the XML messageELTE_INT32 iRet = ELTE_SDK_GetGroupMemberByPatchId("99899999", &pChar); //Determines whether the interface call is successful if(0 == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
35
Obtaining the attribute information of a Patch Group
Invoke the ELTE_SDK_GetPatchGroupInfo interface to obtain the lattribute information of a Patch Group.
Interface invocation code example:
//cpp code //Define a character null pointer ELTE_CHAR* pChar = NULL; //Get access to the group 99899999 of the detailed information, &PChar is returned to send the group details XML message ELTE_INT32 iRet = ELTE_SDK_GetPatchGroupInfo("99899999", &pChar); //Determines whether the interface call is successful if(0 == iRet) { //Interface to call success, the release of the application of memory ELTE_SDK_ReleaseBuffer(pChar); }
The returned strResult message:
Creating a Dynamic Group
Invoke the ELTE_SDK_CreateDynamicGroup interface to create a dynamic group. The input parameters include the group ID, group creator (ID of the DC user), member groups, and member users.
The following shows an example of the input parameter XML.
//cpp code //Create a dynamic group CString strDGNAParam; strDGNAParam.Append("<Content>"); //Dynamic group ID, can not fill, automatically generated by the system strDGNAParam.Append("<GroupID>"); strDGNAParam.Append("</GroupID>"); //Create the DC user number of the dynamic group, this parameter is currently not used, do not fill in strDGNAParam.Append("<DcID>");
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
36
strDGNAParam.Append("</DcID>"); // Dynamic group alias, can not fill, string length is less than or equal to 32 strDGNAParam.Append("<Alias>"); strDGNAParam.Append("Test1"); strDGNAParam.Append("</Alias>"); //Dynamic group priority, range: 1 ~ 15 strDGNAParam.Append("<Priority>"); strDGNAParam.Append("15"); strDGNAParam.Append("</Priority>"); //Dynamic group of the maximum call length, range: 1 ~ 66535 strDGNAParam.Append("<MaxPeriod>"); strDGNAParam.Append("60"); strDGNAParam.Append("</MaxPeriod>"); //Dynamic group list, the maximum value of 8, respectively, the incoming group ID, dynamic group members in the group and the user list can be a member of the list is empty strDGNAParam.Append("<GroupList>"); strDGNAParam.Append("<GroupID>"); strDGNAParam.Append("1001"); strDGNAParam.Append("</GroupID>"); strDGNAParam.Append("</GroupList>"); //User member list, the maximum value of 200, respectively, incoming user ID strDGNAParam.Append("<UserList>"); strDGNAParam.Append("<UserID>"); strDGNAParam.Append("8895"); strDGNAParam.Append("</UserID>"); strDGNAParam.Append("</UserList>"); strDGNAParam.Append("</Content>"); //User member list, the maximum value of 200, respectively, incoming user ID ELTE_INT32 iRet = ELTE_SDK_CreateDynamicGroup(strDGNAParam); //Determines whether the interface call is successful if(0 == iRet) { //Succeed }
The following shows an example of the output for a successful dynamic group creation.
//xml code <Content> <ResourceID>0</ResourceID> <ResourceName></ResourceName> <StatusType>21</StatusType> <StatusValue>4024</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> </Content>
StatusType said that the user's dynamic state of reorganization, StatusValue=4024 said the success of the dynamic reorganization of resources, dynamic group to modify the success of.
Obtaining the Members of a Dynamic Group Invoke the ELTE_SDK_GetGroupUsers interface. For details, see Obtaining the Members of a Group.
Modifying a Dynamic Group Invoke the ELTE_SDK_ModifyDynamicGroup interface to add users to or delete users from a dynamic group.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
37
NOTE
l Before invoking this interface, ensure that the creator of the target dynamic group is the current DC user and has subscribed to the dynamic group,invoke the ELTE_SDK_SubJoinGroup to Subscribe the group .
l Before invoking this interface, invoke the ELTE_SDK_GetGroupUsers interface to obtain the members of the dynamic group to be modified.
Interface invocation code example:
By parsing the message callback event function ELTE_Event_NotifyResourceStatus, get the XML message format as follows:
//xml code <Content> <ResourceID>0</ResourceID> <ResourceName></ResourceName> <StatusType>21</StatusType> <StatusValue>4024</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> </Content>
NOTE
If StatusType=21, StatusValue=4024, illustrate the success of the modified dynamic group.
Deleting a Dynamic Group Invoke the ELTE_SDK_CancelDynamicGroup interface to delete a dynamic group. The input parameter is the ID of the dynamic group.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
38
NOTICE Only the dynamic group creator who has already subscribed to and joined the dynamic group can successfully delete the dynamic group. A DC user automatically subscribes to and joins a dynamic group after creating the dynamic group. If the DC user re-logs in to the DC, the DC user must invoke the interface for subscribing to and joining a group to subscribe to and join the group.
Interface invocation code example:
//cpp code //Deleting a dynamic group ELTE_INT32 iRet = ELTE_SDK_CancelDynamicGroup("60002"); if(eLTE_SDK_ERR_SUCCESS== iRet) { //Succeed }
The following shows an example of the output for a successful dynamic group deletion.
//xml code <Content> <ResourceID>99899964</ResourceID> <ResourceName></ResourceName> <StatusType>11</StatusType> <StatusValue>4004</StatusValue> <AttachingGroup>0</AttachingGroup> </Content>
The error code -40011 indicates that the dynamic group deletion fails because the operator has not subscribed to and joined this dynamic group. The error code -40005 indicates that the dynamic group deletion fails because the operator is not the one who created this dynamic group.
Creating a Temporary Group Invoke the ELTE_SDK_CreateTempGroup interface to create temporary group, temporary group did not delete the corresponding interface, call service after long time operation or temporary group will automatically disappear from the cancellation of users or groups.
Interface invocation code example:
//cpp code //Define an integer temporary group ID ELTE_INT32 TempGroupId; //Invoked to obtain a temporary group number interface, the output parameters of temporary group ID ELTE_INT32 iRet = ELTE_SDK_GetTempGroupID(&TempGroupId); //Convert an integer strGroupID into a string TempGroupId char strGroupID[256] = {'\0'}; sprintf_s(strGroupID,"%d", TempGroupId); //Construct a temporary group of input strings CString strMsg; strMsg.Append("<Content>"); //Temporary group ID, obtained by the above interface strMsg.Append("<GroupID>"); strMsg.Append(strGroupID); strMsg.Append("</GroupID>"); //Temporary Group founder, schedule ID, can not fill strMsg.Append("<DcID>"); strMsg.Append("</DcID>"); //Alias, can not fill
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
39
Analysis of the event callback function ELTE_Event_NotifyResourceStatus, temporary groups to create a successful callback function returns the message XML as follows:
//xml code <Content> <ResourceID>99899964</ResourceID> <ResourceName></ResourceName> <StatusType>11</StatusType> <StatusValue>4003</StatusValue> <AttachingGroup>0</AttachingGroup> </Content>
After the success of the temporary group will automatically subscribe to and join the group, ResourceID is a temporary group ID, StatusValue=4003, said resource assignment status, explain the temporary group to create and subscribe to success.
Creating a Patch Group Invoke the ELTE_SDK_CreatePatchGroup interface to create a patch group. The input parameters include the creator (DC user ID), group member list, and patch group ID.
NOTE
1. When a group of L in a user A (user L must be scheduled to the user) was launched to send a group B, the user L initiate group call, then the group B also can receive L group call, even if the L is not a member of the group B.
2. Currently assigned group members only support ordinary group .
Interface invocation code example:
//cpp code //Construct a XML string to create a group of input arguments
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
40
CString strPatchGroupParam; strPatchGroupParam.Append("<Content>"); //Create a connected group sent dispatcher ID, can not fill in strPatchGroupParam.Append("<DcID>"); strPatchGroupParam.Append("</DcID>"); //Patch group number, first create the patch group number is set to 0 by default, after the system for this patch group automatically assigned a patch number. strPatchGroupParam.Append("<PatchGroupID>"); strPatchGroupParam.Append("</PatchGroupID>"); //patch group name strPatchGroupParam.Append("<PatchGroupName>"); strPatchGroupParam.Append("PatchTestGroup"); strPatchGroupParam.Append("</PatchGroupName>"); //Send a list of the patch group members, up to 20 ordinary groups were sent to support strPatchGroupParam.Append("<PatchGroupMemberList>"); strPatchGroupParam.Append("<PatchGroupMember>"); strPatchGroupParam.Append("</PatchGroupMember>"); strPatchGroupParam.Append("</PatchGroupMemberList>"); strPatchGroupParam.Append("</Content>"); //Invoke interface to create a patch group ELTE_INT32 iRet = ELTE_SDK_CreatePatchGroup(strPatchGroupParam); //If the interface invoke fails, the output error code if(0 != iRet) { char strResult[256] = {'\0'}; sprintf_s(strResult,"%d", iRet); MessageBox(strResult); }
Analysis of the event callback function ELTE_Event_NotifyResourceStatus, sent to the group after the success of the callback function to return the message XML as follows.
//xml code <Content> <ResourceID>99899959</ResourceID> <ResourceName></ResourceName> <StatusType>24</StatusType> <StatusValue>4031</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> <MemberID>0</MemberID> </Content>
ResourceID is assigned to patch group ID, StatusType=24 represents the state of the operation, StatusValue=4031 said to send the patch group to create success.
Adding Members to a Patch Group
Invoke the ELTE_SDK_AddPatchGroupMember interface to add members to a patch group. The input parameters include the creator ID, patch group ID, patch group name, and the list of members to be added.
Interface invocation code example:
//cpp code //Construct an increase in the group of XML input parameters CString strPatchGroupParam; strPatchGroupParam.Append("<Content>"); //The founder of the ID patch group sent the dispatcher can not fill strPatchGroupParam.Append("<DcID>"); strPatchGroupParam.Append("</DcID>"); //Patch Group ID strPatchGroupParam.Append("<PatchGroupID>"); strPatchGroupParam.Append("99899959"); strPatchGroupParam.Append("</PatchGroupID>"); //Patch Group Name
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
41
Resolution of the event callback function ELTE_Event_NotifyResourceStatus, increase the success of the group members to send the callback function to return the message XML as follows:
//xml code <Content> <ResourceID>99899959</ResourceID> <ResourceName></ResourceName> <StatusType>24</StatusType> <StatusValue>4035</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> <MemberID>1001</MemberID> </Content>
ResourceID is assigned to patch group ID, StatusType=24 represents the state of the operation,StatusValue=4035 said the group to increase the success of the group, MemberID=1001 said the increase in the patch group membership is 1001.
Deleting Members from a Patch Group Invoke the ELTE_SDK_DeletePatchGroupMember interface to delete members from a patch group. Only the patch group creator can delete members from the path group.
Interface invocation code example:
//cpp code //Construct an increase in the group of XML input parameters CString strPatchGroupParam; strPatchGroupParam.Append("<Content>"); //The founder of the ID patch group sent the dispatcher can not fill strPatchGroupParam.Append("<DcID>"); strPatchGroupParam.Append("</DcID>"); //Patch Group ID strPatchGroupParam.Append("<PatchGroupID>"); strPatchGroupParam.Append("99899959"); strPatchGroupParam.Append("</PatchGroupID>"); //Patch Group Name strPatchGroupParam.Append("<PatchGroupName>"); strPatchGroupParam.Append("PatchTestGroup"); strPatchGroupParam.Append("</PatchGroupName>"); //Send a list of the patch group members, up to 20 ordinary groups were sent to support strPatchGroupParam.Append("<PatchGroupMemberList>"); strPatchGroupParam.Append("<PatchGroupMember>"); strPatchGroupParam.Append("1001");
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
42
strPatchGroupParam.Append("</PatchGroupMember>"); strPatchGroupParam.Append("</PatchGroupMemberList>"); strPatchGroupParam.Append("</Content>"); //Invoke interface to delete patch group membership list ELTE_INT32 iRet = ELTE_SDK_DeletePatchGroupMember(strPatchGroupParam); //If the interface invoke fails, the output error code if(0 != iRet) { char strResult[256] = {'\0'}; sprintf_s(strResult,"%d", iRet); MessageBox(strResult); }
Analysis of the event callback function ELTE_Event_NotifyResourceStatus, delete group members after the success of the callback function to return the message XML as follows.
//xml code <Content> <ResourceID>99899959</ResourceID> <ResourceName></ResourceName> <StatusType>24</StatusType> <StatusValue>4037</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> <MemberID>1001</MemberID> </Content>
ResourceID is assigned to patch group ID , StatusType=24 represents the state of the operation. StatusValue=4037 said to send the patch group to remove the success of the group, MemberID=1001 delete patch group membership is 1001.
Deleting a Patch Group
Invoke the ELTE_SDK_CancelPatchGroup interface to delete a patch group. The input parameter is the ID of the patch group.
Interface invocation code example:
//cpp code //Call cancel patch group interface ELTE_INT32 iRet = ELTE_SDK_CancelPatchGroup("99899959"); //Call cancel group interface if(0 != iRet) { char strResult[256] = {'\0'}; sprintf_s(strResult,"%d", iRet); MessageBox(strResult); }
Resolution of the event callback function ELTE_Event_NotifyResourceStatus, cancel the patch group after the success of the callback function to return the message XML as follows:
//xml code <Content> <ResourceID>99899959</ResourceID> <ResourceName></ResourceName> <StatusType>24</StatusType> <StatusValue>4033</StatusValue> <AttachingGroup>0</AttachingGroup> <Cause>0</Cause> <MemberID>0</MemberID> </Content>
ResourceID is assigned to patch group ID , StatusType=24 represents the state of the operation,StatusValue=4033 represents the patch group that has been created is canceled.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
43
6.1.3 Obtaining the List of Recorded Files This section describes how to obtain the list of recorded files, including the invocation process, invocation method, and precautions.
Before invoking the interface for obtaining recorded files, you must invoke the interface for initializing the media server first.
Interface Invocation Process:
The following figure shows an example for the page of obtaining the list of recorded files:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
44
Prerequisites l The Initial Configuration has been completed and the media plane is configured. l The recording plans have been configured on the MRS system and the DC user has the
right of querying recorded files.
Initializing the Media Server After you log in to the MDC and receive the event of automatic downloading for configuration data, invoke the ELTE_SDK_ProvisionManagerInitMRS interface to initialize the media server. In single station scenarios, the IP address of the media server is the same as that of the eMDC.
In distributed networking scenarios, the IP address of the media server is different from that of the eMDC. An entrance for entering the media server IP address must be provided before invoking this interface.
Interface invocation code example: //cpp code //Initializing the media server ELTE_INT32 iRet = ELTE_SDK_ProvisionManagerInitMRS("172.22.9.105");
If 0 is returned after this interface is invoked, the media server is initialized successfully. If -999 is returned, the connection to the meida server fails and the possible cause is the
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
45
incorrectly entered media server IP address. For the meaning of other returned values, see eLTE Product Error Code.
Obtaining the List of Recorded Files Invoke the ELTE_SDK_GetUserRECFileInfoList interface to obtain the list of recorded files. The input parameters include the fields CallType, Caller, Callee, ResourceID, StartSec, and EndSec.
NOTICE l Before calling the interface, make sure that the ELTE_SDK_ProvisionManagerInitMRS
interface is called and return to success. l After invoking this interface, invoke the ELTE_SDK_ReleaseBuffer interface to release
the memory resource. l For the sake of security, do not save the queried list of recorded files in the log file.
Interface invocation code example:
//cpp code //Defining the character strings for the query criteriaCString strQuery; strQuery.Append("<Content>"); strQuery.Append("<RECQueryInfo>"); //Call type: 0: voice calls 1: video call 2: Video backhaul 3: group call strQuery.Append("<CallType>"); strQuery.Append("0"); strQuery.Append("</CallType>"); //The calling number, the default value of -1 if Caller can fill, fill the calling number, Callee and ResourceID can fill in -1; if Caller and Callee fill fill the calling number called number, can fill in -1 ResourceID; strQuery.Append("<Caller>"); strQuery.Append("8890"); strQuery.Append("</Caller>"); //The called number, the default value of -1 if Callee can fill, fill the called number, then Caller and ResourceID can fill in -1; if Callee and Caller fill fill called number calling number, then ResourceID can fill in -1 strQuery.Append("<Callee>"); strQuery.Append("-1"); strQuery.Append("</Callee>"); //ID resources (including group ID and ID terminal), the default value of -1 if CallType can fill in, fill in 0 or 1, caller and callee -1 ResourceID to fill, fill the calling or called number; if CallType and callee are 2 Caller fill, fill the -1, ResourceID in audio and video file resources ID; if CallType in 3, caller and callee are filled -1, ResourceID group group number or terminal number fill; strQuery.Append("<ResourceID>"); strQuery.Append("-1"); strQuery.Append("</ResourceID>"); //Query start time, format, such as: hh:mm:ss yyyy-mm-dd, do not fill in the query all the time strQuery.Append("<StartSec>"); strQuery.Append("</StartSec>"); //Query end time, format, such as: hh:mm:ss yyyy-mm-dd, do not fill in the query all the time strQuery.Append("<EndSec>"); strQuery.Append("</EndSec>"); strQuery.Append("</RECQueryInfo>"); strQuery.Append("</Content>"); //Define an output parameter ELTE_CHAR* pQueryResult = NULL; ELTE_INT32 iRet = ELTE_SDK_GetUserRECFileInfoList(strQuery, &pQueryResult);
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
46
if(0 == iRet) { // After the interface is called successfully, the memory is released ELTE_SDK_ReleaseBuffer(pQueryResult); }
0 is returned after the interface is invoked successfully. The following shows an example of the query result.
//xml code <Content> <RECFileInfoList> <RECFileInfo> <CallType>0</CallType> <Caller>8890</Caller> <Callee>10086</Callee> <ResourceID>0</ResourceID> <StartSec>2016-09-28 21:21:52</StartSec> <EndSec>2016-09-28 21:22:06</EndSec> <UrlFTP>http://172.22.9.120:8000/ubp/rec/ 2016/09/28/21/8890_10086_20160928212152/8890_10086_20160928212152_812940.amr</ UrlFTP> <UrlRTSP>rtsp:// 172.22.9.120:8554/1_84fefd6a-857e-11e6-8000-4cb16cf61a04_1</UrlRTSP> </RECFileInfo> <RECFileInfo> <CallType>0</CallType> <Caller>8890</Caller> <Callee>8894</Callee> <ResourceID>0</ResourceID> <StartSec>2016-09-20 19:45:02</StartSec> <EndSec>2016-09-20 19:50:08</EndSec> <UrlFTP>http://172.22.9.120:8000/ubp/rec/ 2016/09/20/19/8890_8894_20160920194502/8890_8894_20160920194502_452215.amr</ UrlFTP> <UrlRTSP>rtsp:// 172.22.9.120:8554/1_aa95e6b8-7f27-11e6-8000-4cb16cf61a04_1</UrlRTSP> </RECFileInfo> </RECFileInfoList> </Content>
The query results in UrlFTP and UrlRTSP by the dispatcher authentication directly after the video playback.
6.2 Voice Dispatching
6.2.1 Overview Huawei eSDK eLTE OCX provides open voice dispatching interfaces, which support P2P voice calls, group voice calls, discreet listening, and ambience listening. Voice dispatching is one of the core functions of the eLTE broadband trunking solution.
Interfaces related to P2P voice calls include: initiating P2P voice calls, rejecting P2P voice calls, answering P2P voice calls, releasing P2P voice calls, call preemption, forcibly releasing P2P voice calls, and initiating attendant forwarding.
Interfaces related to group voice calls include: initiating a group call, preempting the floor, releasing the floor, exiting a group call, initiating an emergency group call, and forcibly releasing a group call.
Interfaces shared by P2P voice calls, group voice calls, and video upload with audio include those for muting and unmuting.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
47
Ambience listening applies only to terminals. The interface for stopping ambience listening is the interface for releasing voice calls.
The interfaces are categorized by the following scenarios and described in detail in the following sections.
The interfaces are categorized by the following scenarios and described in detail in the following sections.
l P2P Voice Call l Group Voice Call
6.2.2 P2P Voice Call This section describes how to invoke P2P voice call interfaces to perform P2P voice call services.
Flowchart of P2P voice call interface invocation:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
48
The following figure shows an example for the page of voice dispatching:
Prerequisites The Initial Configuration has been completed and the media plane is configured.
Initiating a P2P Voice Call Invoke the ELTE_SDK_P2PDial interface to initiate a P2P voice call to an online terminal, DC, or a device that interconnects to the eAPP and supports P2P voice calls.
The sequence diagram of interface invoking is as follows:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
49
Interface invocation code example:
//cpp code //Initiating a P2P voice call to a trunking terminal ELTE_INT32 iRet =ELTE_SDK_P2PDial("8890"); if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. You can use iEventType =5 in the callback function ELTE_SDK_SetEventCallBack to parse P2P voice call status. This callback function returns events related to P2P voice call status changes, including P2pcallStatus, Caller, Callee, Inserter, Targeter, and Soundtype.
Example of P2P voice call status returned by the callback function:
//xml code <Content> <P2pcallStatus>2005</P2pcallStatus> <Caller>4135</Caller> <Callee>8890</Callee> <Inserter>0</Inserter> <Targeter>0</Targeter> <Transfer></Transfer> <LocalPort>0</LocalPort> <RemotePort>0</RemotePort> <RemoteIP>0.0.0.0</RemoteIP> <SoundPtype>-1</SoundPtype> <CallID>0</CallID> <SignalError>0</SignalError> <FromString>4135</FromString> <ToString>8890</ToString> </Content>
P2pcallStatus indicates the following call status:
l P2pcallStatus=2005: The call is ongoing. l P2pcallStatus=2006: The SDK plays ringtone to prompt a user to answer or reject the
call. l P2PcallStatus=2003: The callee has answered the call.
For other status, see ELTE_Event_NotifyP2pcallStatus.
Releasing a P2P Voice Call Invoke the ELTE_SDK_P2PHangup interface. The DC releases the P2P voice call to other devices.
The sequence diagram of interface invoking is as follows:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
50
Interface invocation code example: //cpp code //Releasing the P2P voice call between the DC and terminal 8890 ELTE_INT32 iRet = ELTE_SDK_P2PHanpup("8890"); if(0 == iRet) { //Succeed }
Interface call after the success of the status of the event P2pcallStatus=2010 indicates that the scheduling platform to actively hang off the success, if the state of the event received P2pcallStatus=2009 said the end has been linked to the first.
For other status, see ELTE_Event_NotifyP2pcallStatus.
Answering a P2P Voice Call When the DC receives a P2P voice call from another user, it parses the P2P call status event in the callback function first. If the P2P call status is P2pcallStatus=2002, the DC invokes the ELTE_SDK_P2PRecv interface to answer the call.
The sequence diagram of interface invoking is as follows:
The interface invocation code example is as follows: //cpp code //Answering a P2P voice call from terminal 8890 LTE_INT32 iRet = ELTE_SDK_P2PRecv("8890"); if(0 == iRet) { //Succeed }
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
51
P2pcallStatus=2007 indicates that the P2P voice call is answered successfully.
For other status, see ELTE_Event_NotifyP2pcallStatus.
Rejecting a P2P Voice Call When the DC receives a P2P voice call from another user, it parses the P2P call status event in the callback function first. If the P2P call status is P2pcallStatus=2002, the DC invokes the ELTE_SDK_P2PReject interface to reject the call.
The sequence diagram of interface invoking is as follows:
The interface invocation code example is as follows:
//Rejecting a P2P voice call from terminal 8890 LTE_INT32 iRet = ELTE_SDK_P2PReject("8890"); if(0 == iRet) { //Succeed }
Reject call interface after the success of received event P2pcallStatus=2009
indicates that the P2P voice call is rejected or released successfully.
For other status, see ELTE_Event_NotifyP2pcallStatus.
Initiating Attendant Forwarding Invoke the ELTE_SDK_P2PTransfer interface to initiate attendant forwarding. Input parameters must be input in XML format. Input parameters are DCID (ID of the DC initiating attendant forwarding), SpeakerID (peer user in conversation), and ObjectID (forwarded-to number).
Call timing diagram is as follows:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
52
//cpp code //Construct an artificial adapter XML string CString strP2PTransferParam; strP2PTransferParam.Append("<Content>"); //The user initiated artificial transfer ID dispatcher strP2PTransferParam.Append("<DcID>"); strP2PTransferParam.Append("4116"); strP2PTransferParam.Append("</DcID>"); //The right side of the ID in the call strP2PTransferParam.Append("<SpeakerID>"); strP2PTransferParam.Append("8895"); strP2PTransferParam.Append("</SpeakerID>"); //Need to transfer the number ID strP2PTransferParam.Append("<ObjectID>"); strP2PTransferParam.Append("4135"); strP2PTransferParam.Append("</ObjectID>"); strP2PTransferParam.Append("</Content>"); ELTE_INT32 iRet = ELTE_SDK_P2PTransfer("4116", strP2PTransferParam); if(0 == iRet) { //Succeed }
If the P2P call status is P2pcallStatus=2025, the attendant forwarding succeeds.
For other status, see ELTE_Event_NotifyP2pcallStatus.
Forcibly Releasing a P2P Voice Call By invoking the ELTE_SDK_P2PBreakoff interface, the DC, as a third party, forcibly releases an ongoing P2P call of a DC or portable terminal.
The following to schedule A forced demolition of the terminal B and the dispatching station C between the voice phone.
Call timing diagram is as follows:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
53
Interface invocation code example: //cpp code //DC 4119 forcibly releases the call of terminal 8890 to another user. ELTE_INT32 iRet = ELTE_SDK_Brealoff("8890"); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. Other error codes can be returned eLTE Product Error Code.
Overriding a P2P Voice Call By invoking the ELTE_SDK_P2PBreakin interface, the DC, as a third party, forcibly releases an ongoing P2P call of a user, and receives a new P2P call of the user to the DC. The user can be a DC user or portable terminal user.
Call timing diagram is as follows:
Interface invocation code example: //cpp code //DC 4119 overrides the call of portable terminal 8890.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
54
ELTE_INT32 iRet = ELTE_SDK_P2PBreakin("8890"); if(eLTE_SDK_ERR_SUCCESS == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. Other error codes can be returned eLTE Product Error Code.
Muting Invoke the ELTE_SDK_VolMute interface to mute a P2P call, group call, or video upload service. Currently, only muting the peer party is supported.
Interface invocation code example:
//cpp code //Defining muting parameters in XML format CString strMuteParam; strMuteParam.Append("<Content>"); strMuteParam.Append("<MuteParam>"); //Call type: 0: P2P voice call 1: group call 2: video upload strMuteParam.Append("<CallType>"); strMuteParam.Append("0"); strMuteParam.Append("</CallType>"); strMuteParam.Append("</MuteParam>"); strMuteParam.Append("</Content>"); //The DC mutes the P2P voice call initiated by portable terminal 8895 ELTE_INT32 iRet = ELTE_SDK_VolMute("8895",strMuteParam); //Checking whether the interface invocation succeeds if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. For details about other error codes, see eLTE Product Error Code.
Unmuting Invoke the ELTE_SDK_VolUnMute interface to unmute a P2P call, group call, or video upload service. Currently, only unmuting the peer party is supported.
Interface invocation code example:
//cpp code //Defining muting parameters in XML format CString strMuteParam; strMuteParam.Append("<Content>"); strMuteParam.Append("<MuteParam>"); //Call type: 0: P2P voice call 1: group call 2: video upload strMuteParam.Append("<CallType>"); strMuteParam.Append("0"); strMuteParam.Append("</CallType>"); strMuteParam.Append("</MuteParam>"); strMuteParam.Append("</Content>"); //The DC unmutes the P2P voice call initiated by portable terminal 8895. ELTE_INT32 iRet = ELTE_SDK_VolUnMute("1001",strMuteParam); //Checking whether the interface invocation succeeds if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. For details about other error codes, see eLTE Product Error Code.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
55
Initiating Ambience Listening
By invoking the ELTE_SDK_StartEnvironmentListen interface, the DC listens to the surrounding environment of a terminal user. The microphone function of the terminal is enabled automatically.
NOTE
Environmental interception can only be initiated by the end user.
Interface invocation code example:
//cpp code //The DC initiates ambience listening on portable terminal 8895. Ambience listening applies to portable terminals only. ELTE_INT32 iRet = ELTE_SDK_StartEnvironmentListen("8895"); //Checking whether the interface invocation succeeds if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. For details about other error codes, see eLTE Product Error Code.
Stopping Ambience Listening
Initiating Discreet Listening
Invoke the ELTE_SDK_StartDiscreetListen interface to initiate discreet listening on a DC user, terminal user, or group (including common groups, patch groups, and dynamic groups). If the user or group is on a call, the dispatch person can hear the voice of the target of the discreet listening, but cannot speak in the call.
Interface invocation code example:
//cpp code //The DC initiates discreet listening on portable terminal 8890. The DC can initiate discreet listening on DC users, groups, and portable terminals. ELTE_INT32 iRet = ELTE_SDK_StartDiscreetListen("8890"); //Checking whether the interface invocation succeeds if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. For details about other error codes, see eLTE Product Error Code.
Stopping Discreet Listening
Invoke the ELTE_SDK_StopDiscreetListen interface to stop discreet listening on a DC user, terminal user, or group (including common groups and dynamic groups).
Interface invocation code example:
//cpp code //The DC stops discreet listening on portable terminal 8890. The DC can stop discreet listening on DC users, groups, and portable terminals.
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
56
ELTE_INT32 iRet = ELTE_SDK_StopDiscreetListen("8890"); //Checking whether the interface invocation succeeds if(0 == iRet) { //Succeed }
If the interface invocation succeeds, the returned ResultCode value is 0. For details about other error codes, see eLTE Product Error Code.
6.2.3 Group Voice Call This section describes how to invoke group voice call interfaces and demonstrates the feature development processes.
Flowchart of group voice call interface invocation:
The following figure shows an example for the page of voice dispatching:
eSDK eLTE Development Guide 01(PC, API, C++) 6 Typical Development Scenarios
Issue 01 (2016-10-25) Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.
57
Prerequisites
The Initial Configuration has been completed and the media plane is configured.
Subscribing to and Joining a Group
Invoke the ELTE_SDK_SubJoinGroup interface. The DC can receive or make a group call only after subscribing to the group.
NOTE
Interface invocation can subscribe to only one group at a time.
Interface invocation code example:
//cpp code //Subscribing to and joining group 1001 ELTE_INT32 iRet = ELTE_SDK_SubJoinGroup("1001"); if(0 == iRet) { //Succeed }
After the success of the interface call, parse callback function ELTE_Event_NotifyResourceStatus, the callback function returns the message format as follows:
//xml code <Content> <ResourceID>1001</ResourceID> <ResourceName></ResourceName> <StatusType>11</StatusType> <StatusValue>4003</StatusValue>
eSD