Re: [asterisk-users] Fax from FXS to PRI

2011-09-22 Thread Kevin P. Fleming

On 09/20/2011 09:57 PM, Jeff LaCoursiere wrote:


Like most faxing issues, at it's root it is a timing problem IMO.
Sangoma makes a special timing cable to link their cards so you can do
exactly what you are asking to do.  I've never purchased it, but last I
looked into the issue, that is what they suggested.


Digium sells such cables as well, but they cannot resolve this problem 
completely. They solve a related, but different, problem.


There are really two issues at work here: the first is that the nominal 
8kHz clock used on all TDM telephony boards is just that... 'nominal'. 
Every board has its own clock, and digital boards can be configured to 
derive a clock from the spans they are connected to. All of these clocks 
are built with varying degrees of accuracy and tolerance; PSTN-derived 
clocks will generally be of greater accuracy than anything you'd be able 
to afford putting into a PC, so that's why they are always the preferred 
option when they are available.


If two ports in a system are using clocks that differ slightly in 
frequency, then over time they will 'drift'; one port will be producing 
(and consuming) data a slightly higher rate than the other port. The 
percentage of frequency difference will determine how often there will 
be a 'slip'; a 1% difference in an 8kHz clock is 80Hz. With that 
difference, one port will produce/consume data at a rate of 80 samples 
per second faster than the other port; at that rate, slips will occur 
fairly often. When slips occur, data will be lost, or will be replaced 
with silence... this is unavoidable.


Timing cables are designed to reduce the drift/slippage problem; when a 
timing cable is connected between two cards, and at most one of those 
cards is connected to an external connection that provides a clock, then 
a single clock can be distributed between the cards. This produces a 
'clock domain', and the ports will produce and consume data at the same 
rate.


Timing cables do *not*, though, transfer data between the cards; even 
though a timing cable will result in the clocks on the cards being in 
sync, the data from one card still needs to be transferred to the other 
card *on time*. If the data arrives late, silence (or noise) will be 
sent in its place. This means that the entire system (hardware and 
software) must be able to reliably transfer the data between the two 
cards without it ever arriving late. Software running on a CPU, with 
other software operating at the same time, is subject to CPU scheduling 
delays and lots of other potential reasons why it might fail to deliver 
the data on time. The only way to guarantee that the data will not ever 
be late is to directly connect the TDM busses on the cards, or failing 
that, to run a single application on the host CPU with appropriate 
real-time scheduling so that it will *always* have access to CPU time 
slices when they are needed.


Traditional PBXes avoided this problem (because users would not have 
been willing to accept it) by having direct TDM connectivity between all 
of their ports, and having the software only control the connections, 
not transfer the data. This, of course, produces significantly more 
expensive hardware, and this sort of connectivity isn't possible with 
packet networks. As the world has moved to lower-cost solutions and 
Voice-over-IP, some of these long-standing 'problems' have reappeared. 
For voice calls, most users are willing to accept them in return for 
lower costs, increased flexibility and other benefits... but modems and 
FAX machines can't tolerate these problems without help (which is where 
T.38 and V.150 enter the picture).


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fax from FXS to PRI

2011-09-22 Thread Don Kelly
September 22, 2011 11:20 AM  Kevin P. Fleming wrote:

>For many people, with modern CPUs, current versions of DAHDI and Asterisk,
and appropriate configuration (using the faxbuffers option in
chan_dahdi.conf, for example), such a system can be setup to work very, very
close to 100% of the time.


Thanks for the explanation. I think that most of us can be happy with very,
very close to 100%.

  --Don



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fax from FXS to PRI

2011-09-22 Thread Kevin P. Fleming

On 09/20/2011 03:43 PM, Adam Moffett wrote:

If I have a 4 port Digium FXS card and a single port PRI card on the
same asterisk box, is it expected that I'd be able to plug a fax machine
into the analog FXS port and have no problems sending or receiving
faxes? Our connection to the Telco is on the PRI obviously.

I don't recall the specific card models that we have, but I can check if
it matters.

Does the version of asterisk or Zaptel matter?


You need to be using DAHDI, not Zaptel, as there have been a lot of 
improvements in DAHDI as a result of Digium spending a great deal of 
time testing the exact scenario you outlined (and related ones). In 
addition, you need to be using a recent enough version of Asterisk to 
have the 'faxbuffers' configuration option available in chan_dahdi.conf, 
so that channels transferring FAXes can be configured with extra 
buffering to provide an insurance policy against timing slips.


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fax from FXS to PRI

2011-09-22 Thread Kevin P. Fleming

On 09/20/2011 08:57 PM, Don Kelly wrote:


This is a scary answer—you’re saying that what should be simple “TDM”
FXS to PRI does not work?


There is no TDM connection on a PCI or PCI-Express bus. Transferring 
data between two cards in the system either requires a direct connection 
between them (there are older, more expensive systems out there that use 
H.100 for this purpose) or the data has to go through the computer and 
its software.


This means the data has to be packetized (even DAHDI's 1ms chunks are 
still packets), delivered to the host memory, an interrupt sent and 
acknowledged, and some code on the CPU then has to copy the data to 
another place in host memory for it to be sent out to the other card. 
Modern systems are of course fast enough to do this, but there are a lot 
of variables here, and it's possible for data to be occasionally delayed 
on its way between cards. With a voice call, this will likely not be 
noticed at all, but with a modem call or FAX call, it can be catastrophic.



Are you suggesting this is an Asterisk problem or a Digium hardware problem?


