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 4 and 5

1 2 3 4 5
1 2 3 4 5

  1. trunk/channels/chan_dahdi.c: Loading...
  2. trunk/configs/chan_dahdi.conf.sample: Loading...
trunk/channels/chan_dahdi.c
Diff Revision 4 Diff Revision 5
[20] 2744 lines
[+20] [+] static void my_set_needringing(void *pvt, int value)
2745
}
2745
}
2746

    
   
2746

   
2747
static void my_set_polarity(void *pvt, int value)
2747
static void my_set_polarity(void *pvt, int value)
2748
{
2748
{
2749
	struct dahdi_pvt *p = pvt;
2749
	struct dahdi_pvt *p = pvt;
2750
	int res;

   
2751

    
   
2750

   
2752
	if (p->channel == CHAN_PSEUDO)
2751
	if (p->channel == CHAN_PSEUDO) {
2753
		return;
2752
		return;

    
   
2753
	}
2754
	p->polarity = value;
2754
	p->polarity = value;
2755
	res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETPOLARITY, &value);
2755
	ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETPOLARITY, &value);
2756
}
2756
}
2757

    
   
2757

   
2758
static void my_start_polarityswitch(void *pvt)
2758
static void my_start_polarityswitch(void *pvt)
2759
{
2759
{
2760
	struct dahdi_pvt *p = pvt;
2760
	struct dahdi_pvt *p = pvt;
[+20] [20] 15156 lines
trunk/configs/chan_dahdi.conf.sample
Diff Revision 4 Diff Revision 5
 
  1. trunk/channels/chan_dahdi.c: Loading...
  2. trunk/configs/chan_dahdi.conf.sample: 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.