HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] voice prompt playback before DTMF read?



Hi Lee,

Today I tried the latest HylaFAX 4.2.5 and I got the following error report in /var/log/messages:

Jan 30 12:56:51 faxserver FaxGetty[10681]: Unknown AT escape code "play:1"
Jan 30 12:56:51 faxserver FaxGetty[10681]: OPEN /dev/ttyS4 HylaFAX (tm) Version 4.2.5
Jan 30 12:57:00 faxserver FaxGetty[10681]: MODEM LT V.92 1.0 MT5634ZPX-PCI-U INTERNAL DATA/FAX/VOICE MODEM VERSION 1.32K LT V.92 1.0 MT5634ZPX-PCI-U Internal Data/Fax/Voice Modem Version 1.32k/


And of course I don't hear the voice prompt.
Did play command make it to the production release (<play:1> command) or I have to use the development release?


Regards,
Ivan

----- Original Message ----- From: "Ivan Petrov" <ivanp@xxxxxxxxxxxxx>
To: "Lee Howard" <faxguy@xxxxxxxxxxxxxxxx>
Cc: <hylafax-users@xxxxxxxxxxx>
Sent: Wednesday, January 04, 2006 4:31 PM
Subject: Re: [hylafax-users] voice prompt playback before DTMF read?



Thanks for the great answer Lee!

About my qestion 1) - The hylafax version I'm using is hylafax-4.2.3-1rhel3 (got it as precompiled RPM). I assume this is 4.2.3.1 you are refering to, so DTMF timeout feature should be in (as well as the voice - right?).
What happens when I try to send fax not entering the expected DTMF sequence is - hylafax answers, fax tones are definitely heard (fax request), but after about 30 seconds hylafax hangs up. Log file follows:


Jan 4 16:25:29 faxserver FaxGetty[2692]: ANSWER: Call ID 1 "4161111111"
Jan 4 16:25:29 faxserver FaxGetty[2692]: ANSWER: Call ID 2 "xxxxxxxxxxxx"
Jan 4 16:25:29 faxserver FaxGetty[2692]: ANSWER: Call ID 3 ""
Jan 4 16:25:48 faxserver FaxGetty[2692]: MODEM LT V.92 1.0 MT5634ZPX-PCI-U INTERNAL DATA/FAX/VOICE MODEM VERSION 1.32K LT V.92 1.0 MT5634ZPX-PCI-U Internal Data/Fax/Voice Modem Version 1.32k/


The config file I'm using is:

CountryCode:            1
AreaCode:               416
FAXNumber:              +1.416.111.1111
LongDistancePrefix:     1
InternationalPrefix:    011
DialStringRules:        etc/dialrules
ServerTracing:          1
SessionTracing:         11
RecvFileMode:           0600
LogFileMode:            0600
DeviceMode:             0600
SpeakerVolume:          yes
GettyArgs:              "-h %l dx_%s"
LocalIdentifier:        FAX
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"
MaxRecvPages:           25
#

ModemType: Class1 # use this to supply a hint
ModemFlowControl: rtscts # many firmwares have broken software flow control
Class1TMConnectDelay: 400 # counteract quick CONNECT response


# If your line supports Caller-ID, you may want to uncomment this...
ModemResetCmds: AT+VCID=1
CallIDPattern:  "NMBR="
CallIDPattern:  "NAME="
RingsBeforeAnswer:      2

CallIDPattern:          SHIELDED_DTMF
CallIDAnswerLength:     4
ModemRingResponse:      AT+FCLASS=8;H1
ModemAnswerCmd:         <delay:100>AT+FCLASS=1;A

Regards,
Ivan


----- Original Message ----- From: "Lee Howard" <faxguy@xxxxxxxxxxxxxxxx>
To: "Ivan Petrov" <ivanp@xxxxxxxxxxxxx>
Cc: <hylafax-users@xxxxxxxxxxx>
Sent: Wednesday, January 04, 2006 4:12 PM
Subject: 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*





____________________ 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*





____________________ 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*




Project hosted by iFAX Solutions