It's not a 'problem' with the hardware or the software; it's the nature 
of the beast. If you want 100% guaranteed TDM reliability, you have to 
use TDM connections, not packetized connections. Packetized connections 
can strive for 100% reliability, but most of them will never achieve it.


For many people, with modern CPUs, current versions of DAHDI and 
Asterisk, and appropriate configuration (using the faxbuffers option in 
chan_dahdi.conf, for example), such a system can be setup to work very, 
very close to 100% of the time.


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fax from FXS to PRI

2011-09-20 Thread Jeff LaCoursiere
On Tue, 2011-09-20 at 20:57 -0500, Don Kelly wrote:
> On Tue, Sep 20, 2011 at 4:43 PM, Adam Moffett
>  wrote:
> 
> If I have a 4 port Digium FXS card and a single port PRI card on the
> same asterisk box, is it expected that I'd be able to plug a fax
> machine into the analog FXS port and have no problems sending or
> receiving faxes?  Our connection to the Telco is on the PRI obviously.
> 
> 
> 
> 
> Nobody can say for sure.  It is not a supported configuration.  I can
> tell you that I have had great success and wasted days messing around
> with this configuration.  
> 
> 
> 
>  
> 
> Again, it has never been a supported configuration by Digium, and
> everyone that has dealt with faxing in Asterisk especially on
> different systems will tell you that you won't know until you try.
>  And even then, is it worth days of your time trying to get it as
> close to a POTS line as possible?
> 
> 
> 
> 
> Thanks,
> Steve T
> 
> This is a scary answer—you’re saying that what should be simple “TDM”
> FXS to PRI does not work?
> 
>  
> 
> Are you suggesting this is an Asterisk problem or a Digium hardware
> problem?
> 

Like most faxing issues, at it's root it is a timing problem IMO.
Sangoma makes a special timing cable to link their cards so you can do
exactly what you are asking to do.  I've never purchased it, but last I
looked into the issue, that is what they suggested.

j



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Fax from FXS to PRI

2011-09-20 Thread Don Kelly
On Tue, Sep 20, 2011 at 4:43 PM, Adam Moffett 
wrote:

If I have a 4 port Digium FXS card and a single port PRI card on the same
asterisk box, is it expected that I'd be able to plug a fax machine into the
analog FXS port and have no problems sending or receiving faxes?  Our
connection to the Telco is on the PRI obviously.




Nobody can say for sure.  It is not a supported configuration.  I can tell
you that I have had great success and wasted days messing around with this
configuration.  



 

Again, it has never been a supported configuration by Digium, and everyone
that has dealt with faxing in Asterisk especially on different systems will
tell you that you won't know until you try.  And even then, is it worth days
of your time trying to get it as close to a POTS line as possible?




Thanks,
Steve T

This is a scary answer-you're saying that what should be simple "TDM" FXS to
PRI does not work?

 

Are you suggesting this is an Asterisk problem or a Digium hardware problem?

 

Is this really everyone's experience?

--Don

Don Kelly

PCF Corp
People Come First
651 842-1000
888 Don Kell(y)



 

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Fax from FXS to PRI

2011-09-20 Thread Steve Totaro
On Tue, Sep 20, 2011 at 4:43 PM, Adam Moffett wrote:

> If I have a 4 port Digium FXS card and a single port PRI card on the same
> asterisk box, is it expected that I'd be able to plug a fax machine into the
> analog FXS port and have no problems sending or receiving faxes?  Our
> connection to the Telco is on the PRI obviously.
>
> I don't recall the specific card models that we have, but I can check if it
> matters.
>
> Does the version of asterisk or Zaptel matter?
>
> My related question is this: In the scenario described above does the audio
> pass directly from one card to the other through the PCI bus or does it have
> to somehow be processed by software?
>
>
Nobody can say for sure.  It is not a supported configuration.  I can tell
you that I have had great success and wasted days messing around with this
configuration.

It is usually the other side's fax machine, a cheap all in-one, or it is TX
and RX gains, or IRQs, or..

Questions to ask are
1.  Is this for your system or are you installing for someone else?  You
could look very bad if the proper expectations are not set.  It may take a
great deal of trial and error to get to an acceptable level, if you can even
do that based on need.

2.  Needs, if fax is part of the lifeblood, then this route may not be the
best.  If it doesn't hurt to ask someone to resend or whatever, then go for
it.

Just remember the gotchas, IRQs, TX RX gain settings, echo can when bridged
=no.

Again, it has never been a supported configuration by Digium, and everyone
that has dealt with faxing in Asterisk especially on different systems will
tell you that you won't know until you try.  And even then, is it worth days
of your time trying to get it as close to a POTS line as possible?

Another issue I have run into are the Digium FXS daughter boards getting
fried somehow.  I punch on a 66 block now and put on surge protection after
frying six modules in as many years.  Something like this
http://www.digitaltele.com/ProductInfo.aspx?productid=HCO

I have never had to do that on the FXS side but now it is just standard for
all single pairs I do.  I will know in the next year or two if it helps.  No
idea what is frying the daughterboards.  Must be the fax machine.

Thanks,
Steve T

Thanks,
Steve T
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Fax from FXS to PRI

2011-09-20 Thread Adam Moffett
If I have a 4 port Digium FXS card and a single port PRI card on the 
same asterisk box, is it expected that I'd be able to plug a fax machine 
into the analog FXS port and have no problems sending or receiving 
faxes?  Our connection to the Telco is on the PRI obviously.


I don't recall the specific card models that we have, but I can check if 
it matters.


Does the version of asterisk or Zaptel matter?

My related question is this: In the scenario described above does the 
audio pass directly from one card to the other through the PCI bus or 
does it have to somehow be processed by software?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users