Dial Up ISP with Asterisk?

For testing, any type would work - if you use a single analogue line. So you can have your ISP-in-a-box :smile: And you can do better than 9600 bps. For production, external MODEMs are better. For multiple lines, there are also commercial PPP terminal servers so you donā€™t have to run your own PPPd. Using a Radius server is much better than implementing PAP or CHAP in ppp when users are numerous.

Another caveat: you are unlikely licensed to operate an ISP in any other country.

Itā€™s amazing how many people want this but no one takes the initiative to do itā€¦

First:

Reasons why it SHOULD be done

  1. People think dialup is dead. Tell that to your centrally monitored alarm company.
  2. Or how about your DBS TV provider (like DirectTV/Dish Network) which use dialup to report back what PPV events you ordered.
  3. How about businesses that use Verifone standalone credit card terminals that use dialup?
  4. There are manyā€¦ PSTN is cheap, the equipment is cheap and we all donā€™t live with the benefit of ā€œalways-onā€ connections in the world.

Second:

Why hasnā€™t it been done already?

Because Asterisk isnā€™t designed for it. It was designed for voice telephony applications and with that in mind, it caps out with 8kHz of voice bandwidth. It would require some serious code or at least a revision level of patching for it to be implemented. Heck, T.38 (Fax Relay) was just introduced in 1.4 officially.

There is a provision for a TDD (BAUDOT) channel in the source but no one has ever documented how to use it so itā€™s basically dead code.

And only a couple years ago V.150.1 (Modem over IP -MoIP) was formalized. Except for Cisco and others with budgets - no open source initiatives have been put into effect to roll in the V.150.1 standard.

Third:

So where does that leave us?

Currently? S.O.L. :smile:

FAQ:

Q: Can IAXModem do it?
A: No. IAXmodem lacks the supporting code for anything other than a fax negotiation and exchange. The beginning steps for the negotiation are there but lack the branch of when an analog call is deemed DATA or FAX.

Q: Is there a softmodem?
A: The closest Iā€™ve ever found was some old code by Fabrice Bellard (of QEMU fame) called linmodem (google it yourself). Itā€™s basically a sketch but lacks any integration into IAX or SIP protocols.

Q: Can I use my modem now?
A: It depends. Iā€™ve tested 300bps pretty well using my USR Courier V.Everything external (bad and black) through my PAP2 ATA playing back Information Societyā€™s 300bps 8-n-1 track and it decodes it well after you compensate for 8kHz. Iā€™ve connected to various places at speeds ranging from 300-2400bps with more success at 300bps and 1200bps (with LAPM error correction). Higher speeds tend to disconnect immediately after the trunk is established. But itā€™s not as reliable as a Bell derivative PSTN directly by a long shot. My average is about 1 in 5 connections connect and 1 in 10 connect clean enough to work.

Q: Why? Shouldnā€™t uLaw pass a full 64kBit stream with full fidelity?
A: Itā€™s not really a codec issue more than itā€™s a latency issue. The internet works on the premise of packetized data. There is a measure of time from when a packet leaves your computer and arrives at another computer. The lag between source and destination in time is called latency.

PSTN networks donā€™t have this issue. It works on TDM (Time Domain Multiplexing) where everything is calibrated and calculated to the speed of light. The only time youā€™ll ever experience latency in a PSTN network is if the call is routed over a satellite connection since it has to travel 22,400 miles to the satellite, then 22,400 miles back. Or something similarā€¦ The fact is that when your modem emits a tone over the PSTN network, itā€™s instantly recreated at the speed of light at the other endā€¦ not at the speed of the internet which varies widely. Modems donā€™t like being out of sync and thusly connections fail.

Q: So how can this be fixed?
A: The ITU V.150.1 standard. Also known as MoIP or Modem over Internet Protocol. The way it works here is that on each side of the trunk between your PBX and the remote PBX, the connection is being buffered and stripped of some information which is then optimized to make efficient use of the bandwidth. It is then recombined at the remote and sent over their TDM circuit. What it does is take latency out of the equasion and optimizes bandwidth to fit the data transmission. Why waste 64kbit streams on a 9.6kbit stream?

[/u]

Thanks, jfalcon, for the excellent summary. Is this FAQ somewhere in wiki? Ought to be.

Nope. The reason is that itā€™s hoped that someone will eventually work on these items.

This thread has wandered around a bit so let me state my assumptions based on what I just read?

