callerid variable

Marc SCHAEFER (schaefer@alphanet.ch)
Sun, 8 Nov 1998 12:05:11 +0100


Gert Doering <gert@greenie.muc.de> wrote:
> In vgetty's call_program, I'm not sure.  If it is exported at all, it 
> will be in $CALLER_ID.  I think Marc Schaefer has sent patches to Marc
> Eberhard for exporting the caller ID to voice scripts as well, but I'm
> not sure off my head whether they have already been integrated.

I don't know, really. I will tell you the next time I upgrade (I always
do a complete diff to the previous release to have an idea of
the changes).

Here was my change file. As a summary, I added support for
voice/modem-fax discrimination based on called number, support
for detecting correctly X.75 vs the others in a ZyXEL 2864,
support for stopping RINGING on a number not served,
and preliminary (not yet fully working) support for answering
only after a certain number of rings.

I use it since a few months with the ZyXEL multi-MSN firmware, running
fax, ISDN, modem and voice on the same 2864I, with one number for
voice, one number for modem/data and automatic X.75 detection on
any of the numbers. Any number which is not answered and is
answered by another device is correctly handled: ie if the
other device is BUSY, we BUSY, else they RING.

I wanted to do so that when my ISDN phone rings more than 5 times
the system goes to another voicemailbox. I also wanted to add
support in mvm for multiple voicemailboxes depending on called
number. The first needs additionnal changes in mgetty (not yet done),
and the last needs some mvm changes too.

- Ported fix from 1.1.16
     fixed problem with secondary address in MSN (only with my ISDN phone ...)
     see ring.c. Reported to mgetty-ml.

- New fix for support for X.75 connect in voice mode (CONNECT [speed]
  instead of CONNECT). We added support for wildmat pattern matching
  as suggested by marc@poseidon.thphy.uni-duesseldorf.de.
  This fix is activated only by defining MSC98_WILDMAT_ANALYZE in the
  main Makefile.
  DONE
     voice/libvoice/analyze.c
        - added function string_matches, plug in for strcmp
        - added call to string_matches
     voice/libvoice/wildmat.[c3] [ verbatim from tin 1.22p1 ]
     Makefile
        - -DMSC98_WILDMAT_ANALYZE
     voice/libvoice/ZyXEL_2864.c
        - added CONNECT* instead of CONNECT, in ZyXEL_2864_answer_phone()
          and in set_line(), but probably not needed.
     voice/libvoice/Makefile
       - added object wildmat.o to list of objects
     voice/vgetty/answer.c
       - inverted the voice_set_device() and the answer_phone().
     make.sh to compile/move, etc.
     - Looks working (X.75, and normal).
  DONE (in nf-3)
     Makefile
        - Added -DMSC98_EXTENDED_CND_SCRIPT, conditional for any
          new CND comportment.
        - Added -DMSC98_PASS_CID_CND_TO_VGETTY, conditional for passing
          this information to mvm
     mgetty.c
        - Modify CND calling such as
             0 means accept the call
             1 means refuse the call, but without busying
             2 means refuse the call, but with busying
             3 means temporarily refuse this call (we need more RINGs
               to decide)
             4 is the old mgetty comportment (let it ring).
          Implementation of 1 and 2 can be merged, and currently (with ZyXEL)
          will mean without busying except if no other called compatible
          device.
        - If -DMSC98_PASS_CID_CND_TO_VGETTY, we pass CND and CID to
          vgetty (for the voice script mvm for example) as environment
          variable: CALLER_ID and CALLED_ID
     mgetty.h
        - Added definitions for the CND return codes.
     voice/libvoice/analyze.c
        - Modified so that only patterns starting with a \ are
          handled by wildmat. \ is removed in any case. This
          is because some ZyXEL voice commands use [. Maybe we
          should instead change ``expect_echo'' to add the needed
          \ before those [ ... This is for subargument (after | or before)
     voice/libvoice/ZyXEL_2864.c
        - changed so that "CONNECT*" is now "\\CONNECT*"
  TODO
     - Modify so that 3 works (cnd.c, cnd script). Currently we do not
       pass the number of rings to script and we call it not at every
       ring but infinity, thus do not use 3 for now.