Telephony module (real phone line) for Pi?

The ringer is an inductive load. Ring voltage is a remarkably flexible beast (in the UK at least) and most phones will ring on anything between about 40V and 150V AC, frequency between 15Hz and 60 Hz.

I think the US is *strictly* 20Hz and some of the older american phones won't ring at any other frequency because they use mechanically resonant armatures for the clapper.

UK phones aren't anywhere near as fussy.

I have heard it said that on the UK network the 50V DC feed to the phone is maintained during ringing, although none of the exchanges I've ever worked on[1] do this so I don't think it's strictly speaking necessary.

While 50V DC is the standard for the speech path, in practice most phones are happy with anything above 5V (older phones with carbon mics are happy below 5V)

This approach does work, as does just using an audio amplifier.

I'll leave protecting the pi from all these nasty volts an exercise for the reader...

-Paul [1] All strowger kit, moden phone exchanges are boring ;)

--
http://paulseward.com
Reply to
LP
Loading thread data ...

Details like that vary by country. In the old days, the local state telecoms defined their line protocol and several versions are in use.

Over here, when the phone rings first the DC feed polarity is reversed, then the calling number is sent as a DTMF string, then the AC voltage is superimposed on the DC. When the calling party hangs up, the DC is reversed back. So you can always determine if you still have a connection.

However, standard modem and answering machine equipment has no logic to detect this and relies on detecting carrier, busy signal, etc.

Also, in most other countries the calling number is sent in 1200 bps FSK and not before the first ring but between the first and second ring. This invariably causes problems when people buy equipment supporting calling number ID and this equipment not being designed for use in the Netherlands.

Complicating it further, there now are competing telecom providers and they (for practical reasons) all use the FSK calling number ID.

Reply to
Rob

nah. You dont do it that way. You drive a HF inverter using a small ferrite core, rectify and smooth te outpout, but not too much, and simply chop the input to it.

IIRC is 70V DC that goes up and down when ringing..

But actually driving a phone is a complext task.

Beter to buy a box that does it all.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

If you are really pedantic, yes they have a modulator and demodulator for converting digital data in to DSL frequencies. But the important thing for this discussion, is that they have no capability of interacting with the voice network, such as connecting/disconnecting calls, extracting caller ID, etc.

---druck

Reply to
druck

It's been a good 30 years since I last worked in a strowger exchange but I do clearly recall that the line polarity on an incoming call is reversed with respect to that when the line is idle or engaged by an outgoing call, along with the reason why.

The two legs of the balanced phone line are referred to as the 'A' and 'B' legs of the line. When idle, galvanically speaking, the B leg is connected to the negative of the exchange battery via one of the two windings of the A relay in the calling cct (typically a linefinder for residential customers and uniselector for business customers). The A leg is connected to the exchange earth (positive connection of the exch battery) via the other winding on the A relay .

For outgoing calls, the polarity remains the same as at idle. The 50v supply allows for plenty of volt drop due to line resistance since the phone only needs about 10% of this (it's current that's important, circa 30mA or so for a carbon mic telephone handset) and, afaicr, about 12 to 15 mA for a modern electronic phone.

On an incoming call, the Final Selector (FS) supplies the operating DC current and the AC ringing current to ring the bell or tone sounder of the called telephone. The ring current generator supply in the exchange is a 75v RMS at 17.67Hz single phase supply[1] interrupted at the appropriate ringing cadence (normally, the supply was generated by a DC to AC motor/generator machine which also drove the cams which generated the ring cadence, providing 3 different feeds which balanced the generator loading in a timeshare fashion).

The reason for the polarity reversal was on account the ringing current generator was an unbalanced source of AC which used a common ground return. The ringing current would be applied to the B leg[2] and the necessary -50v bias supply to detect when the phone had gone 'Off Hook' to answer the call and power the mic cct would be fed over the A leg.

This meant that the relatively high voltage ac (peaks of 100v) didn't have to be superimposed on top of a further 50v, neatly serving two requirements, namely health and safety issues and minimising complexity.

