Hello! I'm working on setting up a FreeSWITCH/Flowroute fax server. The server is connected without any nat on a 20MB fiber internet connection. I've built some lua scripts that allow me to receive and send faxes and log all the faxes to a sqlite database. I even have a management script that can be called from the fs_cli to add fax2email routes and adjust settings. It's still a pretty rough implementation but overall it's working fairly well but I have two main questions that I hope someone could help me with.
1) I would like to detect "voice calls" or maybe I want to detect fax calls? There's a dialplan function to listen for and detect a fax caller but I'm having trouble implementing it in my lua script. It seems it's a non-blocking function, maybe? Because it just walks right over that line instead of waiting and listening for any fax tones. I thought it would block the script for x seconds and listen for a fax tone and return a result based on what it found. Can someone help me accomplish something similar to that?
2) So far, by far... my most common error is "The call dropped prematurely". I'm not sure how to start debugging the error to figure out what's causing it and how (if I can) solve it. I do have pcap's of the calls from pcapsipdump and I also have the freeswitch log of each call (my lua script pulls and saves that for each fax call). I've opened the pcap files up in wireshark but I don't know what I'm looking for and I think that might be over my head at the moment. Can anyone give me any help on what this error is normally caused by or what I could look for and/or test?
Here are a couple of example logs that ended with "The call dropped prematurely".