-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asterisk-chan-lantiq: apply hook state timing in right order
Apply hook state timing parameters starting from the biggest time interval down to the shortest, so the required conditions are always true while applying. Signed-off-by: Daniel Golle <[email protected]> (cherry picked from commit a21103a)
- Loading branch information
Showing
2 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 90c67696fa6676487bb40f391d6cae037175f418 Mon Sep 17 00:00:00 2001 | ||
From 2a379aa2490218d3f15585a8d77b13a17d9eed6b Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <[email protected]> | ||
Date: Tue, 18 Jun 2024 19:41:38 +0100 | ||
Subject: [PATCH 2/2] configure hook state machine timing | ||
|
@@ -131,20 +131,20 @@ Signed-off-by: Daniel Golle <[email protected]> | |
|
||
+ /* Configure hook state machine timing */ | ||
+ memset(&line_hook_vt, 0, sizeof(line_hook_vt)); | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_DIGITLOW_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.digit_low_time_min; | ||
+ line_hook_vt.nMaxTime = dev_ctx.digit_low_time_max; | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_HOOKON_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.hook_on_time; | ||
+ line_hook_vt.nMaxTime = dev_ctx.hook_on_time; | ||
+ if (ioctl(dev_ctx.ch_fd[c], IFX_TAPI_LINE_HOOK_VT_SET, &line_hook_vt)) { | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_DIGITLOW_TIME %d failed\n", c); | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_HOOKON_TIME %d failed\n", c); | ||
+ goto load_error_st; | ||
+ } | ||
+ | ||
+ memset(&line_hook_vt, 0, sizeof(line_hook_vt)); | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_DIGITHIGH_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.digit_high_time_min; | ||
+ line_hook_vt.nMaxTime = dev_ctx.digit_high_time_max; | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_HOOKOFF_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.hook_off_time; | ||
+ line_hook_vt.nMaxTime = dev_ctx.hook_off_time; | ||
+ if (ioctl(dev_ctx.ch_fd[c], IFX_TAPI_LINE_HOOK_VT_SET, &line_hook_vt)) { | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_DIGITHIGH_TIME %d failed\n", c); | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_HOOKOFF_TIME %d failed\n", c); | ||
+ goto load_error_st; | ||
+ } | ||
+ | ||
|
@@ -158,20 +158,20 @@ Signed-off-by: Daniel Golle <[email protected]> | |
+ } | ||
+ | ||
+ memset(&line_hook_vt, 0, sizeof(line_hook_vt)); | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_HOOKOFF_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.hook_off_time; | ||
+ line_hook_vt.nMaxTime = dev_ctx.hook_off_time; | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_DIGITLOW_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.digit_low_time_min; | ||
+ line_hook_vt.nMaxTime = dev_ctx.digit_low_time_max; | ||
+ if (ioctl(dev_ctx.ch_fd[c], IFX_TAPI_LINE_HOOK_VT_SET, &line_hook_vt)) { | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_HOOKOFF_TIME %d failed\n", c); | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_DIGITLOW_TIME %d failed\n", c); | ||
+ goto load_error_st; | ||
+ } | ||
+ | ||
+ memset(&line_hook_vt, 0, sizeof(line_hook_vt)); | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_HOOKON_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.hook_on_time; | ||
+ line_hook_vt.nMaxTime = dev_ctx.hook_on_time; | ||
+ line_hook_vt.nType = IFX_TAPI_LINE_HOOK_VT_DIGITHIGH_TIME; | ||
+ line_hook_vt.nMinTime = dev_ctx.digit_high_time_min; | ||
+ line_hook_vt.nMaxTime = dev_ctx.digit_high_time_max; | ||
+ if (ioctl(dev_ctx.ch_fd[c], IFX_TAPI_LINE_HOOK_VT_SET, &line_hook_vt)) { | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_HOOKON_TIME %d failed\n", c); | ||
+ ast_log(LOG_ERROR, "IFX_TAPI_LINE_HOOK_VT_DIGITHIGH_TIME %d failed\n", c); | ||
+ goto load_error_st; | ||
+ } | ||
+ | ||
|