[asterisk-dev] TDM400P FXS polarity reversal method.

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Dec 14 06:21:59 CST 2008


On Sun, Dec 14, 2008 at 11:48:57PM +1300, Alec Davis wrote:
> The wctdm code specifically has code to set an FXS module to reverse the
> line voltage, the code I refer to is a module parameter 'reversepolarity'.
> When I " echo 1 > /sys/module/wctdm/parameters/reversepolarity" the line
> succesfully changes from -48V to +48V

I figure that the "correct" way to change it is through the appropriate
ioctl. The mothod used by fxstest. This is what Asterisk should use.

Polarity reversal has a number of usages.

> 
> But when attempting to use the VSGN bit 6 (Register 72) from the Si3215
> datasheet which sets the VTip-VRing polarity, when I set this bit the
> On-Hook voltage changes from -48v to +9.5v, not +48V as expected.
> 
>         if (vmwilamp){						  /* Visual Message Waiting Indicator */
>                 wctdm_setreg(wc, card, 72, 0x60);       /* reverse line
> voltage*/
>         } else {
>                 wctdm_setreg(wc, card, 72, 0x20);       /* normal line */
>         }

Now you're playing directly with the line voltage without asking what it
was previously. Don't do that.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list