Second one: Direct modifications
Directly modifying the phone/DECT base station has various advantages. IMHO, the most important is the nearly 100% removal of those annoying echoes from the voice stream. As the DECT phone I used had separate analogue channels on the DECT controller for input and output, the echo problem shrank to the level of acoustic cross talk from the speaker to the microphone in the headset, which is, with the proper settings hardly audible even without using any further digital echo cancellation techniques.
Coupling at the right locations
First of all: Coupling the phone to the sound card should be done only using capacitors, not directly as it is shown on the GRYNX
pages. Ignoring this advice may very well damage your PC, sound card and/or phone.
I won’t go into much detail here, but this worked well: Disconnect the phone from the line, power it only with the wall brick (For ringing the phone, you need one that is self-powered with a wall brick). Ring voltages may be dangerous (see also the other pages). Never fiddle with the official phone line, that’s both dangerous and maybe even illegal. Do the following only if you’re 100% sure if you know what you’re doing.
Pick up the phone and listen for any, even very quiet changes in what you hear. With your finger roam around the phone’s PCB, especially around the bigger ICs (in the case of DECT, except the RF parts, that is close to the antenna) and touch the legs of the ICs with your finger. If there is a slight buzz, you have found the right location and you can reduce it to one single pin. There may be multiple such locations. Take the output of your sound card, insert a small capacitor (or two small ones in for each wire to be 100% sure) play music on your PC and try to get it playing on your phone. The sound should be clear and undisturbed, though phone-like (that is, audio frequencies above 3-4kHz are capped).
For the signal path phone -> sound card, take the sound card’s input, add small capacitors, set your mixer setting in a way such that you hear the usual buzz if you touch the input and roam around on the phone again (this time with the other pin of the capacitor of course). You should be able to locate the audio output of your phone like above.
This is a bit harder as it requires to insert a not-so-small voltage into your phone. If you have an oscilloscope, the situation is much easier here. If not, invent your own procedure
Hang the phone up. Generate a 50Hz signal and feed it into the usual phone jack. Add a DC offset wit the same value as the peak to peak voltage of your ring AC (Works for me, maybe you should be able to slowly adjust and increase both the AC and the DC parts in your ring setup…).
This, of course,
does not mean that you should connect your phone to mains voltage!
Start with 0V. Increase the amplitude up to about 40V. At some voltage level, the phone should ring. If it does not, then it may be the case that your phone requires a different ring frequency or even waveform. Although phones are seemingly specified (see section “Signalling/ringing signals”) to run with a rather broad range of ring voltages and frequencies, the phone I used was very picky and needed exactly 50Hz to ring.
I found this out after playing with the nice sound tool audacity under Linux for quite some time. The asterisk driver modification (see below) so far is only set to 50Hz ring frequencies (and square waves seem to be best), if you need a different one, ask me or simply send a patch-patch
Assumed that the phone rings at 50Hz, the hard part begins, the search for the low-level input into the DECT phone for the ring voltage. If you have the oscilloscope, search for (smaller) AC signals on the phones PCB as the phone rings. The ring AC detection circuit probably resides in an IC. If you think you found the right location, insert a small 50Hz AC level there (capacitor - and diodes, see below). Some day, you’ll get the phone to ring!
)
It should be noted, however, that the ring tone detection circuit may have an digital input - so you should properly cap the voltages using diodes to prevent damage to the chip.
You can get a 50Hz square-wave-full-amplitude-on-right-channel-only signal here.
Changes to the Asterisk OSS driver
Asterisk is an ‘open source full featured PBX’ (private branch exchange). I.e. something that you can program so that it happily switches hundreds of calls for you, handles SIP/other VoIP and ordinary lines and everything in parallel. To continue, you should know what Asterisk is and how to setup/configure it. If you’re searching for a ’sip softphone’ here, you’re right in the sense that asterisk can do the same things (and much more), but without a clumsy GUI.
Several changes to the driver were necessary. I tried to make them general enough so that the modifications should work for more people. You can get the patch to the driver here. A precompiled shared object that you should be able to put into /usr/lib/asterisk/modules can be found here: chan_oss.so. This should at least work in Debian/Testing. If it works, it should be sufficient to put this into the mentioned directory, fire up asterisk and do a “load chan_oss.so”. I’m working on renaming the methods etc. so that this can be used in parallel with the OSS driver (Which should provide a nice testing facility in this case).
Important: For proper DTMF detection, set
OPTIONS += -DRADIO_RELAX
in the Makefile. It is already there but commented out!
Help us continue our work with a donation
41 queries. 1.193 seconds
January 27th, 2006 at 14:12
This is a great guide/text. Great for learning, everything covered and explained, thank you very much.
January 30th, 2006 at 23:01
just a question, as I am not as framiliar with asterisk as you obviously are (and the documentation frankly is not upto open-source standards). But It seems it would be easier to use a voice modem with the addition of a ringer circuit (and less likely to have echo issues). As I understand this is what the x100p basically is. From what I understand an FXS is just an FXO that can make a phone ring? seems a simple addition, and there are lots of circuits available online. I do not know if you can force asterisk to route incoming voip calls to a modified FXO. Is it feasable to have astrisk actiate a parrallel port pin when the phone is supposed to ring. If this is far more difficult than what you have done. I just assumed the modem would be better matched to the phone lines than anything I build.
March 27th, 2008 at 14:57
many thx for all the efforts. I want to feed pc spkr output to pstn-analog mic input and similarly couple pc mic input with pstn spkr output. the purpose is to forward voip conversation to another pstn subscriber using pstn network.
can anybody provide similarly simple plan.