home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / ur458017.dsk / R2T1REL.TXT < prev    next >
Text File  |  1995-07-26  |  65KB  |  1,283 lines

  1.         Release Note & Implementation Guide for R2T1 V4.4
  2.  
  3.                 24-03-95 Aculab Ltd
  4.         
  5.         
  6.         1 Introduction and Scope
  7.          
  8.         This  release note considers the use of the Aculab  ISDN/E1  card 
  9.         with the Generic MFC R2 Signalling System 'R2T1', and the  impli-
  10.         cations  for the applications programmer.  This document is  only 
  11.         intended  to be a guide to implementation and is not intended  to 
  12.         be  an  exhaustive description of the API; see  the  Generic  API 
  13.         Specification  documents  for full details.  It should  be  noted 
  14.         that  many of the features illustrated here were only  introduced 
  15.         along  with the Release 3 of Aculab device drivers, and  are  not 
  16.         available with any previous release, and indeed the R2T1  signal-
  17.         ling  protocol  is not supported by any device  driver  prior  to 
  18.         Release 3.
  19.         
  20.         Information for this implementation of R2 was taken from both the 
  21.         CCITT  Blue  Book, a collection of Ericsson  specification  docu-
  22.         ments, and a multitude of National signalling specifications.
  23.         
  24.         For  the purposes of illustration, this document uses the  EV_xxx 
  25.         (event)  scheme provided by the E1 card API to  describe  various 
  26.         telephony issues, but the state based (CS_xxx) approach is equal-
  27.         ly valid.
  28.         
  29.         
  30.         2 New Functionality in Version 4
  31.         
  32.         Version 4 introduces full control of group-B signals on  incoming 
  33.         calls, both for call rejection and call acceptance.  In addition, 
  34.         it  allows recovery of the returned group-B meanings on  outgoing 
  35.         calls.   These  features  are supported in a  standard  (and  re-
  36.         configurable manner) under the API, and are described in a  later 
  37.         section.
  38.         
  39.         
  40.         3 Basic Functionality
  41.         
  42.         Outgoing 
  43.         Call Setup, with Destination Address via MFC, DTMF or decadic
  44.         Overlap Sending (both en-bloc and overlap from the API)
  45.         Recovery of group B meaning for answer and reject
  46.         Provision of CLI (Optional)
  47.         Return of received Charging Pulses (Optional)
  48.         Call Release 
  49.         Remote Disconnect on Release (Optional)
  50.         
  51.         Incoming 
  52.         Call Accept, with DDI digits via MFC, DTMF or decadic
  53.         Request of CLI (Optional)
  54.         Internal Generation of alternate Ring Tone cadences (Opt)
  55.         External Generation of Ring Tone and call progress tones (Opt)
  56.         Generation of group B meaning for answer and reject
  57.         Generation of Charging Pulses (Optional)
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.         Call Release
  65.         
  66.         General
  67.         Auto Back-Busy on 'not open for incoming' (Optional)
  68.         
  69.         Note  that this signalling system is balanced, meaning  that  the 
  70.         same  protocol may be used at both ends of a link,  for  both-way 
  71.         working (although of course, only one end should be sourcing  the 
  72.         clock for the link).
  73.         
  74.         
  75.         4 A Common Issue with Tone-Based Signalling
  76.         
  77.         There  is  one particular issue with MFC R2 that is  worth  high-
  78.         lighting, insofar as the tone element of the signalling  proceeds 
  79.         within the B-channel, and for this reason, the DSP in the E1 card 
  80.         must  remain connected to the line until the tone signalling  has 
  81.         completed.   
  82.         
  83.         It  is a common error to attempt to switch the B-channel  through 
  84.         to  a speech processing resource too early, thus cutting off  the 
  85.         final part of the MFC signalling, causing mis-operation.  
  86.         
  87.         In  particular, just issuing the API call call_accept() does  not 
  88.         mean the compelled signalling has finished, the application  must 
  89.         wait  until  EV_CALL_CONNECTED (or  CS_CALL_CONNECTED)  or  issue 
  90.         call_incoming_ringing()  then  wait  on  EV_WAIT_FOR_ACCEPT   (or 
  91.         CS_WAIT_FOR_ACCEPT)  before it is safe to switch  the  B-channels 
  92.         away from the DSP.  
  93.         
  94.         
  95.         5 Dialled Destination Digits
  96.         
  97.         In  international  R2, the first dialled digit(s)  may  represent 
  98.         language  digits or discriminating digits, and these may be  pre-
  99.         pended to the actual destination address.  However, some of these 
  100.         signals  may  require values greater than 1..9 or 10  (the  digit 
  101.         '0'),  so, if it is required to send the group I signals  11..15, 
  102.         the  hexadecimal  characters B..F will  produce  the  appropriate 
  103.         forward  tones (for the dialled destination digits only, not  for 
  104.         the CLI).
  105.         
  106.         On receipt, these same hexadecimal values may appear at the front 
  107.         of the incoming destination address (DDI) number.
  108.         
  109.         The signal I-15 (which would produce an 'F') is sometimes used as 
  110.         an 'End of Pulsing' signal, to terminate the destination  address 
  111.         (B party number).  On incoming calls this may recognised as  such 
  112.         by  the use of the appropriate configuration switch (see  below), 
  113.         in  which  case it will not appear in  the  incoming  destination 
  114.         address.   
  115.         
  116.         Outgoing destination addresses do not automatically produce  I-15 
  117.         as a termination signal, as this would interfere with the  provi-
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.         sions  for  overlap sending, however, an 'F' can be sent  as  the 
  125.         last dialled digit to achieve the same effect.
  126.         
  127.         
  128.         6 CLI (Calling Line Identity)
  129.         
  130.         The  implementation  allows  the request of  CLI  information  if 
  131.         available, but note that it may or may not be available on  ordi-
  132.         nary lines.  
  133.         
  134.         On  outgoing  calls, request of CLI by the called party  with  no 
  135.         digits supplied via the API will result in generation of an  I-12 
  136.         (request not accepted), although there is a configuration  switch 
  137.         to cause an immediate I-15 (end of CLI) to be sent instead.  
  138.         
  139.         If  CLI digits are available, the CLI will normally  be  preceded 
  140.         with a subscriber category of II-1 (or optionally other group  II 
  141.         signals  via a configuration switch) and terminated with  a  I-15 
  142.         (end  of CLI).  It is  possible, via a configuration  switch,  to 
  143.         prevent  the automatic transmission of the group II  signal  from 
  144.         within  the firmware, in which case the first CLI digit  provided 
  145.         via  the API will be interpreted as the calling  party  category, 
  146.         allowing full application program control of this signal.
  147.         
  148.         On  incoming calls, if CLI is requested of the calling  end,  and 
  149.         none is available, the implementation will deal with either a no-
  150.         tone  response  by subsequently providing a pulsed  tone  as  re-
  151.         quired,  or will accept either an I-12, as a 'request not  accep-
  152.         ted', or I-15 as immediate 'end of CLI'.  Accordingly, in connec-
  153.         tion  with CLI, the application should perhaps wait a  reasonable 
  154.         time  for CLI digits to arrive, and if none arrive, the  applica-
  155.         tion should proceed without them.  Also, if no CLI seems ever  to 
  156.         be available, it is probably better not to request it at all,  in 
  157.         which  case no related signalling is produced, and  the  protocol 
  158.         will proceed in a rather more efficient manner.
  159.         
  160.         After request of CLI, care should be taken to ensure that neither 
  161.         call_incoming_ringing or call_accept is called by the application  
  162.         until  sufficient time for all of the CLI digits and  the  subse-
  163.         quent  'end of CLI' signal to arrive, as pre-empting  these  with 
  164.         answer will often be regarded as illegal by the central office.
  165.         
  166.         A  configuration switch is available to prevent these  API  calls 
  167.         from  pre-empting  'end of CLI' and having this  effect,  but  be 
  168.         aware that this will result in a protocol 'lock-up' if the proto-
  169.         col does not use such an 'end of CLI' signal.
  170.         
  171.         Note  also  that the first digit of the received CLI is  often  a 
  172.         caller category digit (often a '1') and is not a part of the  CLI 
  173.         itself.   This  character can be automatically  stripped  off  as 
  174.         required by setting one of the configuration switches.
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.         
  182.         7 CLI and DDI digit count
  183.         
  184.         For Aculab's generic R2 device drivers, it is usually useful (and 
  185.         in  the case of the Belgian R2, vital) for the device driver  and 
  186.         signalling  system  firmware to know the number of  DDI  and  CLI 
  187.         digits  supported by the trunk.  There are two driver  configura-
  188.         tion  switches available for this purpose, being -cDn  and  -cCn, 
  189.         where  for  DDI and CLI respectively, where n is  the  number  of 
  190.         digits required.  
  191.         
  192.         However, with R2T1 it is NOT absolutely necessary for the  driver 
  193.         to know the exact number of digits, particularly for CLI.  If the 
  194.         numbers  of  digits IS known, the signalling code  will  use  the 
  195.         fastest  possible compelled signalling to obtain the digits.   If 
  196.         it  is  not known, or is variable, then as long  as  the  numbers 
  197.         given  to the driver is LARGER than the maximum number of  actual 
  198.         digits,  then  the signalling system will  accept  all  available 
  199.         digits, at the cost of around a 250mS pulsed tone delay (although 
  200.         if I-15 is used as 'end of CLI', the pulse tone delay will not be 
  201.         incurred).
  202.         
  203.         If  I-15 is provided 'end of CLI', it is in fact  undesirable  to 
  204.         indicate the number of CLI digits as this can result in the  'end 
  205.         of  CLI'  signal appearing in the DDI field, so omission  of  the 
  206.         -cCnn  value  will leave the protocol to default it  to  a  large 
  207.         value.   If I-15 is not provided (and this is rare), then use  of 
  208.         -cCnn may be necessary.
  209.         
  210.         It  sometimes seems necessary however to use the -cDnn switch  to 
  211.         establish  a fixed number of DDI digits, particularly if  CLI  is 
  212.         also  being  requested, as some Central Office switches  seem  to 
  213.         regard  a pulsed 'CLI request' signal (necessary when  the  exact 
  214.         number of DDI digits is unknown) as illegal.  In this case it may 
  215.         be  possible to use the configuration switch  that  automatically 
  216.         requests  the  CLI  in the middle of receiving  the  DDI  digits, 
  217.         (although  this may not be possible on all switches).   This  has 
  218.         the desirable side-effect of allowing variable length DDIs.
  219.         
  220.         
  221.         8 Release of Incoming Calls before Answer
  222.         
  223.         It  should be noted that under almost all of the R2 line  signal-
  224.         ling  specifications encountered, incoming calls cannot  normally 
  225.         be  rejected  or cleared via line signalling before  answer,  and 
  226.         this is the default provision of the implementation.  However, it 
  227.         is believed that some exchanges might allow this and consider  it 
  228.         to  be  legal line signalling, so this has been introduced  as  a 
  229.         driver  option, as below.  Typically, if this is not regarded  as 
  230.         legal  line  signalling, the exchange may well take  the  channel 
  231.         temporarily  out  of  service, and if this  occurs,  this  option 
  232.         should not be used.
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.         
  240.         Early release of incoming calls via line signalling is controlled 
  241.         by configuration switch -s0.
  242.         
  243.         See  the section below on control of group-B signal  control  for 
  244.         further information.
  245.         
  246.         
  247.         9 Control of Group-B Signals (Incoming Calls)
  248.         
  249.         The  Group B signal is a signal sent from the  incoming  (called) 
  250.         end  back to the outgoing (calling) end at the completion of  the 
  251.         compelled  signalling  sequence,  to indicate the  state  of  the 
  252.         called  extension  (number).   It can indicate  that  the  called 
  253.         number  is not available because for a variety of reasons  (Busy, 
  254.         out of order, unobtainable etc) and as such will not be answered, 
  255.         and it can also indicate that the called number is available, and 
  256.         that  (if answered) it will be answered with or without  charging 
  257.         (or certain other conditions).
  258.         
  259.         For  incoming calls, if the incoming call is rejected at the  API 
  260.         by  the use of a default clearing cause or a specific cause,  via 
  261.         call_disconnect() or call_release(), the clearing cause  provided 
  262.         to  the API will now be mapped to a specific group-B signal  (see 
  263.         the table at the end of this document) which will immediately  be 
  264.         sent  to  the outgoing end.  The incoming end will then  enter  a 
  265.         state  where  the call may not subsequently be answered,  but  is 
  266.         awaiting forward clearing from the outgoing end (which should  be 
  267.         forthcoming).  Note that call_disconnect() or call_release() MUST 
  268.         be  used  prior to (and without using)  call_incoming  ringing(), 
  269.         otherwise  a default acceptance code will be sent, and no  rejec-
  270.         tion or clearing will be possible until after answer.
  271.         
  272.         If  an incoming call appears without a call_openin() having  been 
  273.         made (ie. not 'open for incoming'), a default group B signal will 
  274.         be  returned to the outgoing end indicating that the  channel  is 
  275.         busy.
  276.         
  277.         For  incoming calls, if the application wishes to use  an  accep-
  278.         tance  code other than the default (line free, normal  charging), 
  279.         it is able to send one of five answer codes to the API via a  new 
  280.         API  function  call_answercode() (which must be called  PRIOR  to 
  281.         call_accept() or call_incoming_ringing()), which will subsequent-
  282.         ly be mapped to a group B signal sent as a result of  call_incom-
  283.         ing_ringing() or call_accept().  
  284.         
  285.         Call_answercode()   takes   a  cause   parameter   identical   to 
  286.         call_disconnect(),  but  with new enumerated  values.   Three  of 
  287.         these  are  standardised, and there are two spares which  may  be 
  288.         mapped to any additional group B signals which might be implemen-
  289.         ted under specific R2 variants.  Standard cause values which  are 
  290.         not  available  under a specific variant will be  mapped  to  the 
  291.         default  cause.  If call_answercode() is not called, the  default 
  292.         group  B  signal of B-6, or that supplied via -s8  will  be  used 
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.         instead.
  300.         
  301.         The standard causes are:-
  302.         
  303.              AC_CHARGE           line free (charging) (default)
  304.              AC_NO_CHARGE        line free (no charging)
  305.              AC_LAST_RELEASE     called party or last party release
  306.                                  (used for malicious call tracing)
  307.              AC_SPARE1           alternate possible code
  308.              AC_SPARE2           alternate possible code
  309.         
  310.         To summarise, on incoming calls, the group B signal is only  sent 
  311.         as a result of either:-
  312.         
  313.              i)   call_disconnect() or call_release()
  314.              ii)  call_accept() or call_incoming_ringing()
  315.              iii) incoming call without a call_openin()
  316.         
  317.         IMPORTANT  These group B signals will only be sent if switch  -s1 
  318.         is used.
  319.         
  320.         
  321.         10 Control of Group-B Signals (Outgoing Calls)
  322.         
  323.         For  outgoing  calls,  if the call is rejected  at  the  incoming 
  324.         (called) end, the card will receive a group B signal, which  will 
  325.         be  mapped to standard API clearing causes (see the table at  the 
  326.         end  of this document) which may be recovered by the use  of  the 
  327.         call_getcause() API function.
  328.         
  329.         If the call is accepted at the incoming (called) end, the group B 
  330.         signal  received  by  the card is mapped to  a  standardised  API 
  331.         acceptance  cause (a new API feature introduced specifically  for 
  332.         MFC  R2  support), which can also be recovered by  the  call_get-
  333.         cause() function (not previously available under the API).
  334.         
  335.         
  336.         11 Mapping of Group-B to API Causes
  337.         
  338.         In  every  case (the default case, and in the  case  of  specific 
  339.         national  implementations  controlled by the -s12  switch)  there 
  340.         will be default mappings between group B signals and incoming and 
  341.         outgoing  acceptance  and rejection causes.  In every  case,  the 
  342.         supplied default or national mapping may be overridden by supply-
  343.         ing certain -s switches, as follows:-
  344.         
  345.         Switches -s60 to -s74 override the mapping, on outgoing calls, of 
  346.         incoming group B signals to answer (AC_) and release (LC_) codes.  
  347.         
  348.         Switches   -s75  to  -s79,  on  incoming  calls,   map   supplied 
  349.         accept_codes  (AC_) to group B signals sent to indicate that  the 
  350.         called number is free, and might be answered.
  351.         
  352.         Switches  -s80 to -s95, on incoming calls, map supplied  clearing 
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.         causes (LC_) to group B signals that indicate that the call  will 
  360.         never be answered, and should be released by the outgoing end.
  361.         
  362.         It  should be noted that, as there is not an exact 1:1  relation-
  363.         ship between API causes and group B signals, some loss of meaning 
  364.         in  the mappings will result.  In particular, two cards  back-to-
  365.         back will map an LC_ code to group B signal, then back to an  LC_ 
  366.         code:- eg. in the default mapping, LC_NUMBER_CHANGED will map  to 
  367.         signal B-5 (unobtainable) which will map back to  LC_NUMBER_UNOB-
  368.         TAINABLE.  Thus the exact meaning has been lost, but the  general 
  369.         sense of the cause has been retained.
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.         
  377.         12 API Handling of Incoming Calls With R2T1
  378.         
  379.         This  diagram shows the typical dialogue between application  and 
  380.         device driver when waiting for an incoming call. 
  381.         
  382.         
  383.                    Application            |      Library/Device Driver
  384.             /-------------------------\   |   /-------------------------\
  385.          -->| call_openin (indetails) | ----->| Initiate Incoming Call  |
  386.         |   \-------------------------/   |   | Return handle           |
  387.         |   /-------------------------\<------|                         |
  388.         |   |                         |       \-------------------------/
  389.         |   | call_event ( state )    |       /-------------------------\
  390.         |   |                         | ----->| Wait for event to occur |
  391.         |   \-------------------------/       | Return handle and state |
  392.         |     ^                               \-------------------------/
  393.         |     |      /------------------------------\      |
  394.         |     |______|     EV_WAIT_FOR_INCOMING     |______|
  395.         |     |      \------------------------------/      |
  396.         |     |      /------------------------------\      |
  397.         |     |      |  EV_INCOMING_CALL_DET        |      |
  398.         |     |      |  EV_DETAILS                  |      |
  399.         |     |      |                              |      |
  400.         |     |      |  call_details(details)       |      |
  401.         |     |      |  if ( enough ddi digits )    |      |
  402.         |     |------|     if ( ddi_OK & NO_CLI )   |------|
  403.         |     |      |         call_incoming_ringing|      |
  404.         |     |      |         call_accept          |      |
  405.         |     |      |     else if ( ddi_OK & CLI)  |      |
  406.         |     |      |         call_get_orig_addr   |      |
  407.         |     |      |         call_answercode      |      |
  408.         |     |      |         call_incoming_ringing|      |
  409.         |     |      |         call_accept          |      |
  410.         |     |      |     else                     |      |
  411.         |     |      |         call_disconnect      |      |
  412.         |     |      \------------------------------/      |
  413.         |     |      /------------------------------\      |
  414.         |     |      |      EV_CALL_CONNECTED       |      |
  415.         |     |______|        application           |______|
  416.         |            \------------------------------/      |
  417.         |            /------------------------------\      |
  418.         |            |      EV_IDLE                 |      |
  419.         |____________|       call_release(cause)    |______|
  420.                      \------------------------------/
  421.         
  422.         The  application  issues  a call_openin function  to  the  device 
  423.         driver.  The  driver  initiates the wait for  incoming  call  and 
  424.         returns  control  to the application with the call  handle.   The 
  425.         application  is  now  free to issue new commands  to  the  device 
  426.         driver. 
  427.         
  428.         To  ascertain the progress of a call the application may use  the 
  429.         call_event function.  The device driver will return the state  of 
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.         the call and a call handle on which the event occurred. 
  437.         
  438.         The  arrival  of  an  incoming call is  signalled  by  the  event 
  439.         EV_INCOMING_CALL_DET,  whereupon  the  application  may  use  the 
  440.         call_details  function to obtain information about  the  incoming 
  441.         call,  in particular any DDI information in the  destination_addr 
  442.         field of the details_parms.  
  443.         
  444.         Unlike  ISDN signalling systems, the DDI information  will  never 
  445.         arrive en-bloc (all at one time) but will always arrive as  over-
  446.         lap  receiving  (one digit at a time).  If the whole  number  was 
  447.         available at the outgoing register at the time that the call  was 
  448.         forwarded,  the  digits will arrive quite fast,  possibly  around 
  449.         100mS  per  digit.  It is equally possible that the  digits  will 
  450.         arrive  at the rate they were dialled by the caller -  ie.  quite 
  451.         slowly, and this should be taken into account.  
  452.         
  453.         In  addition, it is quite possible for a caller to dial  insuffi-
  454.         cient  digits to complete the DDI.  However, as noted before,  it 
  455.         is  not  usually possible to backwards release an  incoming  call 
  456.         before  it is answered, so the application may either  disconnect 
  457.         the  call at the API, in which case the channel will not go  IDLE 
  458.         until  the caller goes ON-HOOK, or it may simply wait  until  the 
  459.         caller  goes ON-HOOK, and the channel goes to IDLE, then  release 
  460.         the call.
  461.         
  462.         Additionally,  it  should be noted that, unlike  ISDN  signalling 
  463.         systems, it is not the case that CLI information will be  present 
  464.         at this stage, as it must be explicitly requested.  To obtain the 
  465.         CLI  the  application must invoke  the  call_get_originating_addr 
  466.         function, which actually requests the CLI from the exchange.   As 
  467.         each  CLI  digit becomes available for the  application,  further 
  468.         EV_DETAILS events will be issued.
  469.         
  470.         If the call is to be accepted, an group-B acceptance cause may be 
  471.         provided using call_answercode().
  472.         
  473.         When the application is satisfied that it has received all avail-
  474.         able details, the function call_incoming_ringing may (optionally) 
  475.         be  used, then, after the card has completed the  necessary  com-
  476.         pelled  tone signalling sequence,  the application  will  receive 
  477.         the EV_WAIT_FOR_ACCEPT event, and a ring tone cadence may be sent 
  478.         to the caller over the B-channel.  It is not absolutely necessary 
  479.         to go through this stage, as the application may answer  immedia-
  480.         tely, in which case no RING TONE will be heard by the caller, and 
  481.         no EV_WAIT_FOR_ACCEPT will occur.
  482.         
  483.         The  exact  purpose  of the EV_WAIT_FOR_ACCEPT is  to  allow  the 
  484.         application program to know when the compelled sequence has  been 
  485.         completed,  so that the B-channel may be switched to  some  other 
  486.         (custom) ring tone generator source without danger of cutting off 
  487.         some  of  the  tone signalling.  It is useful to  know  that  the 
  488.         default ring cadence starts off with a cycle of silence, to avoid 
  489.         a  partial  cycle in the event that the application is  a  little 
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.         slow in 'getting there' in switching to the external ring  gener-
  497.         ator.  
  498.         
  499.         Two  alternate ring cadences are available, the default  being  a 
  500.         425Hz  tone,  1 second on and 3 seconds off,  and  the  alternate 
  501.         being  0.4S on, 0.2S off, 0.4S on, then 3S off.   The default  is 
  502.         to produce no ring cadence at all, but the EV_WAIT_FOR_ACCEPT  is 
  503.         still generated.
  504.         
  505.         Any  time after the EV_WAIT_FOR_ACCEPT (perhaps a short delay  to 
  506.         allow   a  few  cycles  of  ringing)  the  application  may   use 
  507.         call_accept  to  accept the incoming call, whereupon  the  driver 
  508.         connects the call and the EV_CALL_CONNECTED event will be  gener-
  509.         ated. 
  510.         
  511.         When  the call is released from the near end, the driver  discon-
  512.         nects  the call and after the far end has released the  call  the 
  513.         EV_IDLE event will be emitted.  If the call has been released  at 
  514.         the far end, the EV_IDLE event will be emitted immediately.
  515.         
  516.         As always, before the channel can be used again after the EV_IDLE 
  517.         state  is  received,  the application  must  release  the  handle 
  518.         (call_release), then subsequently (very promptly) idle the  time-
  519.         slots  by using the call idle_net_ts, which also  reconnects  the 
  520.         DSP  to the B-channel ready for the next cycle of compelled  tone 
  521.         signalling.
  522.         
  523.         It  is  possible  on  incoming calls  to  periodically  call  the 
  524.         call_put_charge  function,  each of which will transmit  a  meter 
  525.         pulse  to  the far end.  This is not recommended (!) for  use  on 
  526.         exchange lines, as the exchange will not be expecting it, and may 
  527.         take the line out of service, and in any event there would  prob-
  528.         ably be difficulty in persuading the PTT to pay the bill!.   This 
  529.         feature  is actually only provided for test purposes,  and  those 
  530.         installations where the card is emulating an exchange line.
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.         
  538.         13 API Handling of Outgoing Calls With R2T1
  539.         
  540.         On  outgoing calls, prior to dialling, the card makes no  attempt 
  541.         to detect the presence of DIAL TONE as it is rarely available  on 
  542.         MFC  R2  due to the fact that the B-channel is used  for  in-band 
  543.         tone  signalling.  Instead, the card relies on the SEIZE  ACKNOW-
  544.         LEDGE line signalling, and the compelled nature of MFC R2  should 
  545.         deal with any other issues.
  546.         
  547.         If it is required that DIAL TONE should be detected by an  exter-
  548.         nal speech processing card  prior to dialling, if no  destination 
  549.         address is supplied on call_openout, the speech card can be  used 
  550.         to detect the DIAL tone, then the entire destination address  may 
  551.         be  supplied  in one go, using call_send_overlap.  Care  must  be 
  552.         taken that the bidirectional connection between the port and  the 
  553.         DSP is not disturbed during this operation.
  554.         
  555.         The event EV_OUTGOING_RINGING will be encountered  when (and  if) 
  556.         the  compelled signalling indicates that the called  subscriber's 
  557.         line  is free, and speech conditions have been set up to the  far 
  558.         end.   
  559.         
  560.         EV_OUTGOING_RINGING does NOT indicate that the card has  actually 
  561.         detected  RING TONE in-band, as this is not attempted due to  the 
  562.         possible wide variation of ringing frequencies and cadences  that 
  563.         may be encountered. It's purpose is to indicate that dialling  is 
  564.         complete,  and the call has either arrived at a  free  subscriber 
  565.         which is not ringing, or in-band call progress tones are  signal-
  566.         ling  a  call  failure cause, for  example,  BUSY,  UNOBTAINABLE, 
  567.         NUMBER  NOT IN USE or OUT OF ORDER.  Thus if actual RING TONE  or 
  568.         CALL  PROGRESS  tone detection is required,  an  external  speech 
  569.         processing card could be used after EV_OUTGOING_RINGING for  this 
  570.         purpose.
  571.         
  572.         After   EV_OUTGOING_RINGING   has  been   received,   and   after 
  573.         EV_CALL_CONNECTED has been received, a call acceptance value  may 
  574.         be recovered from the API, via call_getcause.
  575.         
  576.         Alternatively,  if the call is rejected at the incoming  (called) 
  577.         end, if remote disconnect is not used (no CNF_REM_DISC),  EV_IDLE 
  578.         will  be  received,  and a clearing cause may  be  recovered  via 
  579.         call_getcause.   If remote disconnect is used,  EV_REMOTE_DISCON-
  580.         NECT  will  be received, a clearing cause will be  available  via 
  581.         call_getcause,  and  the  call should be released  in  the  usual 
  582.         manner (described below).
  583.         
  584.         During the call, if the CNF_CALL_CHARGE option has been set,  the 
  585.         API  will return EV_CALL_CHARGE events, which may be  counted  by 
  586.         the  application.  In addition, the device driver  itself  counts 
  587.         received  meter pulses, and this count can be recovered from  the 
  588.         API by the use of the call_get_charge function.
  589.         
  590.         
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.         For  both  incoming and outgoing calls, if the call  is  released 
  598.         from  the  far end, and the 'remote disconnect'  feature  of  the 
  599.         release  3  device  drivers  is  enabled,  the  API  will  return 
  600.         EV_REMOTE_DISCONNECT, but the signalling system will not actually 
  601.         release the channel at the near end until either  call_disconnect 
  602.         or  call_release is called, but bear in mind that outgoing  calls 
  603.         will  usually  continue to be charged until disconnected  or  re-
  604.         leased.  Also, if the call is not released at the near end, it is 
  605.         often  possible for the caller to go off-hook again,  and  re-an-
  606.         swer!.
  607.         
  608.         
  609.         14 'Clearback' Feature
  610.         
  611.         Some  networks,  and  Brazil is known to be one of  them,  use  a 
  612.         feature  that is sometimes called 'clearback' on answer, or  'do-
  613.         uble  answer'.  In this, a short time after answer the card  must 
  614.         output  a  'clearback' signal for a short period  of  time,  then 
  615.         return  to answer.  This is used to reject calls from  payphones, 
  616.         and  collect  calls.   An -s switch is provided  to  enable  this 
  617.         feature, and another switch is provided to control the length  of 
  618.         the  clearback condition.  Note that the EV_CALL_CONNECTED  event 
  619.         is not returned until after the clearback pulse has finished.
  620.         
  621.         In such a network, outgoing calls may also experience this effect 
  622.         upon  far-end answer, whereby, if 'remote disconnect' is  enabled 
  623.         the  EV_REMOTE_DISCONNECT will be seen immediately after  answer, 
  624.         but  the call will otherwise appear proceed fairly normally.   If 
  625.         it  is  not enabled, the line will appear  to  clear  immediately 
  626.         after answer.  Current versions of the CAS driver leave the  line 
  627.         state at EV_REMOTE_DISCONNECT, but later versions will return  to 
  628.         EV_CALL_CONNECTED  after  the clearback pulse ends, so  that  the 
  629.         sequence will be CONNECTED, REMOTE_DISCONNECT, CONNECTED.  Is  is 
  630.         not  possible to defer the CONNECTED event until the  second  in-
  631.         stance, as the protocol has no way of knowing that this is  actu-
  632.         ally going to happen.  A way of overcoming the  REMOTE_DISCONNECT 
  633.         state  is  to set -s26 to a long period, perhaps 2.5  seconds  (-
  634.         s26,250),  then  the clearback pulse will be considered to  be  a 
  635.         meter  pulse,  and  an  EV_CALL_CHARGE  event  will  be  returned 
  636.         straight after call_accept().  Alternatively, the application may 
  637.         wish  to recognised the presence of the clearback signal  at  the 
  638.         far  end, and prevent connection to such a service  by  releasing 
  639.         the call immediately (perhaps to prevent premium rate services to 
  640.         be accessed).
  641.         
  642.         
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.         
  650.         15 Configuration Switch Settings for R2T1
  651.         
  652.         This sections details the CONFIG.SYS switch settings (and  confi-
  653.         guration string switches for UNIX), for various optional features 
  654.         in  R2T1.   The use of these switches within CONFIG.SYS  will  be 
  655.         similar to the following:-
  656.         
  657.              device = c:\sys\mvclcas.sys -p380 -i10 -s1 -s3,9 -s8,6
  658.         
  659.         See the device driver release notes and README files on disk  for 
  660.         full  information  on device driver installation and  the  normal 
  661.         switches (-p, -i, -d etc).  
  662.         
  663.         Note  that -s switches may also be used with a network port  num-
  664.         ber, as in -s8,1N0.
  665.         
  666.         Switches shown below marked with '*' are optional, but  recommen-
  667.         ded for use where possible.
  668.         
  669.         -s0       allows  backward  release of incoming calls -  this  is 
  670.                   normally considered illegal and so should probably  not 
  671.                   be used.
  672.         
  673.         -s1       * on incoming calls, causes request of group II/group B 
  674.                   signals  on completion of tone signalling.   These  are 
  675.                   not  currently made available through the  driver,  al-
  676.                   though,  as  there is some  call  progress  information 
  677.                   available via this method, this functionality is inten-
  678.                   ded  at some future date.  This switch can  usually  be 
  679.                   used freely, and is in fact often mandatory.
  680.         
  681.                   Note  that the use of call progress (group  B)  signals 
  682.                   depends upon the use of this switch.
  683.         
  684.         -s2,x     on  incoming calls, causes a single (-s2,1) or dual  (-
  685.                   s2,2) ring back cadence to be generated as a result  of 
  686.                   call_incoming_ringing().  Each cadence is 425Hz, single 
  687.                   ring is 1 second on, 3 seconds off.  Dual ring is  0.4S 
  688.                   on, 0.2S off, 0.4S on, 3 seconds off.  This switch  can 
  689.                   be  used freely, but ring tone cadences may be  subject 
  690.                   to local regulation.
  691.         
  692.         -s3,x     if CLI/ANI is requested, causes signal A-x rather  than 
  693.                   A-5 (the default) to be generated and recognised as CLI 
  694.                   request.  The use of particular signals as CLI  request 
  695.                   is implementation dependent hence this switch should be 
  696.                   used  with care.  If this switch is used, then  (unless 
  697.                   determined   otherwise  by  setting   -s12,x   national 
  698.                   switches)  A-5 sends only the caller category, and  not 
  699.                   CLI.
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.         -s4       *  on incoming calls, strips off the 1st digit  (caller 
  707.                   category  digit) from the returned CLI value  (for  the 
  708.                   sake of compatibility with the API for other signalling 
  709.                   systems),  otherwise  the category  digit  is  returned 
  710.                   preceding the first CLI digit.  This switch can be used 
  711.                   freely, as it only modifies the presentation of  infor-
  712.                   mation via the API.
  713.         
  714.         -s5,x     Caller   category   (Group  II)  signal   control   for 
  715.                   outgoing  calls.   Without  setting  this  switch,  the 
  716.                   default is to send the caller category before CLI,  and 
  717.                   to use the default value of II-1, or as set by -s7.
  718.         
  719.         -s5,1     Do not prefix CLI with the caller category, but  caller 
  720.                   category is as set by -s7.
  721.         
  722.         -s5,2     Prefix  CLI  with the caller category, and  the  caller 
  723.                   category is provided by the first CLI digit.
  724.         
  725.         -s5,3     Do  not  prefix CLI with caller  category,  but  caller 
  726.                   category  is set by the first CLI digit, hence  on  CLI 
  727.                   request send CLI starting at the second digit.
  728.         
  729.         -s6       on  outgoing calls, upon requests for CLI with  no  CLI 
  730.                   digits available at the API, responds with an I-15 (end 
  731.                   of CLI) rather than an I-12 (request not accepted).
  732.         
  733.         -s7,x     on outgoing calls, sets the value used for the group  2 
  734.                   signal  to (x), rather than  II-1 (the default).   This 
  735.                   is  national implementation dependent.  This  value  is 
  736.                   ignored if -s5 is set to take the caller category  from 
  737.                   the CLI field, unless the CLI field is empty.
  738.         
  739.         -s8,x     On  incoming  calls, sets the group B  free  subscriber 
  740.                   signal to (x), the default if this switch is not expli-
  741.                   citly used is -s8,6.
  742.         
  743.         -s9       Modifies the line signalling to change only one bit  at 
  744.                   a  time.  This only influences the response to  forward 
  745.                   clearing  by clearing back via the back-busy  state  in 
  746.                   the same way as normal backwards clearing.  
  747.         
  748.         -s10      Causes  I-15  to  be accepted as an  'End  Of  Pulsing' 
  749.                   signal for DDI address on incoming calls, and  prevents 
  750.                   the  'F' that would otherwise be generated  from  being 
  751.                   appended to the incoming destination address field.
  752.         
  753.         -s11      Inhibits  the  generation of either the  I-12  or  I-15 
  754.                   signal as 'end of CLI'.  Receiving CLI relies upon  the 
  755.                   -cCnn CLI count to determine the number of CLI digits.
  756.         
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.         
  764.         -s12,2    Produces  China  #1  R2 line  signalling  and  register 
  765.                   signal meanings, and hence always uses Group B  signals 
  766.                   (turns  on  -s1),  sets  the  appropriate  CLI  request 
  767.                   parameters  (-s3,6, -s6 and s13,1), and  sets  modified 
  768.                   line signalling (s9).  The caller's category is left to 
  769.                   default to II-1 (-s7,1) but the default free subscriber 
  770.                   answer signal must be explicitly set to B-1 (-s8,1).
  771.         
  772.         -s12,3    Produces  Brazil 5C MFC R2 signal meanings,  and  hence 
  773.                   always  uses Group B signals (turns on -s1),  and  sets 
  774.                   the CLI request signal to A-5 (sets -s3,5).  The  call-
  775.                   er's  category is left to default to II-1 (-s7,1  which 
  776.                   should  be  correct) and the  default  free  subscriber 
  777.                   answering should be set to B-1 (-s8,1).
  778.         
  779.         -s12,4    Produces  Mexican R2.  Always uses group B (-s1),  sets 
  780.                   CLI request to A-6 (-s3,6), subsequent CLI requests  to 
  781.                   A-1 (-s13,1), no CLI to I-15 (-s6).
  782.         
  783.         -s12,5    Produces Columbian R2.  Always uses group B (-s1), sets 
  784.                   CLI request to A-6 (-s3,6), subsequent CLI requests  to 
  785.                   A-1 (-s13,1), with modified line signalling (-s9).
  786.         
  787.         -s12,6    Produces  Australian  P2 (AKA TS003 and  R2D).   Always 
  788.                   uses group B (-s1), no CLI possible.
  789.         
  790.         -s12,7    Produces   Indonesian  SMFC  R2  (semi-compelled   R2).  
  791.                   Always uses group B, sets CLI request to A-6,  (-s3,6), 
  792.                   backwards  signals to 150mS fixed period  (unless  mod-
  793.                   ified by -s27).
  794.         
  795.         -s12,8    Produces  Croatian  MFC  R2  register  signalling,  and  
  796.                   always  uses  group B for MFC.  (See notes  at  end  of 
  797.                   document regarding other switches).
  798.         
  799.         -s13,x    Sets  a different value for CLI digit  request  signals 
  800.                   subsequent  to the first CLI request signal.   The  de-
  801.                   fault  is that all CLI request signals are the same  as 
  802.                   the default (or the value set using S3).
  803.         
  804.         -s14,x    On  incoming calls, causes the CLI to be  automatically 
  805.                   requested after receiving x DDI digits.  If this option 
  806.                   is  not selected (which is the default) then CLI  needs 
  807.                   to  be  explicitly  requested  using   call_get_origin-
  808.                   ating_address.   If  selected,  that  function  is  not 
  809.                   required   and   the  CLI  will  be   available   using 
  810.                   call_details before x+1 DDI digits are received.   Note 
  811.                   that it is not known whether this procedure is valid in 
  812.                   all  R2s, but it was introduced to overcome  a  problem 
  813.                   found on at least one exchange using China No1, whereby 
  814.                   pulse  reception  of  the CLI  request  (required  when 
  815.                   having  received fewer DDI digits than the  number  set 
  816.                   using -cDnn in the CONFIG.SYS device= line) caused  the 
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.                   call to be released.  Using -s14,1 causes the CLI to be 
  824.                   automatically  fetched after the first DDI digit,  com-
  825.                   pletely overcoming the problem.
  826.         
  827.         -s15,x    *  During receipt of CLI, prevents recognition of  ring 
  828.                   and  answer  commands prior to receipt of the  'end  of 
  829.                   CLI' signal (usually I-15).  If this switch is used  to 
  830.                   inhibit   commands,  the   'call_incoming_ringing'   or 
  831.                   'call_accept' API call may be any time after the  first 
  832.                   CLI digit has been received.
  833.         
  834.                   If  this switch is not used to inhibit  commands,  care 
  835.                   must  be taken to ensure that the entire CLI  has  been 
  836.                   received,  plus either a timeout to allow the  'end  of 
  837.                   cli'  signal to arrive or inclusion of the 'C'  or  'F' 
  838.                   option  along with recognition of same, before  issuing 
  839.                   these  API calls (as this may terminate  the  compelled 
  840.                   signalling prior to receiving 'end of CLI', which  some 
  841.                   central offices will consider illegal).  
  842.         
  843.                   Thus  the use of this switch is recommended if an  'end 
  844.                   of  CLI' signal is provided.  However, with no 'end  of 
  845.                   CLI'  signal and in the event of insufficient  CLI  di-
  846.                   gits, it will prove impossible to cause ring or answer, 
  847.                   as the API commands will be deliberately ignored.
  848.         
  849.                   -s15,0  (the default) does not inhibit ring or  answer, 
  850.                        and does not show 'C' or 'F'.
  851.         
  852.                   -s15,1 shows the I-12 signal as 'C', and I-15 as 'F' at 
  853.                        the  end of the CLI address, but does not  inhibit 
  854.                        ring or answer.
  855.         
  856.                   -s15,2 inhibits ring and answer during CLI  collection, 
  857.                        without showing 'C' or 'F'.
  858.         
  859.                   -s15,3 shows 'C' and 'F', and inhibits ring and answer.
  860.         
  861.         -s16      Causes  production  of a 425Hz 'dialtone'  on  incoming 
  862.                   calls, immediately upon seizing, which disappears  upon 
  863.                   detecting  the  first dialled digit.  This may  not  be 
  864.                   very useful, and may in fact upset some central  office 
  865.                   switches.
  866.         
  867.         -s17      Allows  receipt  of  register  signalling  via  decadic 
  868.                   (pulse)  dialling  on the A bit.  As there  is  reduced 
  869.                   information  transfer  when using decadic, all  of  the 
  870.                   call  progress and caller category information  is  ab-
  871.                   sent, and CLI is not available.  If this switch is set, 
  872.                   any  pulse  on  the A bit after seize  will  cause  the 
  873.                   protocol  to ignore tone signalling, so only  set  this 
  874.                   switch if decadic reception is really required.
  875.         
  876.         -s18      Forces  outgoing calls to use decadic (pulse)  dialling 
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.                   on the A bit.  As there is reduced information transfer 
  884.                   when using decadic, all of the call progress and caller 
  885.                   category  information is absent, and CLI is not  avail-
  886.                   able.  
  887.         
  888.         -s19      Forces  alternate meter pulse type.  Currently, use  of 
  889.                   this  switch causes the call_put_charge() API  call  to 
  890.                   generate  a  'hookflash' instead of a  charging  pulse.  
  891.                   This  is  an interim measure to generate  a  hookflash, 
  892.                   prior  to 'doing it properly'.  Note that,  because  of 
  893.                   its origin,  it is currently only possible to use  this 
  894.                   on incoming calls.
  895.         
  896.         -s20,x    Sets   time  supervision  while  transmitting   forward 
  897.                   signals to x seconds.  On timeout, will clear  forward. 
  898.                   Default is no time supervision.
  899.         
  900.         -s21,x    Sets  time  supervision while transmitting  forward  no 
  901.                   tone  signals  to x seconds.  On  timeout,  will  clear 
  902.                   forward.  Default is no time supervision.
  903.         
  904.         -s22,x    Sets  time supervision while receiving forward  signals 
  905.                   to  x seconds.  On timeout, will generate a pulsed  A-4 
  906.                   (or  B-4) congestion signal (or as set by -s30),  which 
  907.                   should  result in the outgoing end  clearing  forwards.  
  908.                   Default is no time supervision.
  909.         
  910.         -s25,x    Sets length of meter pulse to x*10mS (default 150mS).
  911.         
  912.         -s26,x    Sets  the  maximum period of time considered  to  be  a 
  913.                   meter  pulse (prior to being regarded as  clearing)  to 
  914.                   x*10 mS (default 350mS).
  915.         
  916.         -s27,x    Enables  semi-compelled signalling; ie. sets  backwards 
  917.                   signals  to  fixed x*10mS periods, a  value  frequently 
  918.                   used  is 150mS (-s27,15) (with the switch not set,  the 
  919.                   default is fully compelled signalling).
  920.         
  921.         -s28,x    Causes  outgoing register signalling to be DTMF  rather 
  922.                   than  MFC.   As there is reduced  information  transfer 
  923.                   when  using DTMF, all of the call progress  and  caller 
  924.                   category  information is absent, and CLI is not  avail-
  925.                   able.  The mark/space ratio of the DTMF tones is  fixed 
  926.                   at  1:1,  with tone duration fixed at x*10mS,  a  value 
  927.                   frequently  used is 80mS (-s28,8) (with the switch  not 
  928.                   set, the default is MFC R2).
  929.         
  930.         -s29      Causes incoming register signalling to be assumed to be 
  931.                   DTMF rather than MFC.  As there is reduced  information 
  932.                   transfer when using DTMF, all of the call progress  and 
  933.                   caller  category information is absent, and CLI is  not 
  934.                   available. (Default is MFC R2).
  935.         
  936.         -s30      Overrides  the default value for the A or  B  backwards 
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.                   pulsed  'congestion' signal sent as a result of  expiry 
  944.                   of  the time supervision of receiving forward  signals.  
  945.                   (Default is A-4 or B-4).
  946.         
  947.         -s32      Allows  any  signal to register as a digit in  the  CLI 
  948.                   field,  except signal 15 (which is universally used  as 
  949.                   end  of  CLI).   Specifically,  this  allows  reception 
  950.                   and  acceptance  of any group II signal  preceding  the 
  951.                   CLI  (even such as II-12, which would appear  as  'C'), 
  952.                   without preventing the acceptance of the following  CLI 
  953.                   itself.
  954.         
  955.         -s33,x    Modifies the use of answer supervision line  signalling 
  956.                   for  Croatian  R2  (and may  be  applicable  elsewhere) 
  957.                   whereby  upon recognition of seize, the  incoming  side 
  958.                   goes immediately to conversational state.  The  various 
  959.                   values shown below may be added together to produce  an 
  960.                   aggregate effect.
  961.         
  962.                   x=1  Modifies  outgoing  line  signalling  on  incoming 
  963.                   calls, by going directly to answer upon seize.
  964.         
  965.                   x=2  Copes  with modified incoming line  signalling  on 
  966.                   outgoing  calls when the line signalling goes  directly 
  967.                   to answer.
  968.         
  969.                   x=16 On   incoming   calls   with   modified   outgoing 
  970.                   line signalling, automatically produces a single  meter 
  971.                   pulse  upon call_accept(), which may be interpreted  by 
  972.                   the  far end as indicating that the call has  been  an-
  973.                   swered.
  974.         
  975.                   x=32 On outgoing calls with modified signalling, causes 
  976.                   return of EV_CALL_CONNECTED when a meter pulse has been 
  977.                   seen.  If outdialling with pulse or DTMF, it is  recom-
  978.                   mended  to use this switch even if metering is not  ap-
  979.                   plied,  as it allows clearback to be  identified.   For 
  980.                   pulse  or DTMF, if a meter pulse on answer is  NOT  re-
  981.                   ceived, it may be appropriate to use the -s34,x flag to 
  982.                   cause  a move to the connected state after  a  timeout, 
  983.                   otherwise  the  driver will never  move  to  connected.  
  984.                   With  modified signalling, and this switch is  not  set 
  985.                   when  outdialling  with MFC, the driver  will  move  to 
  986.                   connected  immediately  at  the end  of  the  compelled 
  987.                   signalling.
  988.         
  989.         -s34,x    On  outgoing  calls, causes the  protocol  to  indicate 
  990.                   movement  to  the connected state x * 100mS  after  the 
  991.                   last digit has been sent.  Useful for use with DTMF  or 
  992.                   pulse  outdialling  in the presence  of  modified  line 
  993.                   signalling such as described for -s33.
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.         
  1001.         -s35,x    On incoming calls, this switch enables the  'clearback' 
  1002.                   feature,  which  in some networks will  reject  collect 
  1003.                   calls,  and  calls from payphones.  If this  switch  is 
  1004.                   used,  after call_accept() the answer  line  signalling 
  1005.                   will be sent for x*100mS, then the clearback signal for 
  1006.                   2  seconds  (or  as set by -s36),  then  answer  signal 
  1007.                   again.  A typical value would be 1 second (x = 10);
  1008.         
  1009.         -s36,x    If -s35 is set, then this switch overrides the  default 
  1010.                   two second disconnect period with a value of x*100mS.
  1011.         
  1012.         -s60 to -s74
  1013.                   These switch locations provide overrides to the mapping 
  1014.                   for  outgoing calls, between the received Group B  sig-
  1015.                   nals and the answer or clearing cause returned via  the 
  1016.                   API.  Switch -s60 sets the returned value for B-1, -s61 
  1017.                   the  value  for B-2, up to -s74  setting  the  returned 
  1018.                   value for B-15.  If these switches are left unset,  the 
  1019.                   default returned mapping will be as in the table below. 
  1020.                   Note  that certain national switch settings  (the  -s12 
  1021.                   switch)  will modify this default mapping, but that  it 
  1022.                   may  still  be overridden here.  To set a  B-signal  to 
  1023.                   return a clearing cause (LC_xxx) value, set the  switch 
  1024.                   to the enumerated value of the relevant LC_xxx code. To 
  1025.                   set a B-signal to return an answer code, set it to  the 
  1026.                   value  of the answer code plus 16.  Thus to  alter  the 
  1027.                   mapping to return answer code 2 from B-6, set  -s65,18.  
  1028.         
  1029.                   These  switches may usually be left untouched as  their 
  1030.                   default   values  should  be  very  suitable   (default 
  1031.                   mappings are shown after the colon ':').
  1032.         
  1033.                   -s60 (B-1 free, last party release) : 19 ANS_CODE_3
  1034.                   -s61 (B-2 intercepted)   : 6  LC_INCOMING_CALLS_BARRED
  1035.                   -s62 (B-3 busy)          : 1  LC_NUMBER_BUSY
  1036.                   -s63 (B-4 congested)     : 8  LC_CALL_FAILED
  1037.                   -s64 (B-5 unobtainable)  : 3  LC_NUMBER_UNOBTAINABLE
  1038.                   -s65 (B-6 free, charge)  : 17 ANS_CODE_1
  1039.                   -s66 (B-7 free no charge): 18 ANS_CODE_2
  1040.                   -s67 (B-8 out of order)  : 5  LC_OUT_OF_ORDER
  1041.                   -s68 (B-9 spare)         : 1  LC_NUMBER_BUSY
  1042.                        "    "                   "    "    "
  1043.                   -s74 (B-15 spare)        : 1  LC_NUMBER_BUSY
  1044.         
  1045.         -s75 to -s79
  1046.                   These  switches  provide  overrides  to  the   mappings 
  1047.                   between  the five available API answer codes  and  out-
  1048.                   going Group B signals for incoming calls.  The  default 
  1049.                   settings are as below shown after the colon:-
  1050.         
  1051.                   -s75 ANS_CODE_1     : B-6 (free, charge)
  1052.                   -s76 ANS_CODE_2     : B-7 (free, no charge)
  1053.                   -s77 ANS_CODE_3     : B-1 (free, last party release)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                   -s78 ANS_CODE_4     : B-6 (free, charge)
  1061.                   -s79 ANS_CODE_5     : B-6 (free, charge)
  1062.         
  1063.         -s80 to -s95
  1064.                   These  switches  provide  overrides  to  the   mappings 
  1065.                   between  clearing  causes  and  Group  B  signals   for 
  1066.                   incoming calls.  Note that it is only possible to  send 
  1067.                   or  receive a clearing cause if clearing occurs  before 
  1068.                   RINGING or ANSWER, clearing after ANSWER will result in 
  1069.                   a  cause  of  LC_NORMAL (enumerated  as  0,  and  hence 
  1070.                   impossible  to  set  via -s60 to  -s74).   The  default 
  1071.                   settings are as below shown after the colon:-
  1072.         
  1073.         
  1074.                   -s80 LC_NORMAL                : B-3 (busy)
  1075.                   -s81 LC_NUMBER_BUSY           : B-3 (busy)
  1076.                   -s82 LC_NO_ANSWER             : B-3 (busy)
  1077.                   -s83 LC_NUMBER_UNOBTAINABLE   : B-5 (unobtainable)
  1078.                   -s84 LC_NUMBER_CHANGED        : B-5 (unobtainable)
  1079.                   -s85 LC_OUT_OF_ORDER          : B-8 (out of order)
  1080.                   -s86 LC_INCOMING_CALLS_BARRED : B-2 (intercepted)
  1081.                   -s87 LC_CALL_REJECTED         : B-5 (unobtainable)
  1082.                   -s88 LC_CALL_FAILED           : B-4 (congested)
  1083.                   -s89 LC_CHANNEL_BUSY          : B-3 (busy)
  1084.                   -s90 LC_NO_CHANNELS           : B-3 (busy)
  1085.                   -s91 spare                    : B-3 (busy)
  1086.                        "    "                   :    "    "
  1087.                   -s95 spare                    : B-3 (busy)
  1088.         
  1089.         -s98      Informs the software on the card that no DSP is fitted, 
  1090.                   allowing  the use of both line signalling  and  decadic 
  1091.                   (pulse)  register  signalling  without  suffering  from 
  1092.                   problems  due to absence of DSP hardware. Setting  this 
  1093.                   switch  automatically enables generation and  reception 
  1094.                   of  decadic register signalling, equivalent to  setting 
  1095.                   -s17 and -s18.
  1096.         
  1097.         -s99,n    Enables  protocol trace generation by the  software  on 
  1098.                   the  card.  If n=1..31 the generated trace  is  enabled 
  1099.                   for channel n (as long as n != 16), if n=32 then  trace 
  1100.                   is enabled for all channels (except 16).  The left  bit 
  1101.                   trace and tone columns are the transmitted signals, and 
  1102.                   the  right bit trace and tone columns are the  received 
  1103.                   signals.    The  characters  'f'  and  'b'  stand   for 
  1104.                   'forward' and 'backward'.
  1105.         
  1106.                   Only use this facility for debugging - do not leave  it 
  1107.                   enabled in production systems (unless absolutely neces-
  1108.                   sary)  as it does affect the performance of the  proto-
  1109.                   col.
  1110.         
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.         
  1118.         16 Summary of Default Signals
  1119.         
  1120.         (With No switches set)
  1121.         
  1122.         Default 'Send next digit' (n+1):-                 A-1
  1123.         Default 'Send last but 1 digit' (n-1):-           A-2
  1124.         Default 'Go to Group B':-                         A-3
  1125.         Default 'Congestion':-                            A-4
  1126.         Default 'Send Caller Category' & 'CLI request':-  A-5
  1127.         Default 'Go to Speech':-                          A-6
  1128.         Default 'Send Last but 2 digit' (n-2):-           A-7
  1129.         Default 'Send last but 3 digit' (n-3):-           A-8
  1130.         
  1131.         Default 'No CLI' or 'Not Accepted':-              I-12
  1132.         Default End of CLI signal:-                       I-15
  1133.         CLI is not automatically requested
  1134.         
  1135.         Default Group II (Caller category) signal:-       II-1
  1136.         Default Group B  (Line free, charge) signal:-     B-6
  1137.         Default ring back:-                               none
  1138.         Default dial tone:-                               none
  1139.         
  1140.         Note that most switches produce fairly small modifications to the 
  1141.         signals and signalling, whereas the -s12 switches produce  multi-
  1142.         ple and more fundamental changes to the signalling set, including 
  1143.         'Send last but N' (changes which are not documented here.)
  1144.         
  1145.         
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.         
  1153.         17 Switches for National R2 Implementations
  1154.         
  1155.         This  section  details switch settings that are known to  be  re-
  1156.         quired in certain national R2 implementations.  Some of the other 
  1157.         switches may be used with caution, provided the implications  are 
  1158.         fully understood.
  1159.         
  1160.              Blue Book R2, A-5 CLI    -s1
  1161.         
  1162.              Blue Book R2, A-9 CLI    -s1 -s3,9 -s5,1
  1163.         
  1164.              Portugal MFC R2          -s1
  1165.         
  1166.              Norway National MFC R2   -s7,2 -s20,21 -s21,27 -s22,24
  1167.              (in some cases, Norway requires outgoing calls to use
  1168.               DTMF, in which case use -s28,8 on the User end, and 
  1169.               -s29 on the Network end)
  1170.         
  1171.              Israel MFC R2            -s1 -s3,9
  1172.         
  1173.              China #1 MFC R2          -s12,2 -s8,1 
  1174.                                       (-s14,1 recommended if using CLI)
  1175.         
  1176.              South Africa MFC R2      -s10
  1177.         
  1178.              Malaysia                 -s1 -s3,6 -s7,2 -s8,1 -s10
  1179.         
  1180.              Mexico                   -s12,4 -s7,2 -s8,1
  1181.         
  1182.              Peru MFC R2              -s3,9
  1183.         
  1184.              Brazil 5C MFC R2         -s12,3 -s8,1
  1185.         
  1186.              Columbian R2             -s12,5 -s7,2 -s8,1
  1187.         
  1188.              Chile                    -s1 -s10 
  1189.         
  1190.              Australian R2D           -s12,6 -s7,2 -s8,1
  1191.         
  1192.              Indonesian SMFC R2       -s12,7 -s7,2 -s8,1
  1193.         
  1194.              Thailand                 -s1 -s7,2 -s8,1 -s28,8
  1195.              (DTMF is used for outgoing calls.  Substituting -s29 for 
  1196.               the -s28,8 will emulate the Network end)
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.         
  1204.              Belgium                  -s1 -s3,5 -s5,7 -s8,1 -s13,9
  1205.         
  1206.              The  approved  software for customer access  in  Belgium  is 
  1207.              a different file called M1BELGU, and uses DTMF for  outgoing 
  1208.              calls  (as is required for normal customer access  lines  in 
  1209.              Belgium).
  1210.         
  1211.              However,  within the network both way MFC is used, and as  a 
  1212.              result R2T1 may be used and configured as above.
  1213.         
  1214.              Also, similar results to the approved version (M1BELGU)  may 
  1215.              be  obtained  using  the switches as  above,  but  with  the 
  1216.              addition  of -s28,8 at the User end to force the  generation 
  1217.              of DTMF on outgoing calls.
  1218.         
  1219.              To  use  R2T1 as a network end for M1BELGU  for  development 
  1220.              purposes or otherwise (previously a software called  M1BELGN 
  1221.              was  supplied,  but  R2T1 is now a  much  better  solution), 
  1222.              requires generation of dialtone (-s16), and requires  recog-
  1223.              nition of DTMF rather than MFC (-s29), so use:-
  1224.         
  1225.                             -s1 -s3,9 -s5,7 -s8,1 -s16 -s29
  1226.         
  1227.         
  1228.              Croatian R2    -s12,8 -s28,8 -s33,34
  1229.              
  1230.              The  specifications  in hand for  Croatian  line  signalling 
  1231.              indicate  that incoming calls are fairly standard  MFC,  but 
  1232.              that  a modified line signalling is used for  calls  towards 
  1233.              the public network (so -s33,34), and that outgoing calls may 
  1234.              use either DTMF or pulse dialling, but NOT MFC, (thus -s28,8 
  1235.              for 80mS DTMF, OR use -s18 for decadic pulse dialling).  The 
  1236.              -s34,34  causes modified line signalling on outgoing  calls, 
  1237.              but  also  interprets an incoming meter pulse  as  the  call 
  1238.              having  been answered.  If no meter pulses are returned,  it 
  1239.              may be useful to use (say) -s34,50 to return EV_CALL_CONNEC-
  1240.              TED 5 seconds after the last digit sent, but the application 
  1241.              may  need to monitor for in-band speech to really deal  with 
  1242.              things properly.
  1243.         
  1244.              To emulate the C.O. (central office) use:-
  1245.         
  1246.                             -s12,8 -s29 -s17 -s33,17
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.         
  1254.         18 Auto Back-Busy Option Switch
  1255.         
  1256.         The device driver auto back-busy option is available on the  R2T1 
  1257.         firmware and the associated CAS driver software, whereby channels 
  1258.         not 'open_for_incoming' will automatically present back-busy.
  1259.         
  1260.         Examples for the auto back-busy switch are as follows:-
  1261.         
  1262.              -cBBY               global back-busy, affects both ports
  1263.              -cBBYn0             global back-busy, affects port 0
  1264.              -cBBYn1             global back-busy, affects port 1
  1265.              -cBBY,FF0000FF      selective back-busy, affects both ports
  1266.                                       (timeslots 1..7 & 24..31)
  1267.              -cBBY,0000FFFFn0    selective back-busy, affects port 0
  1268.                                       (timeslots 1..15)
  1269.              -cBBY,FFFF0000n1    selective back-busy, affects port 1
  1270.                                       (timeslots 17..31)
  1271.         
  1272.         The  value  after the comma is a hexadecimal LONG  INTEGER.   The 
  1273.         least significant (rightmost) bit represents timeslot 0, and  the 
  1274.         most  significant  bit  (leftmost) bit  represents  timeslot  31, 
  1275.         however, as there is no Bearer Channel for timeslots 0 or 16, the 
  1276.         bits for those positions have no effect, and are ignored.
  1277.         
  1278.         
  1279.                          *              *              *
  1280.  
  1281.  
  1282. 
  1283.