-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
res_smdr_whozz: Fix FXO-in-use detection.
Update the code to detect if associated Asterisk device was in use, and thus whether to skip a CDR since Asterisk will be doing it. Previously, the original logic of using the device state failed on incoming calls. Even if not answered through Asterisk, the CDR would get skipped because the device was initially "In Use" and when the call ended it was not. This is the case because when an FXO port is ringing, its device state is "In Use", not "Ringing". Thus, we need to check the channel state of the channel using the device, which allows distinguishing between on-hook ("Ring") and off-hook ("Up").
- Loading branch information
1 parent
e8aabef
commit 6198b9a
Showing
1 changed file
with
117 additions
and
4 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