Page 1 of 1
PHP phone call with voice modem?
Posted: Sun Nov 07, 2004 1:31 pm
by sopinon
Hi there,
is it possible to make a phone call using php and a voice modem?
The php script should connect by a voice modem, and play a wav file or something like this. It would be perfect if the php script also alows acknowledgements like: "If you carry about it please press 1", "If you don't have time, please press 2" and so on...
Exists a class for this application?
Greets from Switzerland
Posted: Sun Nov 07, 2004 2:44 pm
by John Cartwright
That type of application I doubt exists in PHP as PHP requires the script to be parsed before any output.
Posted: Sun Nov 07, 2004 5:03 pm
by timvw
well, there is something like
http://www.voicexml.org.
you could use PHP to generate/interprete the xml that is needed for such an IVR
Posted: Sun Nov 07, 2004 7:49 pm
by BDKR
Well, I don't see why PHP couldn't at least make the call since you can open serial ports with it. As for understanding responses, it would take an extension to a sound lib of some sort no? If I'm not mistaken, there is an EAsound extension for PHP. I could be wrong. Check PECL.
Another possibility may be other sound command line tools.
But oh well...., just thinkin' out my butt.

Posted: Wed Nov 24, 2004 12:39 pm
by sopinon
Ok, I've tried to find something to open a serial connection to a voice modem.
This is all I've found:
Code: Select all
<?php
`mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off`;
$fp = fopen ("COM1:", "w+");
if (!$fp) {
echo "Uh-oh. Port not opened.";
} else {
$e = chr(27);
$string = $e . "A" . $e . "H300";
$string .= $e . "V100" . $e . "XL1SATO";
$string .= $e . "Q1" . $e . "Z";
echo $string;
fputs ($fp, $string );
fclose ($fp);
}
?>
But how can i dial a Number? Which string do i need? And is this String depending on the type of the Modem?
Posted: Wed Nov 24, 2004 12:44 pm
by Weirdan
[google]"at command list"[/google]
Posted: Wed Nov 24, 2004 12:45 pm
by Weirdan
Posted: Thu Nov 25, 2004 4:40 am
by sopinon
Weirdan wrote:[google]"at command list"[/google]
hmmmm....
it's very hard to find an example for a simple connection... Have anyone of you, already made something like this?
Posted: Thu Nov 25, 2004 8:12 am
by timvw
it's just ages ago that i did that kind of things... those days, mirc had a bug, so one could send COM1 ath0 or stuff like that
a little websearch on "calling modem at dt example" returns enough samples, not?