add wink command patch (still needs more code)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@614 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
b3a8afd996
commit
07a8ebe5e0
|
@ -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,
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue