Pulse dialing detection method and system based on SLIC, medium and equipment
By integrating interrupt trigger pulse dial detection solution in the SLIC chip, the problem that SLIC chips in the prior art cannot effectively detect pulse dialing is solved, and high-precision pulse dialing detection is achieved, reducing software load.
Patent Information
- Application Number
- CN202510062911.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-18
AI Technical Summary
Existing SLIC chips cannot effectively detect pulse dialing, and rely on upper-layer software for detection, resulting in heavy software load and large time accuracy errors.
By integrating interrupt trigger pulse dial detection scheme in the SLIC chip, the current changes in the DC local loop are monitored, off-hook and hang-up events are identified, and whether hang-up timeout, beat-up signal or pulse dialing occurs based on the number of events and time intervals.
The pulse dial detection of the SLIC chip itself is realized, reducing the software consumption on the SOC side, improving the time accuracy, and compatible with existing software solutions.
Smart Images

Figure CN119854402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a pulse dialing detection method, system, medium and equipment based on SLIC. Background Art
[0002] In SLIC (Subscriber Line Interface Circuit) applications, there are two common dialing methods for telephones, one is DTMF dialing and the other is pulse dialing. Pulse dialing interrupts the DC local loop every time a signal is transmitted. After the loop current is interrupted, the SLIC chip detects the on-hook condition. After the loop current is restored, the SLIC chip detects the off-hook condition.
[0003] For pulse dialing detection, it is necessary to consider the on-hook timeout and fork-flash signal at the same time. Figure 1 As shown in the figure, both are related to on-hook and off-hook, and are valid signals. The application layer will perform different responses according to the specific signals.
[0004] The current SLIC chip only detects on-hook and off-hook based on the loop current, but does not record and judge the pulse time, nor does it count the number of pulses.
[0005] The current pulse dialing detection is performed by software on the SOC side. It is necessary to continuously query the on / off status of the SLIC chip and determine whether it is pulse dialing by time calculation. The software load is heavy and the time accuracy error is large, about 10ms. Summary of the invention
[0006] In view of the defects in the prior art, the object of the present invention is to provide a pulse dialing detection method, system, medium and device based on SLIC.
[0007] The pulse dialing detection method based on SLIC provided by the present invention comprises:
[0008] Step 1: Monitor the current change in the DC local loop to identify off-hook and on-hook events;
[0009] When an on-hook event is detected, the on-hook count is increased and the on-hook timestamp is recorded;
[0010] When an off-hook event is detected, the off-hook count is increased and the off-hook timestamp is recorded;
[0011] Step 2: Start the timer, starting from the first hang-up event, and stop and reset the timer after each event is reported;
[0012] Step 3: Determine whether an on-hook timeout event occurs, whether a hook flash signal is satisfied, or whether a valid pulse number input is completed according to the number of off-hook and on-hook calls and the corresponding time interval;
[0013] When an on-hook timeout event is detected, that is, when the number of on-hook times is greater than the number of off-hook times and the current time exceeds the preset on-hook timeout time, the on-hook timeout signal is triggered to be reported;
[0014] When a hook flash signal is detected, that is, when the system changes from an off-hook state to an on-hook state and then back to an off-hook state, and the time of this process meets the hook flash time limit, the identification and processing of the hook flash signal is triggered.
[0015] Preferably, for pulse dialing of numbers 0 to 9, numbers 1 to 9 correspond to 1 to 9 pulses respectively, and number 0 corresponds to 10 pulses;
[0016] The generation of each pulse includes the process from picking up the phone to hanging up the phone and then picking up the phone again. There is a time interval between two pulse dialings.
[0017] Preferably, the off-hook and on-hook timestamps and counts are reset after each event is reported.
[0018] Preferably, if the number of off-hook and on-hook times is equal and exceeds the preset dialing interval, the off-hook and on-hook timestamp sequences are analyzed to determine whether the connection time or closing time and the disconnection time meet the pulse dialing standard, and the corresponding pulse number is reported accordingly.
[0019] The pulse dialing detection system based on SLIC provided by the present invention comprises:
[0020] Module M1: monitors the current changes in the DC local loop to identify off-hook and on-hook events;
[0021] When an on-hook event is detected, the on-hook count is increased and the on-hook timestamp is recorded;
[0022] When an off-hook event is detected, the off-hook count is increased and the off-hook timestamp is recorded;
[0023] Module M2: Start the timer, start timing from the first hang-up event, and stop and reset the timer after each event is reported;
[0024] Module M3: Determine whether an on-hook timeout event occurs, whether a hook flash signal is met, or whether a valid pulse number input is completed according to the number of off-hook and on-hook calls and the corresponding time interval;
[0025] When an on-hook timeout event is detected, that is, when the number of on-hook times is greater than the number of off-hook times and the current time exceeds the preset on-hook timeout time, the on-hook timeout signal is triggered to be reported;
[0026] When a hook flash signal is detected, that is, when the system changes from an off-hook state to an on-hook state and then back to an off-hook state, and the time of this process meets the hook flash time limit, the identification and processing of the hook flash signal is triggered.
[0027] Preferably, for pulse dialing of numbers 0 to 9, numbers 1 to 9 correspond to 1 to 9 pulses respectively, and number 0 corresponds to 10 pulses;
[0028] The generation of each pulse includes the process from picking up the phone to hanging up the phone and then picking up the phone again. There is a time interval between two pulse dialings.
[0029] Preferably, the off-hook and on-hook timestamps and counts are reset after each event is reported.
[0030] Preferably, if the number of off-hook and on-hook times is equal and exceeds the preset dialing interval, the off-hook and on-hook timestamp sequences are analyzed to determine whether the connection time or closing time and the disconnection time meet the pulse dialing standard, and the corresponding pulse number is reported accordingly.
[0031] According to the computer-readable storage medium storing a computer program provided by the present invention, when the computer program is executed by a processor, the steps of the pulse dialing detection method based on SLIC are implemented.
[0032] The electronic device provided according to the present invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the pulse dialing detection method based on SLIC are implemented.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] (1) The SLIC chip is compatible with existing solutions, only reporting on-hook and off-hook interrupts, and detecting pulse dialing through upper-layer software solutions;
[0035] (2) The SLIC chip itself can detect pulse dialing and report the corresponding event interrupt. The upper-layer software only needs to query the event.
[0036] (3) The SLIC chip detects pulse dialing itself and does not rely on upper-layer software, so the time accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0038] Figure 1 It is a schematic diagram of on-hook timeout, fork flash, and pulse dialing signals;
[0039] Figure 2 Schematic diagram for enabling HOOK_DEBOUNCE;
[0040] Figure 3 This is a schematic diagram of the off-hook and on-hook interruption timestamp counting;
[0041] Figure 4 This is a schematic diagram of the on-hook timeout detection;
[0042] Figure 5 This is a schematic diagram of fork flash signal detection;
[0043] Figure 6 This is a pulse dialing '2' detection diagram;
[0044] Figure 7 This is a schematic diagram of the overall HOOK_DEBOUNCE solution. DETAILED DESCRIPTION
[0045] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0046] Example
[0047] The present invention proposes a pulse dialing detection method based on SLIC, comprising:
[0048] In SLIC applications, there are two dialing methods for telephones: DTMF dialing and pulse dialing. Pulse dialing interrupts the DC local loop every time a signal is transmitted. After the loop current is interrupted, the SLIC chip detects the on-hook condition. After the loop current is restored, the SLIC chip detects the off-hook condition.
[0049] When pulse dialing, the numbers 1 to 9 will generate 1 to 9 corresponding pulses, and the number 0 will generate 10 pulses. The process of generating one pulse is as follows: SLIC goes from off-hook to on-hook and then back to off-hook. After pulse dialing completes one number, it needs to wait for at least the preset internal time before continuing the second dialing. For example, when pulse dialing '1', SLIC goes from off-hook -> on-hook -> off-hook, and one pulse appears. When pulse dialing '2', SLIC goes from off-hook -> on-hook -> off-hook -> on-hook -> off-hook, and two pulses appear.
[0050] The present invention integrates an interrupt-triggered pulse dialing detection scheme (see Figure 7Description), and is compatible with existing software solutions. Chip-level pulse dialing detection greatly reduces the software consumption on the SOC side, and the time accuracy can be <1ms.
[0051] like Figure 2 As shown in the figure, when the chip is in the off-hook state, if HOOK_DEBOUNCE_ENABLE is enabled, the chip will perform relevant detection and output the on-hook timeout, fork flash or pulse dialing signal. If HOOK_DEBOUNCE_ENABLE is not enabled, the off-hook and on-hook signals are directly output, which is compatible with the existing upper-layer software solutions.
[0052] like Figure 3 As shown, when the first on-hook interrupt is generated, the timer is started and starts counting from 0, and each subsequent on-hook interrupt is generated, the timer count is updated to the corresponding on-hook interrupt timestamp sequence.
[0053] like Figure 4 As shown, when the first on-hook interrupt is generated, the on-hook interrupt will be waited for. If the waiting time for the off-hook interrupt times out, the on-hook timeout event is reported.
[0054] like Figure 5 As shown, after the first on-hook interruption is generated, an off-hook interruption is generated, and then no interruption is generated within the digitInter time. According to the on-hook and off-hook timestamp, it is determined that the interval between the two interruptions meets the time requirement of the hook flash signal, and the hook flash event is reported.
[0055] like Figure 6 As shown, after the first on-hook interruption occurs, multiple pulses are generated. If no new interruption occurs during the dialing time after the last off-hook interruption occurs, the on-hook and off-hook timestamp is used to determine whether the pulse dialing make\break time requirement is met. If it is met, the pulse dialing event is reported and the number is notified.
[0056] like Figure 7 As shown in the figure, it is the overall solution design diagram when HOOK_DEBOUNCE_ENABLE is enabled.
[0057] When an on-hook interrupt is generated, the on-hook count is increased by 1, and the on-hook time is recorded in the on-hook timestamp sequence. When an off-hook interrupt is generated, the off-hook count is increased by 1, and the off-hook time is recorded in the off-hook timestamp sequence. The off-hook time refers to the timer counting time when the phone is on or off-hook. The on-hook timestamp will be cleared after the event is reported. The on-hook count will be cleared after the event is reported.
[0058] The timer will start when the first hang-up interrupt occurs, that is, the first hang-up interrupt occurs at time 0. The timer will stop and clear to 0 after the event is reported.
[0059] When the number of on-hook times is greater than the number of off-hook times and the current time exceeds the on-hook timeout time, an on-hook timeout event is reported.
[0060] When the number of off-hook times is equal to the number of on-hook times, and the current time is longer than the dialing interval from the last off-hook time, the on-hook timestamp sequence is judged. If the number of on-hook times is 1, it is necessary to judge whether the make time meets the fork flash or pulse number '1'. If the number of on-hook times is 2 to 10, it is necessary to judge whether the make time and break time meet the make\break requirements of pulse dialing. If they meet, the corresponding pulse number is reported according to the on-hook count. The on-hook timeout signal means that there is no off-hook action for a long time after the SLIC goes on-hook from the off-hook state, which is considered to be an on-hook timeout signal. The fork flash signal means that the SLIC goes on-hook from the off-hook state for a period of time and then returns to the off-hook state, and a pulse appears. The pulse time meets the fork flash time limit, which is considered to be a fork flash signal.
[0061] Specifically, the overall solution design when HOOK_DEBOUNCE_ENABLE is enabled includes:
[0062] (1) HOOK_DEBOUNCE_ENABLE can select whether to enable the chip pulse dialing detection function;
[0063] (2) Selection of a timer: The FSYNC clock of the PCM interface of the existing SLIC is selected for counting at 8 kHz. Each count represents 125 us, every 8 counts represents 1 ms, and every 8000 counts represents 1 second.
[0064] (3) Timestamps are divided into two categories: on-hook and off-hook. Each type of timestamp can contain up to 11 data. The maximum number of pulses for pulse dialing is 10. When illegal input occurs, the number may exceed 10. Therefore, 11 data spaces are reserved.
[0065] (4)Customized time limit, reserved register location, readable and writable, the specific table is as follows.
[0066] Table 1 Customer customized time configuration table
[0067] name describe Onhook_timeout Hang up timeout Flash_min Minimum time for flashing hook Flash_max Maximum time of flash hook Make_min Pulse dialing make minimum time Make_max Pulse dialing make maximum time Break_min Pulse dial break minimum time Break_max Pulse dial break maximum time Digit_interval Minimum pulse dialing time interval
[0068] (5) The EVENT event reports the reserved interrupt status bit and enable bit. The specific table is as follows. After the PulseDigit interrupt occurs, the current number can be obtained by reading the corresponding register.
[0069] Table 2EVENT event table
[0070]
[0071]
[0072] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0073] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0074] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A pulse dialing detection method based on SLIC, characterized in that: include: Step 1: Monitor the current change in the DC local loop to identify off-hook and on-hook events; When an on-hook event is detected, the on-hook count is increased and the on-hook timestamp is recorded; When an off-hook event is detected, the off-hook count is increased and the off-hook timestamp is recorded; Step 2: Start the timer, starting from the first hang-up event, and stop and reset the timer after each event is reported; Step 3: Determine whether an on-hook timeout event occurs, whether a hook flash signal is satisfied, or whether a valid pulse number input is completed according to the number of off-hook and on-hook calls and the corresponding time interval; When an on-hook timeout event is detected, that is, when the number of on-hook times is greater than the number of off-hook times and the current time exceeds the preset on-hook timeout time, the on-hook timeout signal is triggered to be reported; When a hook flash signal is detected, that is, when the system changes from an off-hook state to an on-hook state and then back to an off-hook state, and the time of this process meets the hook flash time limit, the identification and processing of the hook flash signal is triggered.
2. The pulse dialing detection method based on SLIC according to claim 1, characterized in that: For pulse dialing of the numbers 0 to 9, the numbers 1 to 9 correspond to 1 to 9 pulses respectively, and the number 0 corresponds to 10 pulses; The generation of each pulse includes the process from picking up the phone to hanging up the phone and then picking up the phone again. There is a time interval between two pulse dialings.
3. The pulse dialing detection method based on SLIC according to claim 1, characterized in that: The off-hook and on-hook timestamps and counts are reset after each event is reported.
4. The pulse dialing detection method based on SLIC according to claim 1, characterized in that: If the number of off-hook and on-hook times is equal and exceeds the preset dialing interval, the off-hook and on-hook timestamp sequences are analyzed to determine whether the connection time or closing time, and the disconnection time meet the pulse dialing standards, and the corresponding pulse number is reported accordingly.
5. A pulse dialing detection system based on SLIC, characterized in that: include: Module M1: monitors the current changes in the DC local loop to identify off-hook and on-hook events; When an on-hook event is detected, the on-hook count is increased and the on-hook timestamp is recorded; When an off-hook event is detected, the off-hook count is increased and the off-hook timestamp is recorded; Module M2: Start the timer, start timing from the first hang-up event, and stop and reset the timer after each event is reported; Module M3: Determine whether an on-hook timeout event occurs, whether a hook flash signal is met, or whether a valid pulse number input is completed according to the number of off-hook and on-hook calls and the corresponding time interval; When an on-hook timeout event is detected, that is, when the number of on-hook times is greater than the number of off-hook times and the current time exceeds the preset on-hook timeout time, the on-hook timeout signal is triggered to be reported; When a hook flash signal is detected, that is, when the system changes from an off-hook state to an on-hook state and then back to an off-hook state, and the time of this process meets the hook flash time limit, the identification and processing of the hook flash signal is triggered.
6. The SLIC-based pulse dialing detection system according to claim 5, characterized in that: For pulse dialing of the numbers 0 to 9, the numbers 1 to 9 correspond to 1 to 9 pulses respectively, and the number 0 corresponds to 10 pulses; The generation of each pulse includes the process from picking up the phone to hanging up the phone and then picking up the phone again. There is a time interval between two pulse dialings.
7. The SLIC-based pulse dialing detection system according to claim 5, characterized in that: The off-hook and on-hook timestamps and counts are reset after each event is reported.
8. The SLIC-based pulse dialing detection system according to claim 5, characterized in that: If the number of off-hook and on-hook times is equal and exceeds the preset dialing interval, the off-hook and on-hook timestamp sequences are analyzed to determine whether the connection time or closing time, and the disconnection time meet the pulse dialing standards, and the corresponding pulse number is reported accordingly.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the pulse dialing detection method based on SLIC according to any one of claims 1 to 4 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the pulse dialing detection method based on SLIC according to any one of claims 1 to 4 are implemented.