Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] voice prompt playback before DTMF read?
Ivan Petrov wrote:
I am trying to implement DTMF recognition in order to better route
inbound faxes. So far I managed to get HylaFAX to wait and read the
DTMF response.
What happens is modem picks up, waits for the DTMF entry then receives
the fax, Notification email after fax is received contains CallID3
entry with the DTMF responce entered, which is exactly what should be
happening. This is great. However - if sending party does not enter
the necessary count of DTMF digits hylafax closes the connection
without receiving a fax.
Yes, I am very familiar with the situation.
I have two questions:
1) Is it possible after specific time-out fax to be received no matter
DTMF has not been entered?
Yes. (See below...)
2) Is it possible to playback a greeting uppon line is answered to
prompt sender to punch the x-digit code before submit?
Yes.
Both of these features were added to HylaFAX 4.2.3.1 (found at
http://hylafax.sourceforge.net) and are now also available in 4.2.4.1.
The time-out part is not currently configurable (it's hard-coded at like
10 seconds if I remember correctly), but it will automatically bypass
DTMF detection if fax tones are heard. In those cases the CallID for
SHIELDED_DTMF will be whitespace for however many number of digits the
answer-length is (i.e. " ").
The voice part is a bit more tricky. The man page says this about the
new "play" command-escape-string feature:
-----------------------------------------
The "<play:C>" escape can be used to play a raw audio file with a voice
modem. The files are named etc/playC.raw where "C" is any character.
This feature can be used, for example, to play a brief audio message
after picking up the line but before answering. A configuration example
may be:
ModemRingResponse:
"AT+FCLASS=8;H1\nAT+VSM=131\nAT+VLS=1\nAT+VTX\n<waitfor:CONNECT><play:1><waitfor:OK>AT+VTS=[933,,150]"
ModemAnswerCmd: "<delay:100>AT+FCLASS=1;A"
CallIDPattern: SHIELDED_DTMF
CallIDAnswerLength: 4
In this example using an IS-101 voice-compliant modem, a RING indication
from the modem will cause the modem to be placed in voice mode, set ulaw
audio compression, and via the connected phone line play back the
etc/play1.raw audio file, which may say, "After the tone enter a
four-digit extension, then start the fax." Following the message a tone
is played.
-----------------------------------------
The reason this is "tricky" is because you have to develop that
ModemRingResponse yourself based on your modem commands per your manual
and you have to generate that etc/play1.raw file yourself based on the
settings used in that ModemRingResponse.
I developed that example with a MultiTech MT5634ZBA-V92, so chances are
good that it will work for you also. However, I'd recommend first start
testing without the "<play:1>" part (which, when omitted, will work with
any version of HylaFAX). You'll not get any voice prompt, but you will
get a "beep" tone, and that will tell you that things are working up to
that point.
Generally, to generate the etc/playC.wav file you'd take any regular WAV
file that you want to be your voice prompt and then you would use
something like sox to convert it into raw digital audio, probably
slinear, uLaw, or aLaw at 8000KHz or something. The "format" of the raw
audio data in that file that you use will depend on the commands you use
in the ModemRingResponse. In this case the governing command is
"AT+VSM=131" which is explained by "AT+VSM=?" to be 8-bit uLaw at
8000KHz. So the sox command would be something like this:
sox your_file.wav -U -b -r 8000 -c 1 play1.raw
Then you copy that play1.raw file to /var/spool/hylafax/etc/, and then
you'd add the "<play:1>" part to the ModemAnswerCmd, restart faxgetty,
and then try it again.
Hope this helps,
Lee.
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*