[Asterisk-Users] Little Php question
Ronald
asterisk107 at gmail.com
Thu May 26 02:46:56 MST 2005
Hi
I'm trying to make a call from a local webpagee through my xlite softphone
(xlite1)
BTW when I'm trying to do it through telnet it works
For this I'm using a php script I found
<PRE>
<?php
$socket = fsockopen("192.168.1.1","5038");
$uname = "test";
$secret = "test";
#$exten = 12345678;
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: $uname\r\n");
fputs($socket, "Secret: $secret\r\n\r\n");
# fputs($socket, "\r\n");
# fputs($socket, "\r\n\r\n");
fputs($socket, "Action: Originate\r\n");
fputs($socket, "Channel: SIP/xlite1\r\n");
fputs($socket, "Context: mainmenu\r\n\");
fputs($socket, "Exten: 12345678\r\n\);
fputs($socket, "Priority: 1\r\n");
fputs($socket, "Callerid: webcall\r\n\r\n");
fputs($socket, "\r\n\r\n");
fputs($socket, "Action: Logoff\r\n\r\n");
while (!feof($socket)) {
$wrets .= fread($socket, 8192);
}
fclose($socket);
?>
</pre>
When starting the script I get a parse error (unexpected t_string) in line
15 which is the Exten line
Can anybody help me out. (I have minimal php knowledge, so Im turning to you
all)
Thanks in advance
Ronald
More information about the asterisk-users
mailing list