If by that you mean a 70v DC chopped at 17Hz or so, that's one possibility. Another one is to rapidly reverse the 50v at 15 to 17Hz as ISTR doing with a home made setup in the early 70s using a fast reversing relay.

It isn't, really.

In most cases that's tue, simply to avoid spending time that could otherwise be used to earn the money to buy several such 'boxes'

You could generate 25Hz from a cct locked to the 50Hz mains and a 5v peak to peak should generate an 80v peak to peak output without saturation ofthe transformer core.

You seem to be out by about a factor of 10. I'd be looking at a 25mA output, hence a half amp 'secondary' rating.

[1] 16.67Hz (17Hz) was standard for public telephone exchanges but other frequencies were used in PABXes, typically 25Hz which I believe could be readily synthesised from the UK PSU's 50Hz mains supply - it's quite likely the yanks and countries using the 60Hz PSU standard might well have used 30Hz for the same reason. It's also possible that a lower AC voltage may have been used in PABX equipment for the ringer supply since they'd normally only be expected to service much shorter line lengths to the extension phones within the site they were designed to serve. [2] On normal phone lines, the A leg would provide the return path for the ringing current (the 250v DC rated 1.8 microfarad capacitor within the phone (main if extension phones were involved or else the master socket on the later and current plug in phone system) provided the isolation from the -50v battery connection via the FS at the exchange during the ringing phase prior to the called subscriber taking the phone offhook to answer the call.

Of course, it was possible to arrange for the ringing current return to be via the subscriber's local earth connection. This permitted a means of providing shared service in parts of the exchange's coverage area that experienced demand for customer service that had exceeded the telephone planner's expectations.

A single phone line could provide automatic shared service to two customers on a time shared basis. Shared service customers had to agree to an etiquate with regard to the use of the line. Each customer being expected to listen for an existing call by their shared party before pressing the call button[3], apologising, if need be for interrupting an existing call, optionally ascertaining how long they might have to wait or else explain the need to make an emergency call right then and there.

Incoming calls would automatically ring the appropriate customer's telephone by virtue of the use of the local earth return cct at each customers' premises and the fact that the Y customer's line would have the A and B legs reversed with respect to that of the X customer such that the 'hot' leg for the ringer connection would be on the B leg for the X subscriber whilst the Y subscriber would use the A leg.

The "P" (Private) wires used by the exchange equipment associated with each customer's number and calling equipment are jumpered together on the IDF to allow the exchange equipment to correctly return a busy signal whenever the line is engaged regardless of which of the shared numbers is being called.

An unshared number would just simply have the single P wire jumpered to link the calling equipment to the associated FS outlet's P wire connection so that a 'line engaged tone' could be returned to the caller in the event the line was busy due to an established incoming or outgoing call.

Statistically speaking, this usually worked ok most of the time (shared service was only offered to the low usage rate residential customer) but it was possible for an incoming call to be accidentally intercepted by the other customer trying to make an outgoing call.

When this happened, the caller would be advised of the shared line situation and either asked to attempt another call or try later if the calling customer who had answered by accident had an urgent need to make their call. However, there was nothing to stop an obliging shared partner from asking the caller to hang on whilst he alerted his sharing neighbour of the incoming call.

The GPO (as it was when I joined the civil service those many years ago) only offered shared service if both parties were aware of and willing to accept the limitations and pitfalls of a shared service party line.

The usual difficulty lay with finding an existing customer willing to accept the reduction in their quarterly bill as sufficient inducement to downgrade to a shared service line. In some cases, iirc, some existing customers were chosen on the basis of minimum call usage and offered the downgrade to shared service when the additional subscriber was also an existing subscriber who had moved from another part of the exchange's catchment area.

In these cases, the customer being asked to downgrade to a shared service line could make strenuous objections which resulted in the GPO testing the waters with other likely candidates fed from the same DP until they found one that had the least objections or a better rental reduction offer resolved the issue.

Shared service was deprecated a while before I transferred from exchange maintainance to district maintainance duty so I very rarely found myself embroiled in any shared service acrimony.

I believe another form of shared service, or party line working, was practiced in the US which took the form of different ringer burst counts to identify which of anywhere from 2 to 4 sharing customers the call was intended for. In this case, the issue of who was responsible for picking up the tab on outgoing calls could only have been resolved by an operator so must have been a very early form of shared service offered in remote rural areas that still relied on manual switchboard working. Whether this form of party line operation was ever practiced here in the UK, I couldn't say.

[3] The Call Button was required to allow the exchange equipment to detect which of the two parties would be footing the bill for the outgoing call. The mechanism relied upon the exch equipment detecting which of the two legs of the line the earth calling signal appeared on. As you can imagine, this system was open to abuse by a knowledgable and crafty customer, as well as due to errors of maintainance and repairwork which could introduce a line reversal.

These days, there are modern technology solutions for delivering 'shared service' transparently to high demand 'hot spots' not yet served by sufficient line capacity - essentially, technology related to that used by ADSL broadband.

It's been over two decades since I quit BT plus another five years on top of that since I last dealt with any residential shared service lines. I don't imagine that, after all this time, there'd still be any 'legacy' shared service lines still in service today.

--
Regards, J B Good
Reply to
Johny B Good

Actually, I think he meant using a high-frequency PWM signal (many kilohertz) to synthesize a low-frequency sine wave after the transformer and filtering.

In the US, three wires are used for service: tip, ring, and sleeve (named for the switchboard plug connections). Four parties on a service connection were separately ringed by ringing on either tip or ring wires, with either positive or negative bias. Gas tube (valve) rectifiers in the handsets separated the ringing polarities.

The four parties on a line were referred to as tip or ring, positive or negative.

The low-frequency ring current (about 20Hz) was generated at the exchange using a motor-generator set with cadence switching as you have described.

This is all great fun, but I suspect that it belongs in a retro-telephony forum... ;-)

