home *** CD-ROM | disk | FTP | other *** search
- Flashman #1 @1630
- Sat Jun 10 11:11:04 1995
- ┌────────────────────────────────────────────────────────────────────────────┐
- │ Mod Name : LSD-001A.424 Mod Author: Flashman 1@1630 WWIVNet │
- │ Difficulty : [▓▓▓░░░░░░░] (3/10) 1@9930 TerraNet │
- │ WWIV Version : 4.24 1@9918 IceNET │
- │ Mod Date : 6/7/95 ndpj16c@prodigy.com Internet │
- │ Files Affected: BBS.C, FCNS.H │
- │ Description : The ORIGINAL Ring Distinction mod for voice/data linesharing │
- │ (Revision "A" containing MANY more features than stock!) │
- └────────────────────────────────────────────────────────────────────────────┘
- NOTE: THIS MOD FORMAT HAS BEEN SHAMELESSLY STOLEN FROM JAFO!
- ══[ Extended Description ]════════════════════════════════════════════════════
- With this mod, sysops can now run a BBS *and* take voice calls on the same
- phone line. All you need to do is install this mod, and make sure that you
- have a distinctive ring service from your phone company. Don't worry though,
- these services normally only cost from $2-$3 a month and are MUCH cheaper than
- installing a new phone line.
-
- Services this mod should theoretically work with:
- ■ GTE's "Smart Ring" (Mod tested on, works at 100% efficiency)
- ■ AT&T's "IdentiCall"
- ■ Pacific Bell's "Priority Ringing"
- ...Or any other service which provides 2 phone numbers to 1 phone line, in
- which one of the numbers makes the phone 'double-ring' when calls come in,
- whereas the other number single rings. Here's an example. 2 phone numbers,
- but only 1 physical line.
- NUMBER PHONE RINGING SOUND
- -------------------------------------------------------
- 555-1234 Ring.... Ring.... Ring....
- 555-6789 Ring-Ring.... Ring-Ring.... Ring-Ring....
-
- Anyway, that's my explanation. If you have one of the above listed phone
- services or something like it, you may install this mod. If you DON'T, either
- GET the service and install this mod, or don't. If you still don't understand
- the PURPOSE of this mod, hit yourself on the head with a mallet and take a
- nap for a while.
-
- Revision A:
- ■ All voice calls are logged to the sysop log, giving the date, time, and
- number of rings on the voice call received.
- ■ If VOICE_RING is #defined, the computer will make an attractive ringing
- sound, just as a phone would, when a voice call is ringing through. This
- may be useful for sysops who turn the ringer off on their phone to avoid
- the bothersome ringing when someone calls the BBS.
- ■ Eye-catching flashing red on-screen message when voice call is received.
- ■ No more inconvenient pausing for a set 30 or 60 seconds when a voice call
- is received. Instead, the BBS will return to "waiting mode" as soon as the
- phone stops ringing.
-
- If you're upgrading, you must start over and complete the entire mod.
-
- ══[ Legend ]══════════════════════════════════════════════════════════════════
-
- = Existing line - Do not change
- + Add this line
- - Remove this line
-
- ══[ Disclaimer ]══════════════════════════════════════════════════════════════
-
- This mod has ONLY been tested with GTE's Smart Ring service. My assumption
- that it will work on any similar service is strictly theoretical.
-
- ══[ Step 1 ]══════════════════════════════════════════════════════════════════
-
- Make backups of the files affected by this mod as listed in the mod header.
-
- ══[ Step 2 ]══════════════════════════════════════════════════════════════════
-
- Load BBS.C. Find void getuser() and remove this chunk of code. You will need
- to replace it with a NEW chunk of code given in step 3.
-
-
- outs("* ");
- if (mode_switch(1.0,0)==mode_ring)
- answer_phone();
- else if (modem_mode == mode_con) {
- incom=outcom=1;
- if (!(modem_flag & flag_ec))
- wait1(45);
- else
- wait1(2);
- }
- }
- }
-
- ══[ Step 3 ]══════════════════════════════════════════════════════════════════
-
- You now need to make a decision. Do you want the BBS to pick up on the single
- ring, or on the double ring? If you want the BBS to answer the phone on the
- special double-ring, SKIP THIS STEP and go to step 4. However, if you'd like
- the BBS to answer on the regular, single ring, replace the code taken out of
- BBS.C in Step 2 with the following:
-
- outs("* ");
- if (mode_switch(1.0,0)==mode_ring) {
- if (mode_switch(2.0,0)==mode_ring) {
- voice_call();
- incom=outcom=1;
- if (!(modem_flag & flag_ec))
- wait1(45);
- else
- wait1(2);
- } else
- answer_phone();
- }
- }
- }
-
- ══[ Step 4 ]══════════════════════════════════════════════════════════════════
-
- Alternate method - ONLY DO THIS IF YOU SKIPPED STEP 3!!!
- To make the BBS pick-up on the double-ring instead, replace the code you took
- out of BBS.C in Step 2 with this:
-
- outs("* ");
- if (mode_switch(1.0,0)==mode_ring)
- if (mode_switch(2.0,0)==mode_ring)
- answer_phone();
- else {
- voice_call();
- if (!(modem_flag & flag_ec))
- wait1(45);
- else
- wait1(2);
- }
- }
- }
-
- ══[ Step 5 ]══════════════════════════════════════════════════════════════════
-
- Only do this step if you'd like your computer to make a ringing phone sound
- whenever a voice call is received. Go back up to the top of BBS.C, and add the
- line of code as shown:
-
- = #pragma hdrstop
- =
- = #define _DEFINE_GLOBALS_
- + #define VOICE_RING
- = #include "vars.h"
- = #include "subxtr.h"
- = #include <math.h>
-
- ══[ Step 6 ]══════════════════════════════════════════════════════════════════
-
- Add the two following voids at the bottom of BBS.C:
-
- #ifdef VOICE_RING
- void ring_sound(void)
- {
- int i;
- for (i=0; i<15; i++) {
- sound(750); delay(50);
- sound(600); delay(50);
- }
- nosound();
- }
- #endif
-
- void voice_call(void)
- {
- int r=0,i;
- char s[81],s1[12];
-
- outs("\x0c");
- i=curatr;
- curatr=8*16+12;
- outs("Voice call detected.");
- sprintf(s,"Voice call received at %s on %s, ",times(),date());
- nl();
- do {
- #ifdef VOICE_RING
- ring_sound();
- #endif
- if (mode_switch(1.0,0)==mode_ring)
- ;
- r++;
- } while (mode_switch(5.0,0)==mode_ring);
- sprintf(s1,"%d rings.",r);
- strcat(s,s1);
- sl1(0,s);
- curatr=i;
- }
-
- ══[ Step 7 ]══════════════════════════════════════════════════════════════════
-
- Type MAKE FCNS to add the new functions to FCNS.H. Now compile your source.
-
- ══[ Final Note ]══════════════════════════════════════════════════════════════
-
- If you use this mod, I'd like to know. E-mail me at one of these contact
- addresses and let me know how you like it. Or if you haven't tried it out yet,
- let me know how you like the idea. Feel free to send any additional questions
- or comments as well.
-
- Flashman 1@1630 WWIVNet
- 1@9930 TerraNet
- 1@9918 IceNET
- Internet address: ndpj16c@prodigy.com
-