summaryrefslogtreecommitdiff
path: root/channels/sig_analog.h
diff options
context:
space:
mode:
authorAlec L Davis <sivad.a@paradise.net.nz>2010-07-22 23:14:50 +0000
committerAlec L Davis <sivad.a@paradise.net.nz>2010-07-22 23:14:50 +0000
commit85bfe38f2f7a22e7ff300efbe48a1b658896866c (patch)
tree46a9b237320ec45b34bbc4c57965d79679fb8688 /channels/sig_analog.h
parentab0b255455bcd8ccd78de24d61be8b1b1cf2f44d (diff)
Support FXS module Polarity Reversal on remote party Answer and Hangup
FXS lines normally connect to a telephone. However, when FXS lines are routed to an external PBX or Key System to act as "external" or "CO" lines, it is extremely difficult, if not impossible for the external PBX to know when the call has been disconnected without receiving a polarity reversal on the line. Now using answeronpolarityswitch and hanguponpolarityswitch keywords that previously were used only for FXO ports, now applies like functionality for an FXS port, but from the connected equipment's point of view. (closes issue #17318) Reported by: armeniki Patches: fxs_linepolarity.diff5.txt uploaded by alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/797/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_analog.h')
-rw-r--r--channels/sig_analog.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/sig_analog.h b/channels/sig_analog.h
index e7f1ae2be..ff62ed52d 100644
--- a/channels/sig_analog.h
+++ b/channels/sig_analog.h
@@ -147,6 +147,14 @@ struct analog_callback {
/*! \brief Set channel off hook */
int (* const off_hook)(void *pvt);
void (* const set_needringing)(void *pvt, int value);
+ /*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
+ void (* const set_polarity)(void *pvt, int value);
+ /*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
+ void (* const start_polarityswitch)(void *pvt);
+ /*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
+ void (* const answer_polarityswitch)(void *pvt);
+ /*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
+ void (* const hangup_polarityswitch)(void *pvt);
/* We're assuming that we're going to only wink on ANALOG_SUB_REAL - even though in the code there's an argument to the index
* function */
int (* const wink)(void *pvt, enum analog_sub sub);