blob: 43af279d3a28c6b61e23df050b0cba574eaa55eb [file] [log] [blame]
liubin281ac462023-07-19 14:22:54 +08001#include "mbtk_type.h"
2//#include "ql/ql_vcall.h"
3//#include "ql/ql_mcm_call.h"
4#include "ql/ql_voice.h"
5
6
7
8
9int main(int argc, char *argv[])
10{
11 char operator[10] = {0};
12 int opt;
13 int ret = 0;
14 char phoneNum[32] = {0};
15 int h_voice = 0;
16
17 while(1)
18 {
19 printf("=========call main=========\n"
20 "\t0 exit\n"
21 "\t1 call init\n"
22 "\t2 call register handle\n"
23 "\t3 call start\n"
24 "\t4 call end\n"
25 "\t5 call answer\n"
26 "\t6 call set auto answer\n"
27 "\t7 call hold\n"
28 "\t8 call unhold\n"
29 "\t9 call deinit\n"
30 "operator: >> ");
31
32 fgets(operator, sizeof(operator), stdin);
33 fflush(stdin);
34 opt = atoi(operator);
35 switch (opt)
36 {
37 case 0:
38 printf("main exit\n");
39 return 0;
40 case 1:
41 ret = ql_voice_call_init();
42 if(ret < 0)
43 {
44 printf("ql_voice_call_init FAIL. ret:%d\n",ret);
45 return -1;
46 }
47 printf("ql_voice_call_init ret = %d, with h_voice=%d\n", ret, h_voice);
48
49 break;
50 case 2:
51 ret = ql_voice_call_event_register(NULL, NULL);
52 if(ret < 0)
53 {
54 printf("ql_voice_call_event_register FAIL. ret:%d\n",ret);
55 return -1;
56 }
57 break;
58 case 3:
59 ql_voice_call_start("15775690697");
60 break;
61 case 4:
62 ql_voice_call_end();
63 break;
64 case 5:
65 ql_voice_call_answer();
66 break;
67 case 6:
68 ql_voice_auto_answer(6000);
69 break;
70 case 7:
71 ql_voice_call_hold();
72 break;
73 case 8:
74 ql_voice_call_unhold();
75 break;
76 case 9:
77 ql_voice_call_release();
78 break;
79 case 10:
80 // QL_Voice_Call_UnHold;
81 break;
82 default:
83 break;
84 }
85
86 sleep(1);
87 }
88
89 return 0;
90}
91