Core module for a Voice Call Verification Service
ZTE MF190 which supports voice-call.
G.711, μ-law encoding, mono channel, 8000 Hz sample rate.
160 bytes each 20ms, so it's 8 bytes per millisecond.
This module can be used for any other types of datacard which support voice-call, but the signals they return may differ. This can be edited in the constructor of the device.js
file.
In a real-world program, the module should be implemented like this:
- Each verification request is placed in a queue with the phone number is the required info.
- The program takes each phone number and perform voice-call verification.
- If
rejected
ornotAnswered
events occur, the program executes the next task in the queue. - If not, after
hungUp
orendedCall
events occur, the verification info (phone number and verification code are required) is stored in an array. - This verification info is removed after being used by the user, or after an expire time.