Review Board 1.7.16


Dahdi FXS line polarity reversal when remote party Answers and/or Hangups

Review Request #797 - Created July 22, 2010 and submitted

Alec Davis
trunk
17318
Reviewers
asterisk-dev
Asterisk
Quoting armeniki:
"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."

Implementation was to use existing keywords as used for FXO modules 'answeronpolityswitch' and 'hanguponpolarityswitch', with a similar function for the FXS module but from the Legacy PBX's point of view.
Using TDM800P FXS modules:

Inbound and outbound calls, using answeronpolarityswitch and hanguponpolarityswitch 

Changes between revision 3 and 4

1 2 3 4 5
1 2 3 4 5

  1. trunk/channels/sig_analog.h: Loading...
trunk/channels/sig_analog.h
Diff Revision 3 Diff Revision 4
[20] 144 lines
[+20] [+] struct analog_callback {
145
	/*! \brief Set channel on hook */
145
	/*! \brief Set channel on hook */
146
	int (* const on_hook)(void *pvt);
146
	int (* const on_hook)(void *pvt);
147
	/*! \brief Set channel off hook */
147
	/*! \brief Set channel off hook */
148
	int (* const off_hook)(void *pvt);
148
	int (* const off_hook)(void *pvt);
149
	void (* const set_needringing)(void *pvt, int value);
149
	void (* const set_needringing)(void *pvt, int value);

    
   
150
	/*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
150
	void (* const set_polarity)(void *pvt, int value);
151
	void (* const set_polarity)(void *pvt, int value);

    
   
152
	/*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
151
	void (* const start_polarityswitch)(void *pvt);
153
	void (* const start_polarityswitch)(void *pvt);

    
   
154
	/*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
152
	void (* const answer_polarityswitch)(void *pvt);
155
	void (* const answer_polarityswitch)(void *pvt);

    
   
156
	/*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
153
	void (* const hangup_polarityswitch)(void *pvt);
157
	void (* const hangup_polarityswitch)(void *pvt);
154
	/* 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
158
	/* 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
155
	 * function */
159
	 * function */
156
	int (* const wink)(void *pvt, enum analog_sub sub);
160
	int (* const wink)(void *pvt, enum analog_sub sub);
157
	int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
161
	int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
[+20] [20] 216 lines
  1. trunk/channels/sig_analog.h: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.