--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
Reply to
Michael J. Mahon

Probably not of the type you describe but wasn't that replaced with a carrier system of some sort? One customer got the base band circuit and another a circuit carried to a small battery powered box at the DP or where the single line "split". Mostly worked, unless the person on the carrier circuit talked a lot and the battery went flat...

DACS, I know if I waited long enough I'd remember the acronym.

formatting link

Rather more complex than I thought. There are some subs end DACS boxes attached to poles around here, don't know if they are still in service though.

--
Cheers 
Dave.
Reply to
Dave Liquorice

I've managed to find the thing and get it plugged into a linux box. My RPi isn't accessible at the moment (being on loan to someone else) so mileage will almost certainly vary depending on what bits of sl-modem are available in the repos.

paul@stathand:~$ lsusb ... Bus 001 Device 003: ID 0483:7554 SGS Thomson Microelectronics 56k SoftModem ... paul@stathand:~$

Taking the thing apart[1] reveals it's a SmartLink chipset (based on the relevant chips being marked SL3800 and SL3801) and that matches up with what the internet says about the device ID. I've not (yet) managed to find datasheets for the SL3800/SL38001 but I suspect one is for the FXO and one for the FXS ports (given that each one appears to have a pair of OpAmps associated with it - presumably TX/RX)

When I took it apart, a perusal of the board layout makes it look very much as though all the gubbins is there for a true FXO/FXS port pair (at least from the line interface side of things) so it should "do the right thing" if tickled appropriately.

sl-modem claims to work with this chipset, but during the brief time I had to play with it last night I couldn't get sl-modem-daemon to start:

paul@stathand:~$ sudo /etc/init.d/sl-modem-daemon start Only access through ALSA is available on amd64 but slamr driver was chosen! Make sure that an ALSA driver for your chipset is available and is loaded and that access to SmartLink modem components is supported by it. paul@stathand:~$

So it looks like I'll need to fix ALSA a bit before I can get any further but it very much looks as though it's recognisable.