One PRI line that is providing both voice and Internet access to the school. Asterisk is handling the phone lines. Must be a channel bank or something in there, somewhere. It sounds to me like an Integrated Access type line, may well be a dynamic allocation setup. The CO is probably providing a router at the demarc? Probably a Cisco Integrated unit? Big question #1- is the Asterisk hooked up via T1 or via channel bank/analog? Some integrated access devices offer a set number of FXS ports, and Internet via ethernet. Others offer an FT1 hook up to the pbx with up to nth channels for voice - dynamically allocated - where you have 23 channels for Internet (less a bit of overhead) when nobody is on the phone.

For what itā€™s worth Asterisk has some code and examples in the sample configs that lead me to believe Asterisk can pass thru bandwidth for Internet access thatā€™s coming in thru a span on a Digium card - but Iā€™ve never played with it or studied it.

Just as a hypothesis - letā€™s imagine that we have an FT1 coming into the Asterisk box with a pool of DiDā€™s. Itā€™s the dial up numbers that we need to get routed to modems to make this work. The FT1 is what it is and Asterisk isnā€™t really messing with it if you add another T1 port to the mix and hooked it up to a channel bank - and from there to a bank of USB modems hooked up to a PC routerā€¦ that was hooked up to the Internet via ethernet - that should work?

If itā€™s analog lines to the Asterisk box - thatā€™s tougher. However - if you put the same bank of USB modems hooked to a router etc. in front of the Asterisk box, there are ways of detecting a data call and if a data call then have the modem take over before the signal goes to the Asterisk box, if not data, then the modem passes the voice call to the pbx.

Asterisk is usually hooked up directly to a T1 circuit. I guess one can place a router at the Telco Demarc then pluck the number of voice channels off the 24 channels (assuming a full T1) into a separate T1 card on the router which provides telephony services.

Many times people have existing PBX systems (Avaya, Lucent, etcā€¦) and they attach Asterisk on it to provide extra services: queuing, better call routing, etcā€¦ In this case, people would just pipe the T1 into the existing PBX, then over a channel bank or FXO/FXS cards like the TDM400 (maybe ethernet depending on how new the existing PBX is - using H.323/SIP) into the asterisk.

But this does nothing to solve the problem with modemsā€¦

Typically modems are kept to separate lines that are not doing dual service as a voice line as well. The exception here are FAX lines because of the way Fax machines identify themselves over the phone. If youā€™ve ever had a fax machine call you, you hear the remote end beeping. Thatā€™s telling the local end that itā€™s a fax machine and should go into fax negotiation modeā€¦

Analog modems donā€™t do this. Reason is that the typical handshake is that the answering modem sends the negotiation tones and the remote end answers them. Just think about them poor souls that inherited BBS or Tymnet/Telenet telephone numbers that no longer are in service :wink:

Asterisk may or may not work as is. It depends on many factors including transcoding of codecs, latency and aurial bandwidth. Iā€™ve only presented my experience and study on the subject. (See also FreeSwitch which details out technical shortcomings in Asterisk)

However, what I did want to point out was that there are other products that market this capability (ie: Cisco). Personally, if it were done, and even a software modem were created out of it to connect to analog modems, it would go a long ways towards bridging the digital divide we opened by going to broadband. The standards are there. It can be done and should be written to continue making the product (asterisk/digium) a better product.

Since most people donā€™t have access to modem banks or remote dialup nodes, many services that could be ā€œfakedā€ with serial to ethernet adapters will never come to fruition because there is a PSTN world that these devices cannot accomidate for.

And all of this at the turning point in history when Long Distance calling doesnā€™t require bank loans, prostitution of your spouse, selling blood and plasma just to pay your bell company telephone bill. Iā€™m not too old to remember the break up of bell (vaguely) some 25+ years ago or the myraid of services like CompuServe/Genie or PCPursuit (15ish years ago).

But as history would have itā€¦ Bell is back as one pieceā€¦ just the market is still deregulatedā€¦ too funnyā€¦

Interesting you mentioned attaching channel bank. I remember someone mentioned better in-band DTMF detection if there is one TDM segment in the entire loop. If this is reproduceable, it might help like this:

MODEM A <=> DID provider ā€“ VoIP ā€“ * ā€“ TDM channel <=> MODEM B

[quote=ā€œarya6000ā€]Hello

Would it be possible to have a Dial Up ISP service with Asterisk? Like when a user dials the phone number, than there user name and password, they will be given bandwidth from the the internet connection connected to the server. Is that possible?

Thank You[/quote]

I didnā€™t see an answer. Does anyone know if this is at all doable?

Short answer: No.
Long answer: Use a channel bank connected to a modem pool off your TDM/T-1 lines and avoid Asterisk entirely for data.