Dec. 15th, 2005

anthonybaxter: (Default)
No idea on the original source of this - from someone at work with a similarly tasteless sense of humour. Behind a cut cos it's a bit large, and in quite poor taste.

don't say I didn't warn you )
anthonybaxter: (Default)
It's been said to me (more than once) that I'm can be a somewhat angry person. So this afternoon, I'd like to take you on a small journey into my world, let you grasp some of what made me what I am today.

Let's assume you're configuring a network device, and you hit something that looks something like the following in it's user interface:

Busy Tone: 1,30958,0,2212,0,0,3000,3000,0,0,0

You might think, as I did - "what the hell?" And then you read the documentation for what the hell that means, and you start swearing a whole pile more.

Here's a snip of the relevant docs:




Each tone is specified by 11 integers, as follows:

parametername:NumOfFreqs,Tfreq1,Tamp1,Tfreq2,Tamp2,NumOfOnOffPairs,
OnTime1,OffTime1,OnTime2,OffTime2,TotalToneTime


parametername is the name of the tone.

NumOfFreqs = 100 + the number of frequencies in the tone. (Therefore, NumOfFreqs = 101 for one frequency, and 102 for two frequencies.)

Tfreq1 and Tfreq2 are the transformed frequencies of the first and second frequencies, respectively. Their values are calculated with the following formula:

   32767 * cos (2*pi*F/8000)

where F is the desired frequency in Hz. Set this value to 0 if the frequency does not exist. The range of each value is –32768 to 32767. For negative values, use the 16-bit 2’s complement value. For example, enter –1 as 65535 or as
0xffff.

Tamp1 and Tamp2 are the transformed amplitudes of the first and second frequencies, respectively. Their values are calculated with the following formula:

    32767 * A * sin(2*pi*F/8000)

    A (amplitude factor) = 0.5 * 10^((k+10-(n-1)*3)/20)


where F is the desired frequency in Hz, k is the desired volume in dBm, and n is the number of frequencies. The ^ symbol means to the order of.






"Yes, sure Mum, VoIP devices are totally ready for the end-user market, and I'm completely sure you should have one" Or not.

This, by the way, is not the nastiest bit of the configuration "user interface". That award has to go to the "Dial Plan" option, which defaults (and I shit you not here) to:

*St4-|#St4-|911|1>#t8.r9t2-|0>#t811.rat4-|^1t4>#.-

The "Dial Plan", unlike the tones, is actually kinda important, and needs to be fixed.

[In case it's not clear why the docs above show such offensive stupidity in design: One thing computers do very easily is mathematical calculations. How much additional work would it have been to have the values entered in KHz and in dBm, and convert them? Answer: pretty much bugger all.]

Profile

anthonybaxter: (Default)
anthonybaxter

August 2009

S M T W T F S
      1
2345678
910 1112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 4th, 2025 04:12 am
Powered by Dreamwidth Studios