[Asterisk-Users] Little Php question

Anton Krall akrall-lists at intruder.com.mx
Thu May 26 06:37:07 MST 2005


You are missing a " at the end of that line :)D 

|-----Original Message-----
|From: asterisk-users-bounces at lists.digium.com 
|[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ronald
|Sent: Jueves, 26 de Mayo de 2005 04:47 a.m.
|To: Asterisk Users Mailing List - Non-Commercial Discussion
|Subject: [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