Hylafax Mailing List Archives

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

Re: [hylafax-users] Problem with inbound routing, still



On 2004.07.13 13:07 hylafax-users-bounce@xxxxxxxxxxx wrote:
Hello, everyone again.

I still have a problem that if the sending side has no caller ID (NMBR
gets set to "<NONE>") faxGettyApp.c++ calls faxrcvd without the NDID
in
the last parameter field. This is becoming a critical problem for us,
as
a client is currently trying to test our call center (sending fax in
to
sign up, checking for turn around times). Can someone, who knows the
code, point me where I need to look (my C++ is unfortunately not much
existing).

In faxd/ClassModem.c++ in the ClassModem::waitForRings function you will find this code:


switch (atResponse(rbuf, conf.ringTimeout)) {
case AT_OTHER: // check distinctive ring
if (streq(conf.ringData, rbuf))
type = CALLTYPE_DATA;
else if (streq(conf.ringFax, rbuf))
type = CALLTYPE_FAX;
else if (streq(conf.ringVoice, rbuf))
type = CALLTYPE_VOICE;
else {
if (conf.ringExtended.length() && strneq(rbuf, conf.ringExtended, conf.ringExtended.length())) // extended RING
gotring = true;
conf.parseCID(rbuf, cid);
/* DID modems may send DID data in lieu of RING */
if ((cid.name.length() >= conf.cidNameAnswerLength &&
conf.cidNameAnswerLength > 0) ||
(cid.number.length() >= conf.cidNumberAnswerLength &&
conf.cidNumberAnswerLength > 0))
gotring = true;
break;
}


Basically that says that if we're waiting for rings and got a response from the modem and it was not a predefined command-response (i.e., "NMBR=<NONE>" is not pre-defined) then we check it against the RingData, RingFax, and RingVoice settings, and it it doesn't match those, then we check it against the RingExtended setting and then try to parse caller-id information from it with the parseCID function.

The parseCID function is found in faxd/ModemConfig.c++ and goes like this:

void
ModemConfig::parseCID(const char* rbuf, CallerID& cid) const
{
if (cidName.length() && strneq(rbuf, cidName, cidName.length()))
cid.name = cid.name | rbuf+cidName.length();
if (cidNumber.length() && strneq(rbuf, cidNumber, cidNumber.length()))
cid.number = cid.number | rbuf+cidNumber.length();
}


It's fairly straight-forward. If the first characters of the response match the CIDName and/or CIDNumber settings then the remainder of the response is assigned to the CIDName and CIDNumber "variables" accordingly.

You probably want to add debugging statements to even check to see if parseCID is being called when "NMBR=<NONE>" is received from the modem; my guess would be that it is not, and that would be some problem with waitForRings, I'd think.

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*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services