Apart from fixing the ALSA stuff, I'll also need to work out how to get Asterisk to talk to it, but yeah - it's not looking impossible.

-Paul [1] I'm sure this is standard behaviour for everyone right?

--
http://paulseward.com
Reply to
LP

It was until quite recently - we couldn't have broadband when we initially moved in here because our line ran over DACS.

--
Today is Sweetmorn, the 25th day of Confusion in the YOLD 3179 
        RIP Iain M Banks, 16 February 1954 ? 9 June 2013
Reply to
Huge

Looks promising.

IIRC to drive it as a modem requires a proprietary DSP binary library to do the modem stuff, which I don't think is shipped with distros. If you get /dev/slusb0 then that's good going, however.

formatting link
That might be the reason for amd64 errors, if the DSP library is only built for i386.

slamr is for the AMR header on your motherboard. AMR is part of AC'97, so your motherboard chipset will probably have some audio channels for it even if they don't actually go anywhere. So you can start ALSA on it, but it's a red herring. Most of the notes out there are for AMR or PCI modems, which are completely different.

Does look like it might work. Be interesting to find out how they do the FXS port.

  1. Open mailing envelope
  2. Tear blister pack
  3. Throw away instructions
  4. Unscrew lid
  5. Look inside
  6. Plug into computer (without lid)
  7. Google
  8. Recover instructions from bin, find they're worthless, throw away again
  9. Make bird scarer from driver CD

Theo

Reply to
Theo Markettos

WB900, probably. It's mentioned in the wiki article you linked below.

Quite probably. The extra electronics is far far cheaper than upgrading the cable capacity that feeds the DPs. The most likely motive for upgrading capacity will be more to do with broadband provisioning and even here, fibre to the DP (or even FTTH) might provide the better solution.

--
Regards, J B Good
Reply to
Johny B Good

Unless, of course, the hardware is readily available for the Pi along with the appropriate drivers :-)

Reply to
David.WE.Roberts

In the USA, I think the FCC had a contest for methods of handling nusance calls because the "do not call" list is being ignored and the perpretrators are (or pretend to be) out of USA jurisdiction.

Anything less than bodily hard to the OWNERS of the systems is useless. The main culprit are the "predictive dialers": computers that call numbers in advance, wait for a reply, determine if the reply is a human or an answering maching/voice mail, and only THEN connect the call to sales-slime. The really rude ones play a pre-recorded message, in total violation of USA FCC phone regulations. But without enforcement, the rules are useless. So we're all on our own.

That's a totally logical solution but I'm reluctant to cut over so fast. Only 3 months ago, I finally converted from copper-pair POTS (plain phone service with dialtone) to Verizon FiOS (fiber optic) which is probably VoIP (or whatever the cable companies use).

Happily, I never invested in ISDN (it still does nothing) which was the digital telephony of the 80s. It was a great technology but the USA phone companies priced it too high for common adoption.

If it works, use it! At least it provides the DAA (phone line isolation) CLID (caller ID handling) and some had voice mail and FAX built in for total off-line operations.

Until superstorm Sandy (which flooded many phone exchanges and destroyed many cables), copper pair was really the most reliable phone service, so long as the CO (central office) was running and provided the battery power. It's hard to jam like wireless/cellphones (except for the occasional backhoe breaking a cable).

That sounds clever! I always wanted a voice mail system that was caller-id triggered, so I could deliver a message specific to the caller, and prioritize calls. Or pop up the related notes on a screen, so when a sales-person calls, I can see what they're calling about of if it's just another cold-call.

The only "retaliation" I can think of is playing a message starting with the SIT (tri-tone that starts error messages) and your own message such as "if you are a human, dial 5 now, otherwise PUT ME ON YOUR DO NOT CALL LIST and stop annoying me!" (and drop the call if '5' is not pressed withing a few seconds)

(and excalate to more vulgar messages if the caller continues)

Reply to
Jeff Jonas

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.