4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * @ingroup TelephonyAPI
24 * @addtogroup SS_TAPI SS(Supplementary services)
29 @brief This file serves as a "C" header file defines functions for Tapi Supplementary services\n
30 It contains a sample set of function prototypes that would be required by applications.
36 /*==================================================================================================
38 ==================================================================================================*/
40 #include <TelUtility.h>
41 #include <TelDefines.h>
48 /*==================================================================================================
50 ==================================================================================================*/
53 /*==================================================================================================
55 ==================================================================================================*/
58 /*==================================================================================================
60 ==================================================================================================*/
63 /*==================================================================================================
65 ==================================================================================================*/
68 * @brief This function sends a request to activate/deactivate call barring.
70 * This service makes it possible for a mobile subscriber
71 * to activate barring of certain categories of outgoing or incoming calls according to a barring program which is selected from a set
72 * of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
73 * with a specific basic service group. Also this API allows deactivating call barring based on categories set.
74 * If the user call this function with wrong password 3 times subsequently, the barring service can be blocked.
75 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
76 * the service request has been granted or not.
78 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
79 * However it just means that the API request has been transfered to the CP successfully.
80 * The actual operation result is delivered with the async response as below.
82 * @par Sync (or) Async:
83 * This is an Asynchronous API.
85 * @par Important Notes:
92 * @param [in] pBarringInfo
93 * - Contains the information about call barring
96 * - Unique identifier for a particular request.
97 * - request_id value can be any value from 0 to 255 if the API is returned successfully
98 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
100 * @par Async Response Message:
101 * An asynchronous notification event is returned as a confirmation
102 * The event associated is TAPI_EVENT_SS_BARRING_CNF and asynchronous return status is indicated by #TelSsCause_t.
103 * The event data is #TelSsBarringStatusInfo_t. \n
106 * - Initialize Dbus connection with #tel_init
107 * - Register caller's application name with #tel_register_app_name
108 * - Register telephony events to listen
109 * - A event loop is running to listen events
114 * @return Return Type (int) \n
115 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
116 * - Refer #TapiResult_t for failure and error code
118 * @par Prospective Clients:
121 * \see tel_get_ss_barring_status, tel_change_ss_barring_password
124 * #include<ITapiSS.h>
126 * int ret_status = -1;
127 * TelSsCallBarringInfo_t pBarringInfo;// = {0,};
129 * char bar_pwd[5]="0000";
131 * pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
132 * pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
133 * pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
134 * strcpy(pBarringInfo.szPassword,bar_pwd);
135 * ret_status = tel_set_ss_barring (&pBarringInfo,&pRequestId);
143 /*================================================================================================*/
144 int tel_set_ss_barring(const TelSsCallBarringInfo_t *pBarringInfo,int * req_id);
148 * @brief This function gets call barring status.
150 * The mobile subscriber may determine by subscription of a set of one or more unique barring
151 * programs what kind of outgoing or incoming calls should be barred.
152 * If this function is called normally, the asynchronous response comes in a few second from network.
153 * The response indicates the service status.
155 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
156 * However it just means that the API request has been transfered to the CP successfully.
157 * The actual operation result is delivered with the async response as below.
159 * @par Sync (or) Async:
160 * This is an Asynchronous API.
162 * @par Important Notes:
169 * @param [in] BarType
170 * - Specifies barring type i.e. Outgoing international, outgoing all, Incoming all etc.
172 * @param [in] CallType
173 * - Specifies the type of call i.e. Voice call, Video Call etc.
175 * @param [out] req_id
176 * - Unique identifier for a particular request.
177 * - request_id value can be any value from 0 to 255 if the API is returned successfully
178 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
180 * @par Async Response Message:
181 * The event associated is TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
182 * The event data is #TelSsBarringStatusInfo_t.
185 * - Initialize Dbus connection with #tel_init
186 * - Register caller's application name with #tel_register_app_name
187 * - Register telephony events to listen
188 * - A event loop is running to listen events
193 * @return Return Type (#TapiResult_t) \n
194 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
195 * - Refer #TapiResult_t for failure and error code
197 * @par Prospective Clients:
200 * \see tel_set_ss_barring, tel_change_ss_barring_password
203 * #include<ITapiSS.h>
206 * TelSsCallBarType_t BarType =TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
207 * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
210 * ret_status = tel_get_ss_barring_status(BarType,CallType,&pRequestId); // get barring status
211 * printf ("The return value is %d\n", ret_status);
221 /*================================================================================================*/
222 int tel_get_ss_barring_status(TelSsCallBarType_t BarType, TelSsCallType_t CallType,int * req_id);
226 * @brief This function allows changing of the barring password in Network.
228 * User can request network to change his own barring password. If the old password is not same with
229 * what network knows, it will be rejected by network. Also new password should be same with another new password
230 * which is to confirm user input. Otherwise the request must be rejected by Telephony Sever.
231 * If the user call this function with wrong old password 3 times subsequently, the barring service can be blocked.
232 * If this function is called normally, the asynchronous response comes in a few second from network.
233 * The response indicates the service request has been granted or not.
235 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
236 * However it just means that the API request has been transfered to the CP successfully.
237 * The actual operation result is delivered with the async response as below.
240 * @par Sync (or) Async:
241 * This is an Asynchronous API.
243 * @par Important Notes:
244 * - Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
245 * at a time and TS might return TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
251 * @param [in] pOldPassword
252 * - Old password set for Barring in Network. This is Null terminated string
254 * @param [in] pNewPassword
255 * - New password for Barring to be set in Network. This is Null terminated string.
257 * @param [in] pNewPasswordAgain
258 * - New password again. This is Null terminated string.
260 * @param [out] req_id
261 * - Unique identifier for a particular request.
262 * - request_id value can be any value from 0 to 255 if the API is returned successfully
263 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
265 * @par Async Response Message:
266 * The event associated is TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF and asynchronous return status is indicated by #TelSsCause_t.
267 * There is no event data with this event.
270 * - Initialize Dbus connection with #tel_init
271 * - Register caller's application name with #tel_register_app_name
272 * - Register telephony events to listen
273 * - A event loop is running to listen events
278 * @return Return Type (int) \n
279 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
280 * - Refer #TapiResult_t for failure and error code
281 * @par Prospective Clients:
288 * #include<ITapiSS.h>
293 * ret_status = tel_change_ss_barring_password ("0000","0000","0000",&pRequestId); // change barring password
302 /*================================================================================================*/
303 int tel_change_ss_barring_password(const char* pOldPassword, const char* pNewPassword, const char * pNewPasswordAgain,int * req_id);
307 * @brief This function allows to set (register/erase/activate/deactivate) call forwarding option at the Network.
309 * This enables to forward the calls to another party. This service permits a called mobile subscriber
310 * to have the network send all incoming calls, or just those associated with a specific Basic service group,
311 * addressed to the called mobile subscriber's directory number and which meet
312 * various call FORWARD condition to another directory number.
313 * The ability of the served mobile subscriber to originate calls is unaffected.
314 * If the service is activated, a call is forwarded only if under this call forward condition.
315 * Application has to call this API in order to explicitly register/erase/activate/deactivate
316 * the call forwarding. Request will be passed irrespective of whether already
317 * another SS call forward is ongoing.
319 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
320 * the service request has been granted or not.
322 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
323 * However it just means that the API request has been transfered to the CP successfully.
324 * The actual operation result is delivered with the async response as below.
327 * @par Sync (or) Async:
328 * This is an Asynchronous API.
330 * @par Important Notes:
337 * @param [in] pForwardInfo
338 * - Contains the Call forward information like forward mode, forward type, etc.
340 * @param [out] req_id
341 * - Unique identifier for a particular request.
342 * - request_id value can be any value from 0 to 255 if the API is returned successfully
343 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
345 * @par Async Response Message:
346 * The event associated is TAPI_EVENT_SS_FORWARD_CNF and asynchronous return status is indicated by #TelSsCause_t.
347 * The event data will be #TelSsForwardingStatusInfo_t.
350 * - Initialize Dbus connection with #tel_init
351 * - Register caller's application name with #tel_register_app_name
352 * - Register telephony events to listen
353 * - A event loop is running to listen events
358 * @return Return Type (int) \n
359 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
360 * - Refer #TapiResult_t for failure and error code
361 * @par Prospective Clients:
365 * \image html CallForward.jpg
366 * \image latex CallForward.jpg
368 * \see tel_get_ss_forward_status
371 * #include<ITapiSS.h>
375 * TelSsForwardInfo_t pForwardInfo;
376 * pForwardInfo.Mode =TAPI_CALL_FORWARD_MODE_ENABLE_EV;
377 * pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
378 * pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
379 * pForwardInfo.NoReplyConditionTimer = 10;
381 * char cf_number[20]= {"9986529874"};//number to which calles need to be forwarded.
383 * len = strlen(cf_number);
384 * printf("Length of CF number :%d \n",len);
385 * memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
387 * ret_status = tel_set_ss_forward (&pForwardInfo,&pRequestId);
395 /*================================================================================================*/
396 int tel_set_ss_forward( const TelSsForwardInfo_t *pForwardInfo,int * req_id);
400 * @brief This function provides option to get the call forwarding status of different calls from Network.
402 * The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
403 * After having requested this procedure the network shall return the following information:
404 * - in response to a general data request the served mobile subscriber should be given a list of all Basic service groups
405 * to which call forwarding unconditional is registered, including information whether or not it is active and operative,
406 * and the associated forwarded-to numbers
407 * - in response to a specific request concerning one particular Basic service group,
408 * the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
409 * including information whether or not it is active and operative for that Basic service group.
410 * If CFU is registered, the associated forwarded-to number shall be given.
412 * If this function is called normally, the asynchronous response comes in a few second from network.
413 * The response indicates the service status.
415 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
416 * However it just means that the API request has been transfered to the CP successfully.
417 * The actual operation result is delivered with the async response as below.
420 * @par Sync (or) Async:
421 * This is an Asynchronous API.
423 * @par Important Notes:
431 * - Specifying the Forward call type i.e. voice call, Video Call, Data Calls etc.
433 * @param [in] Condition
434 * - Used to specify the forward condition i.e. unconditional, When no reply, when busy, when not reachable etc.
436 * @param [out] req_id
437 * - Unique identifier for a particular request.
438 * - request_id value can be any value from 0 to 255 if the API is returned successfully
439 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
441 * @par Async Response Message:
442 * The event associated is TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
443 * The event data is #TelSsForwardingStatusInfo_t.
446 * - Initialize Dbus connection with #tel_init
447 * - Register caller's application name with #tel_register_app_name
448 * - Register telephony events to listen
449 * - A event loop is running to listen events
454 * @return Return Type (int) \n
455 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
456 * - Refer #TapiResult_t for failure and error code
458 * @par Prospective Clients:
461 * \see tel_set_ss_forward
464 * #include<ITapiSS.h>
465 * int ret_status = 0;
466 * TelSsForwardType_t Type =TAPI_CS_FORWARD_TYPE_VOICE_EV;
467 * TelSsForwardWhen_t Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
470 * ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId); // get forward status
478 /*================================================================================================*/
479 int tel_get_ss_forward_status(TelSsForwardType_t Type, TelSsForwardWhen_t Condition,int * req_id);
483 * @brief This function activates/deactivates the call waiting service.
484 * The call waiting service permits a mobile to be notified of an incoming
485 * call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
486 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
487 * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
488 * the service request has been granted or not.
490 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
491 * However it just means that the API request has been transfered to the CP successfully.
492 * The actual operation result is delivered with the async response as below.
495 * @par Sync (or) Async:
496 * This is an Asynchronous API.
498 * @par Important Notes:
505 * @param [in] waitInfo
506 * - Specifies the status of call-waiting service i.e. On (TRUE) or off (FALSE)
509 * @param [out] req_id
510 * - Unique identifier for a particular request.
511 * - request_id value can be any value from 0 to 255 if the API is returned successfully
512 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
514 * @par Async Response Message:
515 * The event associated is TAPI_EVENT_SS_WAITING_CNF and asynchronous return status is indicated by #TelSsCause_t.
516 * The event data is #TelSsWaitingStatusInfo_t.
519 * - Initialize Dbus connection with #tel_init
520 * - Register caller's application name with #tel_register_app_name
521 * - Register telephony events to listen
522 * - A event loop is running to listen events
527 * @return Return Type (int) \n
528 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
529 * - Refer #TapiResult_t for failure and error code
531 * @par Prospective Clients:
534 * \see tel_get_ss_waiting_status
537 * #include<ITapiSS.h>
540 * TelSsWaitingInfo_t waitInfo;
541 * waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
542 * waitInfo.CallType =TAPI_CALL_TYPE_VOICE_EV;
545 * ret_status = tel_set_ss_waiting (&waitInfo,&RequestID); // set call waiting
553 /*================================================================================================*/
554 int tel_set_ss_waiting( const TelSsWaitingInfo_t *waitInfo, int * req_id);
558 * @brief This function queries the status of call waiting service.
561 * The call waiting service permits a mobile to be notified of an incoming call
562 * (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
563 * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
564 * If this function is called normally, the asynchronous response comes in a few second from network.
565 * The response indicates the service status.
567 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
568 * However it just means that the API request has been transfered to the CP successfully.
569 * The actual operation result is delivered with the async response as below.
572 * @par Sync (or) Async:
573 * This is an Asynchronous API.
575 * @par Important Notes:
581 * @param [in] CallType
584 * @param [out] req_id
585 * - Unique identifier for a particular request.
586 * - request_id value can be any value from 0 to 255 if the API is returned successfully
587 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
589 * @par Async Response Message:
590 * The event associated is TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
591 * The event data is #TelSsWaitingInfo_t.
594 * - Initialize Dbus connection with #tel_init
595 * - Register caller's application name with #tel_register_app_name
596 * - Register telephony events to listen
597 * - A event loop is running to listen events
602 * @return Return Type (int) \n
603 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
604 * - Refer #TapiResult_t for failure and error code
605 * @par Prospective Clients:
608 * \see tel_set_ss_waiting
610 * #include<ITapiSS.h>
613 * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
616 * ret_status = tel_get_ss_waiting_status ( CallType,&RequestID); // get call waiting info
624 /*================================================================================================*/
625 int tel_get_ss_waiting_status( const TelSsCallType_t CallType,int * req_id);
629 * @brief This function queries the status of calling line identity service.
632 * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
633 * CLIP - Calling line identification presentation
634 * This Supplementary Service provides for the ability to indicate the line identity of the calling party to the called party.
635 * The network shall deliver the calling line identity to the called party at call set-up time,
636 * regardless of the terminal capability to handle the information.
637 * CLIR - Calling line identification restriction
638 * the CLIR Supplementary Service is a Supplementary Service offered to the calling party
639 * to prevent presentation of the calling party's line identity, to the called party.
640 * COLP - Connected line identification presentation
641 * This Supplementary Service is not a dialing check but an indication to the calling subscriber
642 * of the connected line identity in a full ISDN/PLMN environment,
643 * the connected line identity shall include all the information necessary to unambiguously identify the connected party.
644 * The network shall deliver the connected line identity to the calling party
645 * regardless of the terminal capability to handle the information.
646 * COLR - Connected line identification restriction
647 * The COLR Supplementary Service is a Supplementary Service offered
648 * to the connected party to prevent presentation of the connected line identity, to the calling party.
649 * In the case where the calling party has an override category.
650 * CDIP - Called line identification presentation
651 * CNAP - Calling name presentation
652 * This function queries the service status with #TelSsCliType_t
654 * If this function is called normally, the asynchronous response comes in a few second from network.
655 * The response indicates the service status.
657 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
658 * However it just means that the API request has been transfered to the CP successfully.
659 * The actual operation result is delivered with the async response as below.
662 * @par Sync (or) Async:
663 * This is an Asynchronous API.
665 * @par Important Notes:
671 * @param [in] CliType
674 * @param [out] req_id
675 * - Unique identifier for a particular request.
676 * - request_id value can be any value from 0 to 255 if the API is returned successfully
677 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
679 * @par Async Response Message:
680 * The event associated is TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
681 * The event data is #TelCliStatusInfo_t.
684 * - Initialize Dbus connection with #tel_init
685 * - Register caller's application name with #tel_register_app_name
686 * - Register telephony events to listen
687 * - A event loop is running to listen events
692 * @return Return Type (int) \n
693 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
694 * - Refer #TapiResult_t for failure and error code
696 * @par Prospective Clients:
700 * #include<ITapiSS.h>
702 * int ret_status = 0;
703 * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
706 * ret_status = tel_get_ss_cli_status(CliType,&pRequestId); // get cli info
717 /*================================================================================================*/
718 int tel_get_ss_cli_status(TelSsCliType_t CliType,int * req_id);
722 * @brief This function is used to send a USSD string or User response to the Network.
724 * The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
725 * a PLMN operator defined application to communicate in a way which is transparent
726 * to the MS and to intermediate network entities.
727 * The mechanism allows development of PLMN specific supplementary services.
728 * USSD string is like *109, *109*72348937857623#.
729 * There are two modes of USSD: MMI-mode and application mode.
730 * MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
731 * and for the transparent transport of text strings from the network that are displayed
732 * by the mobile for user information.
733 * Application mode USSD is for the transparent transport of data between the network and the UE.
734 * Application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
735 * The peer application in the UE send response with #tel_send_ss_ussd_response
737 * If this function is called normally, the asynchronous response comes in a few second from the telephony server.
738 * The response indicates whether the sending request is successfully delivered or not.
740 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
741 * However it just means that the API request has been transfered to the CP successfully.
742 * The actual operation result is delivered with the async response as below.
743 * @par Sync (or) Async:
744 * This is an Asynchronous API.
746 * @par Important Notes:
752 * @param [in] szUssdString
753 * - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
754 * - USSD String data length
755 * - ANSI string passed by the client
757 * @param [out] req_id
758 * - Unique identifier for a particular request.
759 * - request_id value can be any value from 0 to 255 if the API is returned successfully
760 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
762 * @par Async Response Message:
763 * The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
764 * is #TelSsUssdMsgInfo_t.
767 * - Initialize Dbus connection with #tel_init
768 * - Register caller's application name with #tel_register_app_name
769 * - Register telephony events to listen
770 * - A event loop is running to listen events
771 * - No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application
772 * with an error (USSD_BUSY)
777 * @return Return Type (int) \n
778 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
779 * - Refer #TapiResult_t for failure and error code
781 * @par Prospective Clients:
784 * \see #tel_send_ss_ussd_response, #tel_send_ss_ussd_cancel
786 *\image html ussd.jpg
787 *\image latex ussd.jpg
790 * #include<ITapiSS.h>
792 * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
795 * memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
796 * strcpy(ussdString , "*124#");
798 * ret = tel_send_ss_ussd_request(ussdString, &request_id); // request ussd
806 /*================================================================================================*/
807 int tel_send_ss_ussd_request(const TelSsUssdMsgInfo_t *ussd_info, int *req_id);
811 * @brief This function is used to send a USSD User response to the Network.
814 * Refer #tel_send_ss_ussd_request. In the application mode, the network initiates USSD string
815 * to the peer application at UE. The UE might reply a USSD string with this function.
817 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
818 * The response indicates whether the string is delivered successfully to network or not.
820 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
821 * However it just means that the API request has been transfered to the CP successfully.
822 * The actual operation result is being delivered asynchronously.
823 * @par Sync (or) Async:
826 * @par Sync (or) Async:
827 * This is an Asynchronous API.
829 * @par Important Notes:
836 * @param [in] ussdRspRecord
837 * - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
838 * - USSD String data length
839 * - ANSI string passed by the client
841 * @param [out] req_id
842 * - Unique identifier for a particular request.
843 * - request_id value can be any value from 0 to 255 if the API is returned successfully
844 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
846 * @par Async Response Message:
847 * The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
848 * is #TelSsUssdMsgInfo_t.
851 * - Initialize Dbus connection with #tel_init
852 * - Register caller's application name with #tel_register_app_name
853 * - Register telephony events to listen
854 * - A event loop is running to listen events
859 * @return Return Type (int) \n
860 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
861 * - Refer #TapiResult_t for failure and error code
863 * @par Prospective Clients:
866 * \see #tel_send_ss_ussd_request, #tel_send_ss_ussd_cancel
868 *\image html ussd.jpg
869 *\image latex ussd.jpg
872 * #include<ITapiSS.h>
874 * char ussd_str[25] = {"*123*0#"};
875 * unsigned char len =0;
877 * len = strlen(ussd_str);
879 * TelSsUssdMsgRspInfo_t * ussdRspRecord;
880 * ussdRspRecord = (TelSsUssdMsgRspInfo_t*)malloc(sizeof(TelSsUssdMsgRspInfo_t));
881 * ussdRspRecord->SsRespType=TAPI_USSD_RES_OK;
882 * ussdRspRecord->IndType=TAPI_USSD_IND_NOTIFY;
883 * ussdRspRecord->UssdInfo.Dcs=0x0f;
884 * ussdRspRecord->UssdInfo.RequestedBySAT=0;
885 * strcpy(ussdRspRecord->UssdInfo.szUssdString,ussd_str);
886 * ussdRspRecord->UssdInfo.szUssdString[strlen(ussdRspRecord->UssdInfo.szUssdString)]='\0';
887 * ussdRspRecord->UssdInfo.UssdStringLength=strlen(ussd_str);
890 * ret = tel_send_ss_ussd_response( ussdRspRecord,&pRequestId); // send ussd response
898 /*================================================================================================*/
899 int tel_send_ss_ussd_response(const TelSsUssdMsgInfo_t *ussd_info, int *req_id);
904 * @brief This function is used to send a USSD cancel to release ussd session
906 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
907 * The response indicates whether the string is delivered successfully to network or not.
909 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
910 * However it just means that the API request has been transfered to the CP successfully.
911 * The actual operation result is being delivered asynchronously.
913 * @par Sync (or) Async:
914 * This is an Asynchronous API.
916 * @par Important Notes:
922 * @param [out] req_id
923 * - Unique identifier for a particular request.
924 * - request_id value can be any value from 0 to 255 if the API is returned successfully
925 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
927 * @par Async Response Message:
928 * The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
929 * is #TelSsUssdMsgInfo_t.
932 * - Initialize Dbus connection with #tel_init
933 * - Register caller's application name with #tel_register_app_name
934 * - Register telephony events to listen
935 * - A event loop is running to listen events
940 * @return Return Type (int) \n
941 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
942 * - Refer #TapiResult_t for failure and error code
944 * @par Prospective Clients:
947 * \see #tel_send_ss_ussd_request, #tel_send_ss_ussd_response.
949 *\image html ussd.jpg
950 *\image latex ussd.jpg
952 * #include<ITapiSS.h>
954 * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
958 * memset(ussdString, 0, TAPI_SS_USiSD_DATA_SIZE_MAX);
959 * strcpy(ussdString , "*124#");
961 * ret= tel_send_ss_ussd_request(ussdString,&request_id);
963 * ret = tel_send_ss_ussd_cancel(&equestId); // ussd cancel
972 /*================================================================================================*/
973 int tel_send_ss_ussd_cancel(int *req_id);
977 * @brief This function is used to Read AOC parameter values on the SIM.
980 * This supplementary service provides the MS with the information to produce an estimate
981 * of the cost of the service used. Charges are indicated for the call(s) in progress
982 * when mobile originated or for the roaming leg only when mobile terminated.
983 * Any charges for non-call related transactions, and for certain supplementary services,
984 * such as Call Forwarding are not indicated.
985 * The MS will receive at the beginning of each call (and as necessary during the call)
986 * a message, the Charge Advice Information. This message contains the elements which together define
987 * the rate at which the call is to be charged, time dependence,
988 * data dependence and for unit increments - see TS 22.024 [3].
989 * The MS shall still indicate appropriate charges even when roaming, based on Home PLMN units.
990 * Where applicable, the volume charge for Packet data service,
991 * in addition to the normal time dependent and incremental charges, shall be indicated.
992 * To indicate the charge per call the Mobile station shall display the units consumed
993 * so far during the present call(s) and maintain this value until the MS is switched off or a new call set-up is attempted.
994 * Where required to indicate the total accumulated charge, the MS shall be able to display,
995 * and the SIM/USIM shall store in the ACM, the running cumulative unit charge.
996 * This value must be stored securely, and all reasonable steps shall be taken to ensure that
997 * the written value cannot be interrupted, reset or corrupted (except resetting under control of the unblocking key).
998 * This function get the AOC configuration information from PLMN
1000 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
1001 * The response indicates whether the query is delivered successfully to network or not.
1003 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
1004 * However it just means that the API request has been transfered to the CP successfully.
1005 * The actual operation result is being delivered asynchronously.
1007 * @par Sync (or) Async:
1008 * This is an Asynchronous API.
1010 * @par Important Notes:
1017 * @param [in] AocType
1018 * - Specifies which type of Advice of charge information to be read namely Maximum ACM,
1019 * Price per unit currency, Current call meter and Accumulated call meter values.
1021 * @param [out] req_id
1022 * - Unique identifier for a particular request.
1023 * - request_id value can be any value from 0 to 255 if the API is returned successfully
1024 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
1026 * @par Async Response Message:
1027 * The event associated is TAPI_EVENT_SS_AOC_RSP and asynchronous return status is indicated by #TelSsCause_t. The event data
1028 * is #TelCallAocInfo_t.
1031 * - Advice of charge depends on the SIM for setting or reading AOC parameters.
1032 * - Setting of AOC needs PIN2 Verification
1037 * @return Return Type (int) \n
1038 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1039 * - Refer #TapiResult_t for failure and error code
1041 * @par Prospective Clients:
1044 * \see tel_set_ss_aoc_info
1046 *\image html ussd.jpg
1047 *\image latex ussd.jpg
1049 * #include<ITapiSS.h>
1051 * TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
1052 * ret_status = tel_get_ss_aoc_info (AocType,&pRequestId); // get AOC info
1060 /*================================================================================================*/
1061 int tel_get_ss_aoc_info( TelSsAocType_t AocType,int * req_id);
1065 * @brief This function is used to Read AOC parameter values on the SIM.
1068 * Refer #tel_get_ss_aoc_info
1070 * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
1071 * The response indicates whether the query is delivered successfully to network or not.
1073 * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
1074 * However it just means that the API request has been transfered to the CP successfully.
1075 * The actual operation result is being delivered asynchronously.
1077 * @par Sync (or) Async:
1078 * This is an Asynchronous API.
1080 * @par Important Notes:
1087 * @param [in] AocSetInfo
1088 * - Specifies which type of Advice of charge information to be set namely Maximum ACM,
1089 * Price per unit currency, Current call meter and Accumulated call meter values.
1091 * @param [out] RequestId
1092 * - Unique identifier for a particular request.
1093 * - RequestId value can be any value from 0 to 255 if the API is returned successfully
1094 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure. *
1096 * @par Async Response Message:
1097 * The event associated is TAPI_EVENT_SS_SET_AOC_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
1098 * is #TelSsErrorInfo_t.
1101 * - Advice of charge depends on the SIM for setting or reading AOC parameters.
1102 * - Setting of AOC needs PIN2 Verification
1107 * @return Return Type (int) \n
1108 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
1109 * - Refer #TapiResult_t for failure and error code
1111 * @par Prospective Clients:
1114 * \see tel_get_ss_aoc_info
1116 *\image html ussd.jpg
1117 *\image latex ussd.jpg
1119 * #include<ITapiSS.h>
1121 * TelCallAocInfo_t *pAocSetInfo;
1123 * pAocSetInfo = (TelCallAocInfo_t *)calloc(1,sizeof(TelCallAocInfo_t));
1124 * pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
1125 * int ret_status =0;
1127 * ret = tel_set_ss_aoc_info (pAocSetInfo,&request_id); // set aoc info
1136 /*================================================================================================*/
1137 int tel_set_ss_aoc_info( TelCallAocInfo_t * AocSetInfo, int * RequestId);
1143 #endif /* _ITAPI_SS_H_ */