> Need "Ultimate black box"; would someone please _Direct record_ those
> 3 magic tones that preceded the recording "the number you dialed is
> disconnected.." onto a microcassette for me?
Why do you need it?
> Ideally, i would prefer the 3 tones, about 2-3 seconds of silence and
> a repeat of the tones and end of recording.
> But i think that having the 3 tones with the silence would be sufficient.
I don't know if this is the same as the old German message:
http://www.progforum.com/showthread.php?t=7726
Audacity shows something like soft triangles, with 1017 Hz, 1492 Hz and
1926 Hz, each tone 0.3 seconds. I guess the original signal are sharp
triangles and then lowpass filtered because of the telephone line.
The program below creates the tones as a WAV file. The output:
http://www.frank-buss.de/tmp/tones.wav
Background information about the lowpass filter:
http://www.frank-buss.de/filter/index.html
The C program:
#include <stdio.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.14159265f
#endif
float sampleRate = 44100.0f;
int sampleCount;
float* samples;
FILE* wave;
void write16(unsigned int v)
{
fputc(v & 0xff, wave);
fputc((v >> 8) & 0xff, wave);
}
void write32(unsigned int v)
{
write16(v);
write16(v >> 16);
}
void writeWave()
{
int i;
float maxSample, minSample;
wave = fopen("tones.wav", "wb");
if (!wave) {
printf("can't write test.wav\n");
return;
}
write32(0x46464952);
write32(2 * sampleCount + 36);
write32(0x45564157);
write32(0x20746d66);
write32(16);
write16(1);
write16(1);
write32((int) sampleRate);
write32(2 * ((int) sampleRate));
write16(2);
write16(16);
write32(0x61746164);
write32(2 * sampleCount);
maxSample = 0;
minSample = 0;
for (i = 0; i < sampleCount; i++) {
if (samples[i] < minSample) minSample = samples[i];
if (samples[i] > maxSample) maxSample = samples[i];
}
maxSample = fmaxf(-minSample, maxSample) * 1.1f;
if (maxSample == 0) maxSample = 1.0f;
for (i = 0; i < sampleCount; i++) {
write16(samples[i] / maxSample * 32767.0f);
}
fclose(wave);
}
float trif(float alpha)
{
alpha = fmod(alpha, 2.0f * M_PI) * 2.0f;
if (alpha < M_PI) return alpha / M_PI;
if (alpha < 2.0f * M_PI) return 1.0f - (alpha - M_PI) / M_PI;
if (alpha < 3.0f * M_PI) return -(alpha - 2.0f * M_PI) / M_PI;
return (alpha - 3.0f * M_PI) / M_PI - 1.0f;
}
void addTone(int start, int count, float frequency)
{
int i;
float waveLength = sampleRate / frequency;
for (i = 0; i < count; i++) {
float alpha = ((float) i) * 2.0f * M_PI / waveLength;
// float sample = sinf(alpha);
float sample = trif(alpha);
samples[i + start] = sample;
}
}
void addTones(int start, int toneSampleCount)
{
addTone(start, toneSampleCount, 1017.0f);
addTone(start + toneSampleCount, toneSampleCount, 1492.0f);
addTone(start + 2 * toneSampleCount, toneSampleCount, 1926.0f);
}
void createSamples()
{
int i;
float toneLength = 0.3f;
float startEndSilence = 0.1f;
float middleSilence = 2.0f;
int toneSampleCount = sampleRate * toneLength;
int startEndSilenceSampleCount = sampleRate * startEndSilence;
int middleSilenceSampleCount = sampleRate * middleSilence;
sampleCount = 3 * toneSampleCount +
2 * startEndSilenceSampleCount + middleSilenceSampleCount;
samples = (float*) malloc(sampleCount * sizeof(float));
for (i = 0; i < sampleCount; i++) samples[i] = 0.0f;
addTones(startEndSilenceSampleCount, toneSampleCount);
addTones(startEndSilenceSampleCount +
middleSilenceSampleCount, toneSampleCount);
}
void lowpassFilter(float cutoffFrequency)
{
int i;
float a = (2.0f * cutoffFrequency * M_PI) /
(2.0f * cutoffFrequency * M_PI + sampleRate);
float filtered = 0.0f;
for (i = 0; i < sampleCount; i++) {
filtered = filtered + a * (samples[i] - filtered);
samples[i] = filtered;
}
}
int main(int argc, char** argv)
{
createSamples();
lowpassFilter(3000.0f);
writeWave();
return 0;
}
--
Frank Buss, f...@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Beethoven's ninth?
LOL
I listened to a podcast the other day about why (music) CD's are 74
minutes long.
Apparently, two reasons:
a) Beethoven's ninth would fit in 74 minutes, for the slowest tempo
live performances, and
b) Sony was way behind factory-readiness to press 10cm disk. (I think
they were going with 11cm?)
The compromise was for both to switch to 12cm, which put them back on
an equal footing.
Could be BS misinformation though. Sounds at least plausible.
Now, some CD's are 80 minutes of course.
What was also interesting is that they have longer formats available
from the start, but went with 74 minutes so as not to further delay
the consumer introduction of CD technology.
-mpm
See if you can find what you want here:
http://www.payphone-directory.org/sounds.html
Cheers,
John
Forget the tones.
The best way to circumvent BS sales / telemarketer calls is to answer
the phone electronically have ask the user to press a button (like the
#2). Robo-dialers won't know to do this, so you can dispense with the
call.
There used to be some online services for this, as well as a few black
boxes out there.
A friend of mine even has his voice mail set up like this.
Of couse, he's using a Glenayre paging terminal to do it...
Good luck.
I know unwanted calls can be frustrating as hell.
And if they originate overseas (as many do), the DNC registry has no
teeth.
No, you misunderstand. (I think?)
YOUR phone doesn't actually ring until the caller complies with the
instructions.
Your phone is answered silently, (to you) and the caller must then
comply (i.e., press whatever buttons, etc...) before you send the ring
off to your equipment. This requires you to generate your own ring,
but that's not too complex an undertaking.
I have a question: Why have a phone line at all if you're going to
play that message?
Wouldn't it be best to just take the phone line out?, or disable all
inbound calls?
Isn't the best way to simply read the CID, kill ringing for numbers
beginning "8xx"? Likewise kill on "out of area", "anonymous", and
"unavailable".
As in... http://jfteck.com/Q_A.htm
...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
>On Tue, 24 Nov 2009 00:08:54 -0800, Robert Baer
><rober...@localnet.com> wrote:
>
[snip]
>>> And if they originate overseas (as many do), the DNC registry has no
>>> teeth.
>> That cannot possibly work, because the moment one picks up the line,
>>the bastards hang up.
>> I am going to use "callingarea.wav" from
>>http://www.payphone-directory.org/sounds.html
>>because it starts with the tones, does not say to re-try called number,
>>and seems to be the best "you are flaked out" message.
>
>Isn't the best way to simply read the CID, kill ringing for numbers
>beginning "8xx"? Likewise kill on "out of area", "anonymous", and
>"unavailable".
>
>As in... http://jfteck.com/Q_A.htm
>
> ...Jim Thompson
Would anyone know how short a ring will still allow phones to reset to
receive CID?
Not sure I understand what you mean by reset.
I thought CID was delivered between the 1st and 2nd rings, at 1200
buad using inband singalling. (?)
If so, then the minimum "reset" time depends on the ring times, and
how fast the Telco can re-dial the line.
The latter probably depends on what kind of switch is serving.
I had a unit like this before I just canceled my land line altogether.
The unit is a caller ID box with the box plugged into the wall jack
(line) and my phone plugged into the box.
The box would disconnect the (on-hook) phone from the line with a
Normally Open relay.
When a call would come in, the box would see the ring, but the phone
would not.
The caller ID would be displayed on the LCD display, the relay would
close and the second ring would be on the phone.
The box had a slight voltage on the phone, so when you pickup the phone
(off-hood) the relay would connect you to the line.
This is late 80s technology.
don
Easy, with a CNID filter your phone would never ring except for
authorized numbers. This is close to what you wanted isn't it?
Just the same, i agree, super jam some of the phone spammers and they
go away.
>
> Just the same, i agree, super jam some of the phone spammers and they
> go away.
If all was perfect, the calls would NEVER be made (after the first
time, at worst).