sig_analog: Changes to improve electromechanical signalling compatibility

This changeset is intended to address compatibility issues encountered
when interfacing Asterisk to electromechanical telephone switches that
implement ANI-B, ANI-C, or ANI-D.

In particular the behaviours that this impacts include:

 - FGC-CAMA did not work at all when using MF signaling. Modified the
   switch case block to send calls to the correct part of the
   signaling-handling state machine.

 - For FGC-CAMA operation, the delay between called number ST and
   second wink for ANI spill has been made configurable; previously
   all calls were made to wait for one full second.

 - After the ANI spill, previous behavior was to require a 'ST' tone
   to advance the call.  This has been changed to allow 'STP' 'ST2P'
   or 'ST3P' as well, for compatibility with ANI-D.

 - Store ANI2 (ANI INFO) digits in the CALLERID(ANI2) channel variable.

 - For calls with an ANI failure, No. 1 Crossbar switches will send
   forward a single-digit failure code, with no calling number digits
   and no ST pulse to terminate the spill.  I've made the ANI timeout
   configurable so to reduce dead air time on calls with ANI fail.

 - ANI info digits configurable.  Modern digital switches will send 2
   digits, but ANI-B sends only a single info digit.  This caused the
   ANI reported by Asterisk to be misaligned.

 - Changed a confusing log message to be more informative.

ASTERISK-29518

Change-Id: Ib7e27d987aee4ed9bc3663c57ef413e21b404256
This commit is contained in:
Sarah Autumn
2021-06-19 21:36:34 -07:00
committed by Sarah Autumn
parent c4839c04b6
commit 466eb4a52b
5 changed files with 106 additions and 10 deletions

View File

@@ -1098,6 +1098,24 @@ pickupgroup=1
; The default is -1: not to set anything.
;tonezone = 0 ; 0 is US
;
; The number of ANI info digits to expect before the main ANI spill.
; Switches using ANI-B, -C, and -D will usually send 1 digit. Modern digital
; systems will send 2, following NANPA ANI II requirements.
;
;ani_info_digits=2
;
; Time in ms to wait before asterisk sends wink to start ANI spill. Can be
; shortened if your switch supports it.
;
;ani_wink_time=1000
;
; Time in ms to wait for each digit in the spill including the ST pulse.
; This value can affect how long it takes to recognize ANI failures that do
; not send a ST pulse. If ANI failures take too long to recognize, you can
; lower this value.
;
;ani_timeout=10000
;
; FXO (FXS signalled) devices must have a timeout to determine if there was a
; hangup before the line was answered. This value can be tweaked to shorten
; how long it takes before DAHDI considers a non-ringing line to have hungup.