static int Lucent_handle_dle(char data) { switch (data) { /* * It appears that Lucent modems have just a single * silence detection notification, that always reports * as "<DLE>-s". This report indicates that silence * exceeding the duration of the interval set with AT+VSD * has been detected, regardless of whether there was * previously good data or not. * * So here we override the IS_101 mapping of DLE-s to * "NO_VOICE_ENERGY", and change it to "SILENCE_DETECTED". * * Caveat: this will break vgetty's heuristic "if <DLE>s * was seen, there is nobody at the calling end, so let's try * data/fax mode". So if you have a Lucent modem and want to * do voice and data/fax on the same line, you need calling * modems that send a CNG tone, or have the caller dial up, * wait for a few seconds, and then send another DTMF tone * (which will trigger data/fax mode). * * Patch by Paul Fox <*****@*****.**> */ case 's': return(queue_event(create_event(SILENCE_DETECTED))); } return(IS_101_handle_dle(data)); }
static int Multitech_5600ZDXv_handle_dle(char data) { switch (data) { /* * Local handset goes off hook */ case 't': return(queue_event(create_event(HANDSET_OFF_HOOK))); } return(IS_101_handle_dle(data)); }
int ISDN4Linux_handle_dle(char data) { switch (data) { case DC4: lprintf(L_WARN, "%s: <DLE> <DC4> received", program_name); voice_stop_current_action(); switch (voice_command("", "OK|VCON|NO CARRIER")) { case VMA_USER_3: queue_event(create_event(NO_CARRIER)); break; case VMA_USER_1: case VMA_USER_2: break; default: return FAIL; } got_DLE_DC4 = TRUE; return (OK); case ETX: lprintf(L_WARN, "%s: <DLE> <ETX> received", program_name); voice_stop_current_action(); switch (voice_command("", "OK|VCON|NO CARRIER")) { case VMA_USER_3: queue_event(create_event(NO_CARRIER)); break; case VMA_USER_1: case VMA_USER_2: break; default: return FAIL; } return (OK); default: return(IS_101_handle_dle(data)); } }