1 #include <termios.h> 2 3 #ifndef TRUE 4 #define TRUE 1 5 #endif 6 7 #ifndef FALSE 8 #define FALSE 0 9 #endif 10 11 #define PORT_BASE 5198 12 13 14 struct termios term_params, old_term_params; 15 raw_tty(int flag)16void raw_tty(int flag){ 17 18 if(flag){ 19 tcgetattr(fileno(stdin), &old_term_params); 20 term_params = old_term_params; 21 cfmakeraw(&term_params); 22 tcsetattr(fileno(stdin), TCSAFLUSH, &term_params); 23 } else{ 24 tcsetattr(fileno(stdin), TCSAFLUSH, &old_term_params); 25 } 26 } 27 28 29 struct gsmVoice_t { 30 unsigned char version; 31 unsigned char pt; 32 unsigned short seqNum; 33 unsigned long time; 34 unsigned long ssrc; 35 unsigned char data[33*4]; 36 }; 37 38 39 40