diff --git a/libs/freetdm/src/include/zap_types.h b/libs/freetdm/src/include/zap_types.h index 57013ff3a1..28fd127fbf 100644 --- a/libs/freetdm/src/include/zap_types.h +++ b/libs/freetdm/src/include/zap_types.h @@ -262,6 +262,7 @@ typedef enum { ZAP_COMMAND_OFFHOOK, ZAP_COMMAND_ONHOOK, ZAP_COMMAND_FLASH, + ZAP_COMMAND_WINK, ZAP_COMMAND_ENABLE_PROGRESS_DETECT, ZAP_COMMAND_DISABLE_PROGRESS_DETECT, ZAP_COMMAND_TRACE_INPUT, diff --git a/libs/freetdm/src/ozmod/ozmod_analog_em/ozmod_analog_em.c b/libs/freetdm/src/ozmod/ozmod_analog_em/ozmod_analog_em.c index 1d951ec65e..5e8649bf4c 100644 --- a/libs/freetdm/src/ozmod/ozmod_analog_em/ozmod_analog_em.c +++ b/libs/freetdm/src/ozmod/ozmod_analog_em/ozmod_analog_em.c @@ -360,10 +360,7 @@ static void *zap_analog_em_channel_run(zap_thread_t *me, void *obj) teletone_run(&ts, zchan->span->tone_map[ZAP_TONEMAP_DIAL]); indicate = 1; - zap_sleep(25); - zap_channel_command(zchan, ZAP_COMMAND_OFFHOOK, NULL); - zap_sleep(200); - zap_channel_command(zchan, ZAP_COMMAND_ONHOOK, NULL); + zap_channel_command(zchan, ZAP_COMMAND_WINK, NULL); } break; case ZAP_CHANNEL_STATE_RING: diff --git a/libs/freetdm/src/ozmod/ozmod_zt/ozmod_zt.c b/libs/freetdm/src/ozmod/ozmod_zt/ozmod_zt.c index 9ab48c4b94..a4802463e3 100644 --- a/libs/freetdm/src/ozmod/ozmod_zt/ozmod_zt.c +++ b/libs/freetdm/src/ozmod/ozmod_zt/ozmod_zt.c @@ -452,6 +452,15 @@ static ZIO_COMMAND_FUNCTION(zt_command) } } break; + case ZAP_COMMAND_WINK: + { + int command = ZT_WINK; + if (ioctl(zchan->sockfd, ZT_HOOK, &command)) { + snprintf(zchan->last_error, sizeof(zchan->last_error), "WINK Failed"); + return ZAP_FAIL; + } + } + break; case ZAP_COMMAND_GENERATE_RING_ON: { int command = ZT_RING;