CopiaFacts version 8 and later has optional built-in VoIP ports which can be used to implement IVR operations without voice hardware. Currently Copia VoIP ports provide connectivity only to gateways and VoIP PBXs which allow SIP registration to authenticate outbound calls and accept incoming calls. Configuration parameters for the built-in VoIP ports are specified on the $voip command.
The Copia VoIP ports allow inbound and outbound calls, message play and recording, and DTMF detection using RFC2833, SIPINFO or in-band detection. We strongly recommend using a service which provides DTMF using RFC2833. Recording to buffer and silence detection are not yet supported. "RFC2833" DTMF transmission is also known as RFC4733: the latter RFC supersedes the former.
In-band DTMF detection (tone analysis) is only supported if the variable VOIP_DTMF_INBAND is set to a non-empty value. Some SIP providers send RFC2833 DTMF signals out of sync with in-band DTMF tones and this can disrupt detection. Currently the detector defaults to suppressing detection of a repeated tone which arrives within 40ms of the previous tone. You can reduce this interval to 20ms with the VOIP_DTMF_MININTERVAL variable, but this may result in duplication of the tone when there is background noise or 'stuttering' which interrupts the detection. Even with the lower value, you may find that multiple instances of the same tone are detected as a single tone if they are keyed very fast.
We have found that with a few VoIP providers, the RFC2833 packets are sufficiently dis-ordered to allow some of the packets signaling a starting or continuing DTMF tone to follow the packets that signal its end. If this affects you, you can ignore the first packet that follows an 'end' packet by setting VOIP_DTMF_TRIGGER to a value of 2 (or 3 to ignore the first two packets). There are sometimes as few as six such packets, so do not use too high a value on this variable.
To use Copia VoIP ports they need to be added to your CopiaFacts license and then configured in the normal way as 'voice lines' using CFHWL. Channels configured to use VoIP ports can not also use any other voice/fax hardware or ports. In addition to the configuration you also need a $voip command in FAXFACTS.CFG to specify the gateway or PBX URI and login parameters.
The native voice format for Copia VoIP ports is the WAV16PCM8 voice format. Standard voice prompts for this format can be found in the FAXFACTS\WAV_8K_PCM folder, which must be specified as the folder for voice prompts and multi-segment files on the commands in the USR file(s) controlling operations on Copia VoIP ports. The format for recordings is selected automatically. Use the commands:
; VOIP.USR
$user_pb_dig @FFBASE\wav_8k_pcm\faxfactw.dig
$vmsg_dir @FFBASE\wav_8k_pcm
From build 8.1.0.102, if you use WAV files in an alternate format such as mulaw or alaw, they will be converted on the fly to PCM format.
![]() | You should only make use of this capability if your system is small (one or two ports only) and then only for very short prompts and if there is no possibility of converting them to the correct native format. Otherwise the conversion delays will be noticeable to callers. Recordings are saved only in WAV16PCM8 format. |
Copia VoIP ports set the normal DNIS and ANI variables for incoming calls. In addition the variables VOIP_FROM_NAME and VOIP_FROM_URI are set to the SIP Display Name of the caller and the full URI of the caller. The first 21 characters of the SIP Display Name are placed in the ANS CopiaFacts DBF log field (normally fax CSID answerback) for incoming VoIP calls. If present on an incoming call, the value of the P-Asserted-ID header is placed in variable VOIP_P_ASSERTED_ID.
To use DNIS to select a USR file for incoming calls, specify hardware DID type 3 and the number of DID digits presented by your gateway. The $dnis_scan command can be used to strip any leading characters from the DNIS string (some gateways present the full international number as DNIS).
Copia VoIP ports default to sending keep-alive messages to the remote server every 10 seconds. To suppress this, set an environment variable NO_VOIP_KEEPALIVE to a non-empty value, or define this on a $environment configuration command. In addition this suppresses the tracing of incoming keep-alive messages in CF9SIP output.
Tracing
To obtain a debugging log of VoIP operations, enable the following application names in FFTRACE. There are no files of this name but the keywords will enable VoIP debugging:
| CF9VOIP | Traces function calls and the notification of events to the main COPIAFACTS program |
| CF9SIP | Traces all SIP messages in and out. Only enable this tracing if you do not have complete output from Wireshark, which formats all the messages and makes them useful. |
| CF9DTMF | Traces DTMF analysis and processing. This is generally only needed when there are issues detecting DTMF keys. |
![]() | Note that 'low-level' tracing can create voluminous output and is not recommended except when requested by Copia support staff. |
The following table shows the types of trace output for each option:
Trace Type |
Trace |
Debug |
Low-Level |
|---|---|---|---|
CF9VOIP |
VoIP errors |
VoIP function details |
Inbound channel selection |
CF9SIP |
SIP errors |
SIP OPTIONS messages |
Detailed message setup |
CF9DTMF |
In-band DTMF detected |
RFC2833 messages |
Detailed audio analysis |