![]() |
The problem is when I try to do DID. I was having problems with hylafax sending the command then then erroring out after the modem responds back with "OK".
I have
read through the Bug list for DID and it seems there was a patch a
while back to allow DID (with AT>DT1 on the Modem). I also noticed
that there was an update to that same piece of code at a later date
that changed the
"atCmd(conf.ringResponse);" line to "atCmd(conf.ringResponse, AT_NOTHING);".
<-- AT command --> CallID data (DID or Caller*ID) --> OK
<-- AT command --> OK --> CallID data (DID or Caller*ID)
--- hylafax-4.2.1.orig/faxd/ClassModem.c++ Mon Mar 21 08:20:26 2005 +++ hylafax-4.2.1/faxd/ClassModem.c++ Mon Mar 21 17:52:36 2005 @@ -1340,12 +1340,13 @@ atCmd(conf.ringResponse, AT_NOTHING); ATResponse r; time_t ringstart = Sys::now(); - bool callidwasempty = true; + bool callidwasempty = true, gotok = false, answertrigger = false; for (int i = 0; callidwasempty && i < callid.size(); i++) if (callid.length(i) ) callidwasempty = false; do { r = atResponse(rbuf, 3000); + if (r == AT_OK) gotok = true; if (r == AT_OTHER && callidwasempty) { /* * Perhaps a modem will repeat CID/DID info for us @@ -1353,7 +1354,11 @@ */ conf.parseCallID(rbuf, callid); } - } while (r != AT_OK && (Sys::now()-ringstart < 3)); + for (int i = 0; i < conf.idConfig.length(); i++) { + if (conf.idConfig[i].answerlength && callid.length(i) >= conf.idConfig[i].answerlength && gotok) + answertrigger = true; + } + } while (!answertrigger && (Sys::now()-ringstart < 3)); for (int i = 0 ; i < conf.idConfig.length(); i++) { if (conf.idConfig[i].pattern == "SHIELDED_DTMF") { // retrieve DID, e.g. via voice DTMF ringstart = Sys::now();