SV: [Asterisk-Users] Little Php question

Dmitry Zhukovski DZH at comx.dk
Thu May 26 03:03:16 MST 2005


Hi 

I think you should have a look at the end of line - you are missing " :-)

Br,
dmirty

 
-----Oprindelig meddelelse-----
Fra: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] På vegne af Ronald
Sendt: 26 May 2005 11:47
Til: Asterisk Users Mailing List - Non-Commercial Discussion
Emne: [Asterisk-Users] Little Php question

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

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list