[Asterisk-biz] Modem Over IP: solutions ?

trixter aka Bret McDanel trixter at 0xdecafbad.com
Sun Oct 23 00:35:00 MST 2005


On Sun, 2005-10-23 at 10:27 +0400, Jean-Michel Hiver wrote:

> OK. Question: Isn't it possible to use a large jitter buffer to smoothe 
> out jitter issues?
> 
not normally because of delay issues that arise with large jitter
buffers.  Based on what the remote system says you might have to
respond.  As such with a large jitter buffer you may be out of that
window so your response is late and it messes stuff up.

Further if you use a codec that compresses highly you will corrupt the
modem data becuase the output waveform is an approximation of the input
not exactly the same.  Some echo cancelers also cause problems because
they taper instead of hard on/off.  Some codecs are based on voices.
The human voice can only change pitch so quickly, and they take into
account that (instead of transfering larger numbers saying what each
sample is they transmit a differential between the two, some are
interval based ie +/- 1 interval some are just differentials, either way
the change is so small that modems can exceed that spec).  As such you
cant use high compression algorithms reliably very well.

FSK modems for example (used on the older and somewhat slower specs)
transmit space and marks.  But to transmit more than 1 bit per iteration
they will have ranges over and below the carrier freq.  So lets say for
example +10Hz is bit pattern 10 +20Hz is bit pattern 11, -10 is 01 and
-20 is 00.  There would be four frequencies that need to be represented
accurately enough, generally not as big of a problem with slower modems,
but it can be a problem once you get out of the FSK protocols, and with
some of the higher speed FSK protocols.

Modems are very reliant (whether fax or not) on exact timings, jitter
breaks that, and high lag induced by large jitter buffers can break
response, so in short no a large jitter buffer doesnt always work.

You may get it to work some of the time, but with an alarm system would
you want the liability of munged data not getting through and not being
able to respond?  I wouldnt.


If you have IP connectivity, use that to send short messages, or look at
a tonal thing like baudot (5 bit system).  Even SIP has IM capability to
send messages ...  If you run the receiving modem locally (look at
http://www.sf.net/projects/iaxmodem for a software based modem no extra
hardware needed) you should be able to send data across the net rather
than audio representing bit patterns.  May be a slightly better
solution.  And jitter isnt usually a problem on a well managed local
network (which can exist only between the alarm device and the asterisk
server running on an embedded system if the alarm device cant be
reconfigured).


> >What modem protocol is used?  
> >  
> >
> I don't know yet - I have to go and study customers' equipment. I will 
> let you know once I know more myself!
> 

I was planning on doing iaxmodem to do TDD first, which is a FSK
protocol, eventually I plan on expanding that to everything spandsp
supports.  But I might be encouraged to go other ways first since the
TDD thing is more for personal reasons than anything else.


> >Keep in mind its way better to run iaxmodem on the asterisk server
> >itself over Zap channels as timing between iaxmodem and asterisk is very
> >critical.  
> >  
> >
> I didn't know about the iaxmodem module! I'm going to check it out.
> 

its not a module per se, its a client that uses iax to connect to
asterisk (or anything else via iax2).  So it runs externally rather than
inside of asterisk, but its *best* to run it on the same box via
localhost to asterisk if possible, so that the timing issues arent
whacked.  iaxmodem only currently supports fax protocols, why I was
looking to expand it.

> >Now if he is switching to IP how is that accomplished?
> >
> That's what I'm trying to figure out. My first thought was to use IAX 
> with ulaw but after some reading it sounds that would be shabby. Since 
> the bloke is transmitting alarm informations, reliability is important.
> 

From a liability standpoint, very important.  Save a few dollars here
and there get sued for millions cause the cops or fire department were
never called ...  Bad mojo


> >Or was the plan to not modify the device instead just supply a small cheap
> >sip terminal? 
> >  
> >
> Of course this would be ideal but it might not be doable...
> 
get a sip client you can control so that you can install all the needed
software and decode the modem data there, and send that data via IP
rather than the whole call.  That should boost reliability of the
data...  a couple of dropped packets from the jitter buffer can hose the
bitstream and you are toast.  Alternatively protocols like T.38 that
send redundant info (T.38 sends this and last packet info, a single
dropped packet has no effect since it can be reconstructed, two
consecutive lost packets can break stuff though).  T.38 is a fax
protocol, I mentioned it here as a concept not a suggestion of a
particular protocol.  I still think that decoding locally and sending
just that bit stream would be better.  SIP IM or even 'broadcast' an
asterisk module that sends arbitrary text message to arbitrary
(predefined) clients listening could be used ..  you could then give the
appropriate responses as you would build basically a proxy not a full
implementation of the alarm software.


> >Just trying to see if there is a better way, VoIP is not always the best
> >solution for a given problem, at least not right now.
> >  
> >
> Well the biggest issue for the customer is that they have 2,500 short 
> modem calls per day, and that France Telecom charges almost 10 cents 
> "connection fee" for each call... although technically speaking, France 
> Telecom TDM network is a very good solution for modem calls, it's so 
> damn expensive!

Well if you send the data via the internet as just the bitstream (ie a
daemon on a server listens and responds as if its the server software,
the client gets the modem data translates it to a bitstream not modem
quasi-voice data, sends that, gets any response, then the softmodem at
the site returns that to the alarm system ...)

2500 calls @ 10 cents == 25 'dollars' (euro? whatever) per day.  That is
about 750 'dollars' per month.  How much are the internet feeds going to
cost?  Does this even make business sense to change it?



-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-biz/attachments/20051023/3038d0e0/attachment.pgp


More information about the asterisk-biz mailing list