BRI ISDN2e

This is my first post. I am a complete newbie with just enough knowledge to be dangerous.
I want to design a small system for use by voluntary-sector helplines. I have read what other people are doing and realise that I might be finding myself ploughing a lonely furrow.
Having looked at the options, ISND2e is the way to go for this application. Unfortunately this is very much a European thing (Germany in particular). So rather limited help from US books and no hardware support from Digium.
What I would like to do is have an Asterisk server with 2 or 3 ISDN2e ports and another server for office applications. There would be four or more workstations (thin clients?) with USB headsets and/or handsets. All telephone operation will be by mouse and keyboard. Thus telephone audio will have to be converted from ISDN a-law to ?? for transmission over Ethernet, then to USB; and of course the reverse. The ?? bit must not result in any loss of quality.
My first problem is the ISDN card(s). A 4-port one can cost more than the rest of the server and I am not at all clear what it will actually do. As server CPU power is cheap, can I use a passive card? Data sheets all seem to be colour leaflets telling you that the product will do wonderful things without telling you the limitations.
Has anyone ever done something like this before? Can anyone offer any advice about cards? Does anyone want to say that it cannot be done?

never done this and I don’t live in europe…

No idea about ISDN2e, but from what i can tell it might just be a brand name for EuroISDN or something.

For your users, no need for USB. Get standard headsets and plug them into the computer’s sound cards. Then find a good softphone program (maybe invest in xten or use sjphone or whatever works), there are tons of them.

If you are in an office then you probably have plenty of bandwidth on the LAN. If you do, there’s no need to convert, asterisk can handle, process and transmit calls using the alaw codec. It’s not as efficient as other codecs bandwidth wise but if that isn’t an issue it will give you great clarity.

I think ISDN2e is more a sort of shorthand: European ISDN Basic Rate 2xB + 1xD channels. This can be sent over an ordinary analogue telephone line. I think this service is rare in the US. Our Primary Rate ISDN is 30xB + 1xD which is obviously a much more serious investment.

VoIP using a Broadband Internet connection is not an attractive proposition for this application which involves almost entirely incoming local calls.

As for the Office, the LAN, and the Computers; none of this actually exists, the idea is to provide a complete package that others, who are setting up a helpline, can take and install and just start using.

The attraction of USB for the audio part is that headsets and handsets can be interchanged with the software identifying which is in use; or the operator could have both plugged in and switch between them.

Coming back to what you were saying about codecs. A software A-law codec in each client would be nice. This would presumably mimic the hardware codec in a real ISDN phone: high and low pass filters, A-law A/D and D/A, sinx/x correction, sampling at 8KHz. What puzzles me about this (being a mere hardware engineer, I worry about these things) is that the sampling needs to be synchronised to the clock recovered from the ISDN line. I just cannot see how this can be done with a network between the ISDN and the codec. Does Asterisk have a solution for this?

yeah we have a similar BRI setup here (2b+1d), but nobody uses it because its expensive, nothing supports it, nobody advertises it, its a pain to order it, and you can usually get DSL or cable internet which is faster, cheaper, and easier to get.

For your usb handsets- a usb handset is little more than a usb audio adapter, the accounting/authorization/etc is all in the software, so hot plugging stuff won’t help you.

However asterisk does have a nifty queues and agents system, so any user can sit down at any phone, punch a code to log into their agent account, and they are automatically joined to any queues that are associated with their agent account. This can also be used for monitoring or accounting purposes.

You are right sync cannot at all be done between the network and the line, so Asterisk doesn’t try. No sync is attempted or is required over the network. Asterisk breaks the alaw data up into packets and sends the packets at regular intervals (~20ms). These are recieved by the phone which decodes them into audio data, and does the same thing for outgoing voice. This setup induces a tiny bit of latency into the whole thing, but it’s not enough to be noticable. I don’t know the insides of zaptel drivers or HFC/CAPI, but its possible there may be a re-code in there somewhere (ie alaw-whatever-alaw encoding). Not sure, but either way it will sound very good.

Alaw codecs are very common in softphones. Almost all phones (soft or hard) will support G.711 u-law and a-law, (64k), then there are a few other popular ones such as gsm (around 15k), iLBC (about 10k) and G.729 (about 7k but has licensing issues). The bare minimum i’ve ever seen is ulaw/alaw/G.729. Asterisk can easily recode the audio from ISDN into any of these formats to save network bandwidth. The softphone or hardphone will take care of whatever encoding needs to be done on its end, as long as it supports that codec. This is one reason why the absolute cheapest IP hardphones start at around $50us (compared to like $8 for a crappy analog set).