Set Transfer Call to allow DTMF interrupt

$allow_interrupt [inbound|both|outbound] ["DTMF" [timeout]]

This command causes a linked-line connection (Dialogic SC-Bus link or Diva Line Interconnect) to be interrupted by a DTMF key, on either the original line (usually, an inbound call line) or on the second line. It only has effect in a $type transfer infobox. When the link is terminated in this way, the LINK_TERM variable has the value 4 or 5.

When this command is used with only one parameter, any DTMF tone will terminate the link.  When a list of DTMF tone digits is provided, the link is only broken either when a specified single tone is detected, or when a specified pair of tones in quick succession is detected.

The command has a secondary purpose when the variable LINK_DTMF_RECORD has been used to specify a recording file for the link.  In this case the detection of the first or only DTMF key or key-pair will cause the recording to be started, and will not break the link.

The parameters on this command are used as follows:

inboundthis keyword causes the DTMF to be detected only when keyed on the inbound connection. This is the default if the command has no parameters at all.
outbound this keyword causes DTMF to be detected only when keyed on the outbound connection.
both this keyword causes DTMF to be detected when keyed either on the outbound or the inbound connection.
DTMFa string of blank-separated DTMF characters or character-pairs, in quotes if there is more than one entry. If specified, the link is only terminated when one of the listed DTMF tones or tone pairs is detected. If a single tone digit is included in the list, no pair should start with that digit. Up to fifty blank-separated break specifications are allowed.
timeoutthe maximum time in milliseconds between successive DTMF keys to allow them to be treated as a 'pair'. If not specified, the value of 1000 is used (one second).

After the tones have been detected, the DTMF value(s) will be placed in system variable BREAK_DTMF for the inbound call, whichever half of the call terminated the link. This system variable is accessible in state LINK_FINISH (if trapped) or before any subsequent link, on the incoming line. The keyed digits are cleared from the DTMF buffer so do not appear on the next DTMF operation.  The keys used to start a recording will also be placed in BREAK_DTMF even though they do not break the link.

Default: DTMF is ignored during a linked-line call.

Example:

Break the link either on a pair of DTMF star tones or a single DTMF pound/hash tone.

; dotransfer.iif

$type transfer

$allow_interrupt inbound "** #" 1500

$set_state s:LINK_FINISH breakdtmf

$dial_cmd 6303886900 callp OUTBOUND 1-30

$error_exit noxfer

$next_box donexfer

; breakdtmf.iif

$type decision

$if @LINK_TERM = 4          ; call ended on DTMF

  $if @BREAK_DTMF = **      ; double star keyed

    ....

  $elseif @BREAK_DTMF = #   ; single pound keyed

    ....

  $endif

$endif