I am using the following code to send a fax via VFP:

lo_f = createobject("faxserver.faxserver")
lo_f.connect("")
lo_d = lo_f.createdocument(ofile)
lo_d.faxnumber = alltrim(g_fax)
lo_d.send
lo_f.disconnect
release lo_f

However, as soon as this code executes, the modem starts dialing the phone
# without checking if there is dialtone or if the line is being used. I
have checked my modem properties to make sure the item 'Wait for dialtone
before dialing' is checked. Is there any other way to make sure that the
program checks for an "available" line before dialing?

Thanks

Zoom

Re: Any way in VFP to make sure phone line is available before dialing a fax? by Mark

Mark
Mon Oct 01 00:44:54 PDT 2007

Zoom

It is possible to detect a dial tone via the Tapi interface. however i
believe i read somewhere that when you attempt this with a modem it does not
work due to problems with the modem hardware. You might like to check that
on the Tapi Newsgroup.

"Zoom" <keashdoc@hotmail.com> wrote in message
news:SqqdnbN4DP_i8J3anZ2dneKdnZydnZ2d@comcast.com...
>I am using the following code to send a fax via VFP:
>
> lo_f = createobject("faxserver.faxserver")
> lo_f.connect("")
> lo_d = lo_f.createdocument(ofile)
> lo_d.faxnumber = alltrim(g_fax)
> lo_d.send
> lo_f.disconnect
> release lo_f
>
> However, as soon as this code executes, the modem starts dialing the
> phone # without checking if there is dialtone or if the line is being
> used. I have checked my modem properties to make sure the item 'Wait for
> dialtone before dialing' is checked. Is there any other way to make sure
> that the program checks for an "available" line before dialing?
>
> Thanks
>
> Zoom
>
>
>



Re: Any way in VFP to make sure phone line is available before dialing by Man-wai

Man-wai
Mon Oct 01 01:06:47 PDT 2007

> However, as soon as this code executes, the modem starts dialing the phone
> # without checking if there is dialtone or if the line is being used. I
> have checked my modem properties to make sure the item 'Wait for dialtone
> before dialing' is checked. Is there any other way to make sure that the
> program checks for an "available" line before dialing?

If you talk directly to the modem (via MSCOMM32 ActiveX control), you
could use "ATDT12345678" to dial to the destination. The modem would
respond either "NO CARRIER" or "BUSY" if the line is not available.

If it responsed "CONNECT", then you could terminate the connection, and
call that "faxserver.faxserver" immediately.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 16:03:01 up 5 days 18:53 0 users load average: 1.00 1.05 1.07
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Any way in VFP to make sure phone line is available before dialing by Man-wai

Man-wai
Mon Oct 01 02:12:54 PDT 2007

> If it responsed "CONNECT", then you could terminate the connection, and

To terminate, send "ATH" to the modem (can't quite remember since it's
been nearly 10 years since I used a serial modem).

> call that "faxserver.faxserver" immediately.
>


--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 17:11:01 up 5 days 20:01 0 users load average: 1.05 1.04 1.06
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Any way in VFP to make sure phone line is available before dialing by Man-wai

Man-wai
Mon Oct 01 07:44:48 PDT 2007

> To terminate, send "ATH" to the modem (can't quite remember since it's
> been nearly 10 years since I used a serial modem).

I think it should be "ATH0". Can't quite remember... Hayes modem
commands. :)


--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 22:44:01 up 6 days 1:34 0 users load average: 1.07 1.06 1.07
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Any way in VFP to make sure phone line is available before dialing by Beverly

Beverly
Mon Oct 01 08:22:51 PDT 2007

There is a "S Register" that controls if the modem will dial if there is
no dialtone... google time... you will set it in an init string such as

ATSx=y<cr>

before issuing the dial string.

Beverly Howard

Re: Any way in VFP to make sure phone line is available before dialing by Man-wai

Man-wai
Tue Oct 02 02:09:58 PDT 2007

Beverly Howard [Ms-MVP/MobileDev] wrote:
> There is a "S Register" that controls if the modem will dial if there is
> no dialtone... google time... you will set it in an init string such as
>
> ATSx=y<cr>

Another solution is to use email-fax gateways.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 17:09:01 up 6 days 19:59 1 user load average: 0.04 0.08 0.03
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Any way in VFP to make sure phone line is available before dialing by Man-wai

Man-wai
Tue Oct 02 02:10:45 PDT 2007


And if your client uses linux servers, Hylafax server... :)

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.8
^ ^ 17:10:01 up 6 days 20:00 1 user load average: 0.01 0.06 0.03
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk