That means that after every 9, enter a comma. ![]() If you happen to be in my same situation (or if you just want to use an outside dial tone that sounds better than that stupid single 440 Hz outside dial tone that the SPA504G defaults to), go to Admin, Advanced, Regional, Call Progress Tones, Outside Dial Tone, and use this: that to actually get the phone to play an outside dial tone, you must configure your dial plan to support it. The low tone is 90 Hz higher than the 350 Hz low tone of the dial tone, and the high tone is 90 Hz higher than the low tone. With that, I was able to narrow down the possibilities, and came up with 440 + 530 Hz for Cisco’s outside dial tone. A dial tone is 350 + 440 Hz (90 Hz difference), a ringing tone is 440 + 480 Hz (40 Hz difference), and a busy signal is 480 + 620 Hz (90 + 50 Hz difference). This apparently makes it easier to determine what two tones are being sent in a DTMF sequence. Through some reading, I eventually figured out that “special tone frequencies” are always in multiples of 40, 50 and 90 Hz. Random fiddling came close, but it still sounded off. I could have probably figured it out if I had an oscilloscope, but I didn’t have access to one. I didn’t find anything online, and while many of the tones on the 7900s are sent to the phone by the call manager, the outside dial tone is hard-coded in the phone’s firmware. It’s customizable, so I started looking for what DTMF combination the 7900’s outside dial tone is. The SPA504G can be programmed to generate an outside dial tone, but it defaulted to a single 440 Hz tone, which just did not sound right. I always found the order to be backwards I figured the “inside” dial tone should be non-standard, and once you hit 9, you’d be presented with a standard North American dial tone. Here is a sample audio file of that process. When you press 9, however, that changes to a different dial tone, to signal that you are “outside” and can dial as if you were at a regular POTS phone. When you pick up the phone, you hear a standard North American dial tone (350 + 440 Hz). One of the features of the 7900 phones is a separate tone when reaching an outside line. In the last few weeks/months, I’ve been preparing to make this process as smooth as possible from a user perspective, since this is the most visible aspect to the employees. So now we’re replacing them with Cisco SPA504G phones, which use the industry standard SIP protocol. Everything mostly worked, but we lost the ability to do 3-way conferencing via the phones. Unfortunately, the SCCP driver is graciously described as “beta” (remember, it’s a proprietary protocol). We had been preparing for this possibility, and had an Asterisk system ready that was able to talk SCCP to the 7900 phones. Earlier this year, the call managers died. The 7900s used SCCP, a proprietary but decently understood protocol to talk with the call managers. In the Reno and Salt Lake City offices, we had a Cisco Unified Communications VoIP system going back to 2001, with Cisco 7900 series phones. The following code produces a sinusoidal sound, it is adapted from: Ĭonst double ChromaticRatio = 1.059463094359295264562 Ĭonst double Tao = 6.I’m currently in the process of upgrading our phone systems at work. SDL_Delay(1000) // wait while sound is playing If(want.format != have.format) SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "Failed to get the desired AudioSpec") If(SDL_OpenAudio(&want, &have) != 0) SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "Failed to open audio: %s", SDL_GetError()) erdata = &sample_nr // counter, keeping track of current sample number Want.callback = audio_callback // function SDL calls periodically to refill the buffer Want.format = AUDIO_S16SYS // sample type (here: signed short i.e. eq = SAMPLE_RATE // number of samples per second If(SDL_Init(SDL_INIT_AUDIO) != 0) SDL_Log("Failed to initialize SDL: %s", SDL_GetError()) ![]() Int length = bytes / 2 // 2 bytes per sample for AUDIO_S16SYSįor(int i = 0 i < length i++, sample_nr++)ĭouble time = (double)sample_nr / (double)SAMPLE_RATE īuffer = (Sint16)(AMPLITUDE * sin(2.0f * M_PI * 441.0f * time)) // render 441 HZ sine wave Void audio_callback(void *user_data, Uint8 *raw_buffer, int bytes) Void audio_callback(void *_beeper, Uint8 *_stream, int _length)Ī boiled-down variant of the beeper-example, reduced to the bare minimum (with error-handling). Void Beeper::generateSamples(Sint16 *stream, int length) SDL_OpenAudio(&desiredSpec, &obtainedSpec) you might want to look for errors here ![]() Void generateSamples(Sint16 *stream, int length) I modified a bit the code found here: #include The Introduction to SDL ( 2011 cached version: 2) has got a neat example of using SDL Sound library that should get you started: ĮDIT: Here is a working program that does what you asked for.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |