forked from Mirrors/freeswitch
freetdm: add some extra logging in ftmod_zt and ftmod_analog
This commit is contained in:
parent
a49b794317
commit
288455cfe2
|
@ -932,6 +932,7 @@ static void *ftdm_analog_channel_run(ftdm_thread_t *me, void *obj)
|
|||
ftdm_channel_lock(closed_chan);
|
||||
|
||||
if (ftdmchan->type == FTDM_CHAN_TYPE_FXO && ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OFFHOOK)) {
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Going onhook");
|
||||
ftdm_channel_command(ftdmchan, FTDM_COMMAND_ONHOOK, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_OFFHOOK;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "OFFHOOK Failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "OFFHOOK Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
ftdm_set_flag_locked(ftdmchan, FTDM_CHANNEL_OFFHOOK);
|
||||
|
@ -735,7 +735,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_ONHOOK;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "ONHOOK Failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "ONHOOK Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
ftdm_clear_flag_locked(ftdmchan, FTDM_CHANNEL_OFFHOOK);
|
||||
|
@ -745,7 +745,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_FLASH;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "FLASH Failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "FLASH Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_WINK;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "WINK Failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "WINK Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_RING;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "Ring Failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "RING Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
ftdm_set_flag_locked(ftdmchan, FTDM_CHANNEL_RINGING);
|
||||
|
@ -773,7 +773,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
|
|||
{
|
||||
int command = ZT_RINGOFF;
|
||||
if (ioctl(ftdmchan->sockfd, codes.HOOK, &command)) {
|
||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "Ring-off failed");
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "Ring-off Failed");
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
ftdm_clear_flag_locked(ftdmchan, FTDM_CHANNEL_RINGING);
|
||||
|
|
Loading…
Reference in New Issue