PHP script to dial phone number?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
RTAdams89
-


Joined: 06 Nov 2005
Posts: 102

PostPosted: Mon Jan 23, 2006 1:32 am    Post subject: PHP script to dial phone number? Reply with quote

My server has a voice modem attached to it. Would it be possible to use PHP so a person (on my network) could go to my website, type in a name, or number and then have the server dial that number?
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Jan 23, 2006 8:38 am    Post subject: Reply with quote

You would most likely have to have php load a seperate program and pass in the number to dial via a switch on the program.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Mon Jan 23, 2006 10:38 am    Post subject: Reply with quote

This pretty much tells you all you need to know.
You could use an external application too, but I can't think of any off hand.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Jan 23, 2006 2:51 pm    Post subject: Re: PHP script to dial phone number? Reply with quote

RTAdams89 wrote:
My server has a voice modem attached to it. Would it be possible to use PHP so a person (on my network) could go to my website, type in a name, or number and then have the server dial that number?


There is a sample script in PHP in http://www.aprelium.com/forum/viewtopic.php?p=35746#35746 .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
RTAdams89
-


Joined: 06 Nov 2005
Posts: 102

PostPosted: Mon Jan 23, 2006 3:07 pm    Post subject: Reply with quote

That looks a lot like what I want to do. I'm assuming the "5551234" is the number to be dialed. Could I replace that with a variable so the number can be changed? And with that, is there a way to have the modem hangup when another receiver on the line is picked up, or perhaps just after 7 seconds?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jan 24, 2006 1:12 pm    Post subject: Reply with quote

RTAdams89,

Yes this the phone number and it can be replace by a variable using something like:

Code:
fputs ($fp, "ATDT$number;");


where $number is a variable containing the phone number.

Regarding the rest of your question, we recommend checking the AT modem control sequences in http://en.wikibooks.org/wiki/Serial_Programming:Modems_and_AT_Commands .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
RTAdams89
-


Joined: 06 Nov 2005
Posts: 102

PostPosted: Wed Mar 01, 2006 3:49 am    Post subject: Reply with quote

I tried the script here: http://www.aprelium.com/forum/viewtopic.php?p=35746#35746 but it did not seam to do anything when i viewed the page. I changed the com port to com5 as that is my modem. Anything else I need to do?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Mar 01, 2006 4:51 pm    Post subject: Reply with quote

RTAdams89,

All depends on your modem configuration. If it is on COM5 then you'll have to change COM1 in the script with COM5. But apart from that, you'll probably have to track the possible error conditions/situations. The script we gave is very rudimentary. It's only to give you an idea about how you should call the modem from PHP.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
RTAdams89
-


Joined: 06 Nov 2005
Posts: 102

PostPosted: Wed Mar 01, 2006 5:56 pm    Post subject: Reply with quote

I don't seam to be getting any errors from abyss or PHP. The script appears to run fine, it just doesnt do anything for the modem.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Mar 02, 2006 12:32 pm    Post subject: Reply with quote

RTAdams89 wrote:
I don't seam to be getting any errors from abyss or PHP. The script appears to run fine, it just doesnt do anything for the modem.

We really have no clue on why it isn't working for you. What is your modem type/model?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group