blob: 4813523e7257bab25ded40364622625945a5de87 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2006
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 * mmi2voip_struct.h
41 *
42 * Project:
43 * --------
44 * MAUI
45 *
46 * Description:
47 * ------------
48 * This file describes the structure used for communicating between MMI and VoIP.
49 *
50 * Author:
51 * -------
52 * -------
53 *
54 *============================================================================
55 * HISTORY
56 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
57 *------------------------------------------------------------------------------
58 * removed!
59 * removed!
60 * removed!
61 *
62 * removed!
63 * removed!
64 * removed!
65 *
66 * removed!
67 * removed!
68 * removed!
69 *
70 * removed!
71 * removed!
72 * removed!
73 *
74 * removed!
75 * removed!
76 * removed!
77 *
78 * removed!
79 * removed!
80 * removed!
81 *
82 * removed!
83 * removed!
84 * removed!
85 *
86 * removed!
87 * removed!
88 * removed!
89 *
90 * removed!
91 * removed!
92 * removed!
93 *
94 * removed!
95 * removed!
96 * removed!
97 *
98 * removed!
99 * removed!
100 * removed!
101 *
102 * removed!
103 * removed!
104 * removed!
105 *
106 * removed!
107 * removed!
108 * removed!
109 *
110 * removed!
111 * removed!
112 * removed!
113 *
114 * removed!
115 * removed!
116 * removed!
117 *
118 * removed!
119 * removed!
120 * removed!
121 *
122 * removed!
123 * removed!
124 * removed!
125 *
126 * removed!
127 * removed!
128 * removed!
129 *
130 * removed!
131 * removed!
132 * removed!
133 *
134 * removed!
135 * removed!
136 * removed!
137 *
138 * removed!
139 * removed!
140 * removed!
141 *
142 * removed!
143 * removed!
144 * removed!
145 *
146 * removed!
147 * removed!
148 * removed!
149 *
150 * removed!
151 * removed!
152 * removed!
153 *
154 * removed!
155 * removed!
156 * removed!
157 *
158 *------------------------------------------------------------------------------
159 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
160 *============================================================================
161 ****************************************************************************/
162#ifndef _MMI2VOIP_STRUCT_H
163#define _MMI2VOIP_STRUCT_H
164
165#define VOIP_DEBUG_CALL_LIST
166//#define VOIP_3PCC_SUPPORT /* 3pcc call flows support */
167//#define VOIP_EARLY_MEDIA_SUPPORT /* early media support */
168//#define VOIP_SIP_CAPACITY_SUPPORT
169
170/*****************************************************************************
171* Define
172*****************************************************************************/
173#define SIP_CONFORMANCE_TEST
174
175#define VOIP_MAX_NUM_CODEC (15) /* Maximum number of codec */
176//#define VOIP_MAX_NUM_SESSION (2) /* Maximum number of RTP session within a dialog */
177#define VOIP_MAX_SOCK_ADDR_LEN (16) /* Length of IP address */
178#define VOIP_MAX_DERIEVED_ADDR (2) /* Maximum number of derived address */
179#define VOIP_MAX_IP_SEG_LEN (4) /* Maximum number of IP segement */
180
181/* result */
182#define VOIP_OK (0) /* Succsess */
183#define VOIP_ERROR (1) /* Failure happens in VoIP task */
184#define VOIP_SIP_ERROR (2) /* Failure happens in SIP task */
185#define VOIP_FS_ERROR (3) /* File system related error */
186#define VOIP_NAT_ERROR (4) /* NAT related error */
187
188/* cause */
189#define VOIP_NO_ERROR (0) /*no error */
190#define VOIP_UNSPECIFIED_ERROR (-1) /*Unspecified error */
191#define VOIP_NOT_REGISTERED (-2) /* UA has not registered yet */
192#define VOIP_ALREADY_REGISTERED (-3) /*UA has already registered */
193#define VOIP_INVALID_PARAM (-4) /* Invalid parameter */
194#define VOIP_CREATE_UAC_ERROR (-5) /*Create UAC failed */
195#define VOIP_GET_ADDR_FAILED (-6) /* Get derived address failed during MO/MT call */
196#define VOIP_CALL_ABORT_LOCALLY (-7) /* Force to abort call */
197#define VOIP_RECV_BYE (-8) /* Receive BYE request from remote side */
198#define VOIP_INCORRECT_CALL_STATE (-9) /* Call state is not possible to achieve requested operation */
199#define VOIP_BEARER_DISCONNECTED (-10) /* Network is down */
200#define VOIP_ABORT_FAILED (-11) /*Abort failed */
201#define VOIP_CALL_NOT_EXIST (-12) /* Call does not exist */
202#define VOIP_INVALID_URI (-13) /* Invalid URI */
203#define VOIP_SWAP_FAILED (-14) /* Whole swap failed */
204#define VOIP_SWAP_PARTIAL_FAILED (-15) /* Hold successfully, retrieve failed */
205#define VOIP_TRANSFER_FAILED (-16) /* Transfer failed, keep the same state */
206#define VOIP_MERGE_FAILED (-17) /* Call merge failed */
207#define VOIP_MERGE_PARTIAL_FAILED (-18) /* Call merge partial failed */
208#define VOIP_NAT_FAILED (-19) /* Get NAT information from sever failed. */
209#define VOIP_TEMPORARY_BUSY (-20) /* No empty slot in call list to servce request. */
210#define VOIP_UNSUPPORTED_NAT_TYPE (-21) /* The NAT type is not supported. */
211#define VOIP_NETWORK_ERROR (-22) /* Network Error */
212#define VOIP_BUSY (-23) /* VoIP task is executoing another action now */
213#define VOIP_INVALID_CALL_REQ (-24) /* Invalid call request */
214#define VOIP_PARTIAL_FAILED (-25) /* Partial failed */
215#define VOIP_REREGISTER_FAILED (-26) /* Re-register failed. */
216#define VOIP_SDP_MISMATCHED (-27) /* Incorrect SDP session in the response */
217#define VOIP_DNS_ERROR (-28) /* Failure happens in SIP task */
218#define VOIP_NO_RESOURCE (-29) /* no resource or memory to execute */ /* new for Julia */
219#define VOIP_SIP_FS_ERROR (-30) /* FS error *//* new for Julia */
220#define VOIP_DHCP_ERROR (-31) /* DHCP get IP error */ /* for MMI to retry login */
221
222
223/* sync with SIP error */
224#define VOIP_SIP_300_MULTIPLE_CHOICES (300)
225#define VOIP_SIP_301_MOVED_PERMANENTLY (301)
226#define VOIP_SIP_302_MOVED_TEMPORARILY (302)
227#define VOIP_SIP_305_USE_PROXY (305)
228#define VOIP_SIP_400_BAD_REQUEST (400)
229#define VOIP_SIP_401_UNAUTHORIZED (401)
230#define VOIP_SIP_403_FORBIDDEN (403)
231#define VOIP_SIP_404_NOT_FOUND (404)
232#define VOIP_SIP_405_METHOD_NOT_ALLOW (405)
233#define VOIP_SIP_406_NOT_ACCEPTABLE (406)
234#define VOIP_SIP_407_PROXY_AUTH_REQUIRED (407)
235#define VOIP_SIP_408_REQUEST_TIMEOUT (408)
236#define VOIP_SIP_412_CONDITIONAL_REQ_FAIL (412) /* Conditional Request Failed */
237#define VOIP_SIP_422_INTERVAL_TOO_BRIEF (422) /* Session-Expires too brief */
238#define VOIP_SIP_423_INTERVAL_TOO_BRIEF (423) /* Expires too brief */
239#define VOIP_SIP_478_UNRESOLVEABLE_DEST (478) /* unresolveable destination */
240#define VOIP_SIP_480_TEMP_UNAVAILABLE (480)
241#define VOIP_SIP_481_CALL_TRANS_NOT_EXIST (481)
242#define VOIP_SIP_484_ADDRESS_INCOMPLETE (484)
243#define VOIP_SIP_486_BUSY_HERE (486)
244#define VOIP_SIP_488_NOT_ACCEPTABLE_HERE (488)
245#define VOIP_SIP_487_REQ_TERMINATED (487)
246#define VOIP_SIP_491_REQUEST_PENDING (491)
247#define VOIP_SIP_499_UNRESOLVEABLE_DEST (499) /* unresolveable destination */
248#define VOIP_SIP_500_SERVER_INT_ERROR (500)
249#define VOIP_SIP_503_SERVICE_UNAVAILABLE (503)
250#define VOIP_SIP_600_BUSY_EVERYWHERE (600)
251#define VOIP_SIP_603_DECLINE (603)
252#define VOIP_SIP_606_NOT_ACCEPTABLE (606)
253
254/* Type of OUTBOUND server */
255#define VOIP_OUTBOUND_NEVER (0)
256#define VOIP_OUTBOUND_AUTO (1)
257#define VOIP_OUTBOUND_ALWAYS (2)
258
259/* Type of NAT */
260#define VOIP_NAT_TYPE_NONE (0)
261#define VOIP_NAT_TYPE_STATIC_IP (1)
262#define VOIP_NAT_TYPE_STUN (2)
263
264/* Type of DTMF */
265#define VOIP_DTMF_IN_BAND (0)
266#define VOIP_DTMF_OUT_OF_BAND (1)
267#define VOIP_DTMF_TYPE_NONE (2)
268
269/* File Length */
270#define VOIP_FILE_LEN (32)
271#define VOIP_CALL_FILE_PATH "Z:\\@voip"
272#define VOIP_CALL_FILE_NAME "call"
273#define VOIP_CONF_STATE_FILE_NAME "conf"
274
275#define VOIP_MAX_NUM_DIALOG (2) /* Maximum number of dialogs within a call */
276
277/* Conference Server Related */
278#define VOIP_CONF_STATE_USER_COUNT (10) /* Maximum number of conference server state */
279
280#ifdef SIP_CONFORMANCE_TEST
281
282#define VOIP_SIP_OPTION_LEN (1500)
283#endif
284
285/*****************************************************************************
286* Dialog status
287*****************************************************************************/
288#define VOIP_SDP_STATUS_NONE 0x00000000
289#define VOIP_SDP_STATUS_IS_DTMF 0x00000001
290#define VOIP_SDP_STATUS_PT_CHANGE 0x00000002
291#define VOIP_SDP_STATUS_INVITE_SDP 0x00000004
292#define VOIP_SDP_STATUS_SDP_NO_MEDIA 0x00000008
293#define VOIP_SDP_STATUS_EXCHANGED 0x00000010
294#define VOIP_SDP_STATUS_EARLY_MEDIA 0x00000020
295
296/*****************************************************************************
297* Typedef
298*****************************************************************************/
299/* This structure is used for the profile setting */
300typedef struct
301{
302 kal_uint16 sip_port; /* Sip server port number */
303 kal_uint16 local_port; /* Local port (default 0: auto assign) */
304 kal_uint16 outbound_port; /* Port of outbound server */
305 kal_uint16 registrar_port; /* Port of registrar server */
306 kal_uint16 stun_port; /* Port of STUN server */
307 kal_uint16 rtp_start_port; /* Start of RTP port */
308 kal_uint16 rtp_end_port; /* End of RTP port */
309 kal_char disp_name[VOIP_DISP_NAME_LEN*3]; /* Display name of the user */
310 kal_char sip_server[VOIP_URI_LEN]; /* Sip server address */
311 kal_char sip_username[VOIP_USERNAME_LEN]; /* Username of SIP */
312 kal_char sip_password[VOIP_PASSWORD_LEN]; /* Password of SIP */
313 kal_char *domain_name; /* pointer to the domain part of username filed*/
314 kal_bool is_IP_domain; /* if the domain is in IP form */
315 kal_uint8 outbound_type; /* Enable or disable outbound server */
316 kal_bool enable_registrar; /* Enable or disable registrar server */
317 kal_char outbound_server[VOIP_URI_LEN]; /* Address of outbound server */
318 kal_char outbound_username[VOIP_USERNAME_LEN]; /* Username of outbound server */
319 kal_char outbound_password[VOIP_PASSWORD_LEN]; /* Password of outbound server */
320 kal_char registrar_server[VOIP_URI_LEN]; /* Address of registrar server */
321 kal_char registrar_username[VOIP_USERNAME_LEN]; /* Username of registrar server */
322 kal_char registrar_password[VOIP_PASSWORD_LEN]; /* Password of registrar server */
323 kal_char auth_username[VOIP_USERNAME_LEN]; /* Authorization username */
324 kal_uint8 nat_type; /* Type of NAT*/
325 kal_uint8 fire_wall[4]; /* IP address of firewall */
326 kal_char stun_server[VOIP_URI_LEN]; /* Address of STUN server */
327 kal_char voice_mail[VOIP_URI_LEN]; /* Voice mail serfer */
328 kal_bool nat_refresh; /* Auto or manual refresh NAT */
329 kal_uint8 nat_refresh_time; /* NAT manual refresh interval */
330 kal_uint32 data_account; /* Index of data account */
331}voip_profile_struct;
332
333/* This structure is used for SIP capability */
334#ifdef VOIP_SIP_CAPACITY_SUPPORT
335typedef struct
336{
337 kal_bool enable;
338 voip_sip_cap_boolean_type_enum audio;
339 voip_sip_cap_boolean_type_enum application;
340 voip_sip_cap_boolean_type_enum data;
341 voip_sip_cap_boolean_type_enum control;
342 voip_sip_cap_boolean_type_enum video;
343 voip_sip_cap_boolean_type_enum text;
344 voip_sip_cap_boolean_type_enum automata;
345 voip_sip_cap_class_type_enum class;
346 voip_sip_cap_duplex_type_enum duplex;
347 voip_sip_cap_mobility_type_enum mobility;
348 kal_char description[64];
349 kal_bool events;
350 kal_uint8 priority;
351 kal_bool methods;
352 kal_bool extensions;
353 kal_bool schemes;
354 voip_sip_cap_actor_type_enum actor;
355 voip_sip_cap_boolean_type_enum isfocus;
356}voip_sip_cap_struct;
357#endif
358
359#ifdef VOIP_SIP_CAPACITY_SUPPORT
360typedef struct _voip_caller_pref_struct
361{
362 voip_sip_cap_struct caller_pref;
363 voip_caller_pref_type_enum pref_type;
364} voip_caller_pref_struct;
365#endif
366/* This structure is used for the option of a call */
367typedef struct
368{
369 voip_codec_enum codec_order[VOIP_MAX_NUM_CODEC]; /* Array index of codec */
370 kal_bool auto_decline; /* Auto decline anonymouse */
371 kal_bool do_not_disturb; /* Auto reject all calls */
372 kal_bool hide_user_id; /* Hide user id or not */
373 kal_bool auto_answer; /* Auto answer mode in MMI */
374 kal_uint8 dtmf; /* In band or out-of-band DTMF */
375 kal_bool comfortable_noise; /* enable confortable noise or not */
376 kal_bool srtp; /* enable srtp usage or not */
377#ifdef VOIP_SIP_CAPACITY_SUPPORT
378 voip_sip_cap_struct sip_cap; /* SIP Capability */
379 voip_caller_pref_struct caller_pref[VOIP_MAX_CALLER_PREFERENCE];/* Caller Preference */
380#endif
381 kal_bool early_media; /* if send early media */
382}voip_setting_struct;
383
384
385/* This structure defines a structure to carry all kinds of call id. */
386typedef struct
387{
388 kal_uint32 call_id; /* Call ID */
389 kal_uint32 dialog_id; /* Dialog ID */
390}voip_call_id_struct;
391
392
393/* This structure is used for the address of a call. */
394typedef struct
395{
396 kal_char disp_name[VOIP_DISP_NAME_LEN*3]; /*Display name of the user, could be null */
397 kal_char uri[VOIP_URI_LEN]; /* Eg, "sip: a@b.c" */
398}voip_addr_struct;
399
400/* This structure is used for ringing indication */
401typedef struct
402{
403 voip_addr_struct *refer_by;
404 voip_call_id_struct *replaced_call;
405}voip_ring_data_struct;
406
407typedef struct
408{
409 kal_uint32 newmsgs;
410 kal_uint32 oldmsgs;
411 kal_bool is_urgent_present;
412 kal_uint32 new_urgentmsgs;
413 kal_uint32 old_urgentmsgs;
414}voip_msg_struct;
415
416/* socket address strcuture */
417typedef struct
418{
419 kal_int16 addr_len;
420 kal_uint8 addr[VOIP_MAX_SOCK_ADDR_LEN];
421 kal_uint16 port;
422} voip_sockaddr_struct;
423
424/* NAT address information */
425typedef struct
426{
427 voip_sockaddr_struct local_addr;
428 voip_sockaddr_struct derived_addr;
429}voip_nat_addr_struct;
430
431/* SDP crypto */
432typedef struct
433{
434 kal_uint8 crypto_idx;
435 srtp_crypto_struct crypto;
436} voip_crypto_struct;
437
438/* SDP sessoin */
439typedef struct
440{
441 kal_uint64 remote_sdp_version; /* remote SDP version */
442 kal_uint16 payload_type[VOIP_MAX_NUM_CODEC]; /* payload type */
443 kal_uint16 local_payload_type[VOIP_MAX_NUM_CODEC]; /* local payload type */
444 kal_uint16 dtmf_payload_type; /* payload type of DTMF */
445 kal_uint16 num_codec; /* number of codec supported in this section */
446 kal_uint16 remote_rtp_port; /* remote RTP port number */
447 kal_uint16 remote_rtcp_port; /* remote RTCP port number */
448 kal_uint16 local_rtp_port; /* local RTP port number */
449 kal_uint16 local_rtcp_port; /* local RTCP port number */
450 kal_uint16 ptime;
451 kal_uint16 maxptime;
452 kal_uint16 modeset[VOIP_MAX_NUM_CODEC]; /* modeset of codec */
453 voip_codec_enum codec[VOIP_MAX_NUM_CODEC]; /* suppored codec list */
454 kal_uint8 local_addr[VOIP_MAX_IP_SEG_LEN]; /* local address */
455 kal_uint8 remote_addr[VOIP_MAX_IP_SEG_LEN]; /* remote address */
456 kal_uint32 sdp_status; /* status info about sdp session */
457 voip_rtp_direction_enum direction; /* media direction,
458 sendonly, recvonly, sendrecv, inactive */
459 voip_annex_enum g7231_annexa; /* annexa for G7231 */
460 voip_annex_enum g729_annexb; /* annexb for G729 */
461 voip_crypto_struct *crypto_info; /* crypto information */
462}voip_sdp_struct; /* voip_session_struct; */
463
464/* This structure defines a dialog between two peers */
465typedef struct
466 {
467 kal_uint32 dialog_id; /* unique id of the dialog */
468 kal_int16 dialog_idx; /* unique index of call dialog */
469 voip_addr_struct user_addr; /* remote side address */
470 voip_sdp_struct sdp_info; /* Information of each media stream */
471#ifdef VOIP_EARLY_MEDIA_SUPPORT
472 voip_sdp_struct early_sdp_info; /* information of early media stream */
473#endif
474 voip_nat_addr_struct stun_addr[VOIP_MAX_DERIEVED_ADDR]; /* stun address */
475 voip_dlg_state_enum dialog_state; /* dialog state */
476 kal_bool in_use; /* dialog is in used */
477 kal_uint8 rel_prov_rsp; /* if 100rel is required in MT invite */
478}voip_dialog_struct;
479
480typedef struct
481{
482 kal_uint32 version; /* version of the conference state */
483 kal_bool is_conference; /* if the call is a conference server call */
484 voip_subs_state_enum subs_state; /* if the call state is subscribed */
485}voip_call_conf_info_struct;
486
487typedef struct
488{
489 kal_uint32 call_id; /* Call id */
490 voip_dialog_struct dialog[VOIP_MAX_NUM_DIALOG]; /* Dialog */
491 voip_call_conf_info_struct conf_info; /* information of conference server */
492 voip_call_state_enum call_state; /* Call state */
493 kal_uint8 num_dialogs; /* Number of dialog in this call */
494 kal_bool is_bk_call; /* If the call is a background call */
495}voip_call_struct;
496
497typedef struct
498{
499 voip_codec_enum codec[VOIP_MAX_NUM_CODEC]; /* suppored codec list */
500 voip_dlg_state_enum dialog_state; /* dialog state */
501 kal_bool in_use; /* dialog is in used */
502 kal_uint16 payload_type[VOIP_MAX_NUM_CODEC]; /* payload type */
503 kal_uint16 dtmf_payload_type; /* payload type of DTMF */
504 kal_uint16 num_codec; /* number of codec supported in this section */
505 kal_uint16 remote_rtp_port; /* remote RTP port number */
506 kal_uint16 remote_rtcp_port; /* remote RTCP port number */
507 kal_uint16 local_rtp_port; /* local RTP port number */
508 kal_uint16 local_rtcp_port; /* local RTCP port number */
509 kal_uint8 local_addr[VOIP_MAX_IP_SEG_LEN]; /* local address */
510 kal_uint8 remote_addr[VOIP_MAX_IP_SEG_LEN]; /* remote address */
511 kal_bool is_dtmf; /* is DTMF supported */
512 kal_bool is_sdp_exchanged; /* is SDP exchange finished */
513 voip_rtp_direction_enum direction; /* media direction, */
514 voip_annex_enum g7231_annexa; /* G7231 annexa */
515 voip_annex_enum g729_annexb; /* G729 annexb */
516 voip_crypto_struct *crypto_info; /* crypto info */
517}voip_dialog_info_struct;
518
519typedef struct
520{
521 kal_uint32 call_id;
522 voip_dialog_info_struct dialog[VOIP_MAX_NUM_DIALOG]; /* dialog */
523 voip_call_state_enum call_state; /* Call state */
524 kal_uint8 num_dialogs; /* Number of dialog in this call */
525 kal_bool is_bk_call; /* If the call is a background call */
526 kal_bool is_conference; /* If the call is a conference server call */
527}voip_call_info_struct;
528
529typedef struct
530{
531 voip_msg_struct msg[VOIP_MWI_TOTAL]; /* message indication list */
532 kal_bool msg_present[VOIP_MWI_TOTAL]; /* if the message is present */
533 kal_bool is_account_present; /* if message account is present */
534 kal_char msg_account[VOIP_URI_LEN]; /* Eg, "sip: a@b.c" */
535}voip_mwi_info_struct;
536
537
538typedef struct
539{
540 kal_char disp_name[VOIP_DISP_NAME_LEN*3]; /*Display name of the user, could be null */
541 kal_char uri[VOIP_URI_LEN]; /* Eg, "sip: a@b.c" */
542 voip_conf_user_status_enum state;
543}voip_conf_user_struct;
544
545
546/*****************************************************************************
547* Message struct
548*****************************************************************************/
549#define VOIP_MSG_STRUCT
550/* Registration */
551typedef struct
552{
553 kal_uint8 ref_count;
554 kal_uint16 msg_len;
555 voip_profile_struct profile; /* Profile settings */
556 voip_setting_struct setting; /* Setting of the call */
557}mmi_voip_register_req_struct;
558
559/* Setting */
560typedef struct
561{
562 kal_uint8 ref_count;
563 kal_uint16 msg_len;
564 voip_setting_struct setting; /*Setting of the call */
565}mmi_voip_setting_req_struct;
566
567typedef struct
568{
569 kal_uint8 ref_count;
570 kal_uint16 msg_len;
571 kal_uint8 result; /* result */
572 kal_int32 cause; /* cause of the result */
573}mmi_voip_result_struct;
574
575typedef mmi_voip_result_struct mmi_voip_register_rsp_struct;
576typedef mmi_voip_result_struct mmi_voip_deregister_rsp_struct;
577typedef mmi_voip_result_struct mmi_voip_deregister_ind_struct;
578typedef mmi_voip_result_struct mmi_voip_setting_rsp_struct;
579
580/* call related indications */
581typedef struct
582{
583 kal_uint8 ref_count;
584 kal_uint16 msg_len;
585 kal_uint32 call_id; /* call id of the ringing call */
586 kal_uint32 dialog_id; /* dialog id of the ringing call */
587 voip_addr_struct refer_by; /* Address of the refer-by field */
588 kal_wchar call_list[VOIP_FILE_LEN]; /* Name of call list file */
589 kal_bool is_refer_by; /* If the call is refered by other users */
590#ifdef VOIP_DEBUG_CALL_LIST
591 voip_call_info_struct call_info[6];
592#endif
593}mmi_voip_call_ring_ind_struct;
594
595typedef struct
596{
597 kal_uint8 ref_count;
598 kal_uint16 msg_len;
599 kal_uint32 call_id; /* call id of the ringing call */
600 kal_uint32 dialog_id; /* dialog id of the ringing call */
601 kal_uint32 replace_call_id; /* call id of the replaced call */
602 kal_uint32 replace_dialog_id; /* dialog id of the ringing call */
603}mmi_voip_call_replace_ind_struct;
604
605typedef struct
606{
607 kal_uint8 ref_count;
608 kal_uint16 msg_len;
609 kal_uint8 result; /* Accept the call or not */
610 kal_uint32 call_id; /* call id of the ringing call */
611 kal_uint32 dialog_id; /* dialog id of the ringing call */
612 kal_uint32 replace_call_id; /* call id of the replaced call */
613 kal_uint32 replace_dialog_id; /* dialog id of the ringing call */
614}mmi_voip_call_replace_cnf_struct;
615
616typedef struct
617{
618 kal_uint8 ref_count;
619 kal_uint16 msg_len;
620 kal_uint32 replace_call_id; /* call id of the replaced call */
621 kal_uint32 replace_dialog_id; /* dialog id of the replaced call */
622 voip_call_struct call; /* affected call */
623}mmi_voip_call_replace_complete_ind_struct;
624
625typedef struct
626{
627 kal_uint8 ref_count;
628 kal_uint16 msg_len;
629 kal_uint32 call_id; /* Call ID */
630 kal_uint32 dialog_id; /* Dialog ID */
631 kal_int32 cause; /* cause of the result */
632 kal_uint8 result; /* result */
633 kal_wchar call_list[VOIP_FILE_LEN]; /* length of cal list file */
634 kal_uint16 status_code; /* status code of call end */
635#ifdef VOIP_DEBUG_CALL_LIST
636 voip_call_info_struct call_info[6];
637#endif
638}mmi_voip_call_end_ind_struct;
639
640typedef struct
641{
642 kal_uint8 ref_count;
643 kal_uint16 msg_len;
644 kal_uint32 call_id; /* Call ID */
645 kal_uint32 dialog_id; /* Dialog ID */
646 kal_char tansfer_target[VOIP_URI_LEN]; /* Address of the transfer target. Used when the remote site asks to transfer the call */
647 voip_state_ind_enum change_cause; /* Main state of changes */
648 voip_call_struct call; /* affect call */
649#if 0
650/* under construction !*/
651#ifdef VOIP_DEBUG_CALL_LIST
652/* under construction !*/
653#endif
654#endif
655}mmi_voip_call_state_ind_struct;
656
657typedef struct
658{
659 kal_uint8 ref_count;
660 kal_uint16 msg_len;
661 kal_uint32 call_id; /* Call ID */
662 kal_uint32 dialog_id; /* Dialog ID */
663 voip_call_progress_enum status; /* Status of the call (ringing, forward, and etc..) */
664 kal_wchar call_list[VOIP_FILE_LEN]; /* length of cal list file */
665#ifdef VOIP_DEBUG_CALL_LIST
666 voip_call_info_struct call_info[6];
667#endif
668}mmi_voip_progressing_ind_struct;
669
670/* call action request */
671typedef struct
672{
673 kal_uint8 ref_count;
674 kal_uint16 msg_len;
675 kal_char target_call[VOIP_URI_LEN]; /* Eg, "sip: a@b.c" Call to be dialed */
676 voip_call_id_struct active_call; /* Call to be activated. Call Transfer also uses this as the transferee */
677 voip_call_id_struct hold_call; /* Call to be held */
678 voip_call_id_struct rel_call; /* Call to be released or rejected */
679 voip_call_act_enum op_code; /* Operation code */
680 kal_int8 abort_call_id;
681#ifdef VOIP_SIP_CAPACITY_SUPPORT
682 voip_caller_pref_struct caller_pref[VOIP_MAX_CALLER_PREFERENCE];
683#endif
684}mmi_voip_call_act_req_struct;
685
686typedef struct
687{
688 kal_uint8 ref_count;
689 kal_uint16 msg_len;
690 voip_call_act_enum op_code; /* Operation code */
691 kal_uint8 result; /* result */
692 kal_int32 cause; /* cause of the result */
693 kal_wchar call_list[VOIP_FILE_LEN]; /* length of cal list file */
694#ifdef VOIP_DEBUG_CALL_LIST
695 voip_call_info_struct call_info[6];
696#endif
697}mmi_voip_call_act_rsp_struct;
698
699/* MWI, this primitive is used to notify the status of waiting message. */
700typedef struct
701{
702 kal_uint8 ref_count;
703 kal_uint16 msg_len;
704 kal_bool is_msg_waiting;
705 voip_mwi_info_struct mwi_info;
706}mmi_voip_waiting_msg_ind_struct;
707
708/* conference state indication structure */
709typedef struct
710{
711 kal_uint8 ref_count;
712 kal_uint16 msg_len;
713 kal_uint32 call_id; /* call ID */
714 kal_uint32 dlg_id; /* dialog ID */
715 kal_uint32 count; /* number of entity in this indication */
716 kal_wchar file_path[VOIP_FILE_LEN]; /* file path+name for entity list */
717 voip_conf_state_enum conf_state; /* state of conference indication */
718}mmi_voip_conference_state_ind_struct;
719
720#ifdef SIP_CONFORMANCE_TEST
721/* MWI, this primitive is used to notify the status of waiting message. */
722typedef struct
723{
724 kal_uint8 ref_count;
725 kal_uint16 msg_len;
726 kal_char uri[VOIP_URI_LEN]; /* Address of remote server */
727}mmi_voip_option_req_struct;
728
729/* MWI, this primitive is used to notify the status of waiting message. */
730typedef struct
731{
732 kal_uint8 ref_count;
733 kal_uint16 msg_len;
734 kal_uint8 result; /* result */
735 kal_int32 cause; /* cause of the result */
736 kal_char data[VOIP_SIP_OPTION_LEN];
737}mmi_voip_option_rsp_struct;
738#endif /* SIP_CONFORMANCE_TEST */
739
740/* Transferee, this primitive is used to notify an refer is received */
741typedef struct
742{
743 kal_uint8 ref_count;
744 kal_uint16 msg_len;
745 kal_bool result;
746}mmi_voip_transferee_cnf_struct;
747
748typedef struct
749{
750 kal_uint8 ref_count;
751 kal_uint16 msg_len;
752 kal_uint8 result; /* result */
753 kal_int32 cause; /* cause of the result */
754 kal_uint32 call_id; /* Call ID */
755 kal_uint32 dialog_id; /* Dialog ID */
756}mmi_voip_act_bk_rej_rsp_struct;
757
758#endif /* _MMI2VOIP_STRUCT_H */
759