search for: fsockopen

Displaying 20 results from an estimated 55 matches for "fsockopen".

2009 Oct 27
2
fsockopen-method in ROR
Hi, PHP has ''fsockopen''-function to create a socket connection. With what function I can create this connection in ROR? Thanks im Advance -- Posted via http://www.ruby-forum.com/.
2005 Dec 28
2
PHP Manager
Hi all, I have a small problem to execute Asterisk Commands in Asterisk Manager using PHP. I am able to run all Asterisk Manager command but the problem is comming with asterisk command. here is the code i am trying to run. <?php $socket = fsockopen("localhost","5038", $errno, $errstr, $timeout); fputs($socket, "Action: Login\r\n"); fputs($socket, "UserName: 1212\r\n"); fputs($socket, "Secret: 1212\r\n\r\n"); fputs($socket, "Action: Command\r\n"); fputs($socket, "Command: re...
2007 May 05
2
Manager API Output
...the QueueStatus and store the result in some text file for further processing. <?php $strHost = "127.0.0.1"; $strUser = "cron"; $strSecret = "1234"; $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: Login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, &qu...
2011 Aug 01
1
Problems with AMI connections (Asterisk 1.8.3.2)
...addr = 0.0.0.0 webenabled = no [mark] secret = mysecret permit=0.0.0.0/255.255.255.0 read = system,call,log,verbose,command,agent,user,originate write = system,call,log,verbose,command,agent,user,originate *This is my code in PHP*: <?php function ast_claves(){ $socket = fsockopen('192.168.25.18','5038',$errno,$errstr,10); fwrite($socket,"Action: Login\r\n"); fwrite($socket,"UserName: mark\r\n"); fwrite($socket,"Secret: mysecret\r\n\r\n"); fwrite($socket,"Action: DBPut\r\n...
2005 Jan 13
4
Manager API !!!!!!!!!
Hello all Has anyone had any success with the Manager API ? I am trying to check an extension status without too much luck I have the following <?php $fp = fsockopen("127.0.0.1", 5038, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "Action: Login\r\n"; $out .= "UserName: simon\r\n"; $out .= "Secret: xxxxxx\r\n\r\n";...
2005 Jul 01
1
astmanproxy
Hello, I want to recieve the output from astmanproxy in a php script. Is that possible ? I made a simple php script: <PRE> <?php $socket = fsockopen("127.0.0.1","1234", $errno, $errstr, $timeout); fputs($socket, "Action: Login\r\n"); fputs($socket, "UserName: xxx\r\n"); fputs($socket, "Secret: xxx\r\n\r\n"); fputs($socket, "Action: Command\r\n"); fputs($socket, "Command: Show Chan...
2007 Jul 06
1
Asterisk Manager
Hi this is my code for * manager: $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, &quo...
2007 Jul 08
1
Asterisk Help
...want to fetch 10 numbers one time and dial if gets connected and answered by customer wants to play a sequence of message . Please help . I've tried here is my code to place calls but in this I see no of failure calls are more than 50%. so please advise. $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, &quo...
2016 Oct 26
2
Problem setting up ssl connection
Hello I keep getting the following error when trying to connect to the Asterisk server using AMI : $socket = fsockopen("tls://11.22.33.44","5039", $errno, $errstr, 5); Erorr on CLI : [Oct 26 14:38:19] ERROR[2992]: tcptls.c:609 handle_tcptls_connection: Problem setting up ssl connection: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca [Oct 26 14:38:19] WARNING[2992]: tcptls...
2005 Jul 01
3
error while connecting from squirrelmail
...nd squirrelmail and I am trying to configure squirrelmail with dovecot as its imap server. When i disable "Secure Imap (TLS)" option (2-A-7) from squirrelmail configure menu, it's working fine. But when i try to enable tls support, squirrelmail is giving the following error: Warning: fsockopen(): unable to connect to 192.xx.xx.xx:993 in /usr/share/squirrelmail/functions/imap_general.php on line 445 ERROR Error connecting to IMAP server: tls://192.xx.xx.xx. 111 : Connection refused Go to the login page The port numbers of the imap server are as follows: imap_listen 143 pop3_listen 110...
2012 Dec 12
1
Asterisk 11 originate errors
...system,call,agent,user,config,command,reporting,originate ///AMI script <?php $sys_ip = "127.0.0.1"; $User_str = "faheem"; $Secret_str = "f at h33m112xxxxxx"; $phoneNumb = 1234; $dialNumb = ?4567; $spoofNumb = 786; $context = "xxxxx-xxxxx"; $oSocket = fsockopen($sys_ip, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $User_str\r\n"); fputs($oSocket, "Secret: $Secret_str\r\n\r\n"); fputs($oSocket, "Events: off\r\n\r\n"); fputs($...
2009 Dec 18
2
To Asterisk AMI Gurus - Tacking issue with originate
...<html> <head> <title>ClicknCall</title> </head> <body><br><br> <div align="center"> <?php $sys_ip = "127.0.0.1"; $User_str = "testphp"; $Secret_str = "testphp"; if ($_POST['x']) { $oSocket = fsockopen($sys_ip, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $User_str\r\n"); fputs($oSocket, "Secret: $Secret_str\r\n\r\n"); fputs($oSocket, "Events: off\r\n\r\n"); fputs($...
2005 Sep 06
4
PHP and ASterisk Manager
Guys, is anybody using PHP sockets to connect to the Manager and send command like "show voicemail users" for example or any other? My question is, how to parse the return info in a way that can be shown back to the user via web (discard all the manager responses not needed)? Thx in advance for any help you can provide.
2007 Dec 06
3
XenApi
...en-api.sock (or even 127.0.0.1:9363 for that matter). I can make a connection to both the unix socket and the inet socket and write/read data. The problem is i always get the same responce back, also the responce back is in html, shouldnt it be in xml format? At the moment this is my code $fp = fsockopen("unix:///var/run/xend/xen-api.sock", 0, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)\n"; } else { $request = xmlrpc_encode_request("session.login_with_password", array("root","none")); fwrite($fp, $request."\n&...
2011 Sep 02
5
how to add-edit-delete entery into asterisk conf files
...elete) into asterisk configuration files, like sip.conf, manager.conf,musiconhold.conf etc. Please guide me how to configure all these files from from AMI connection. I am able to login into AMI from Login action but I want to do more task in to it. *AMI login:- * *login.php* <?php $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 30); fputs($socket, "Action: Login\r\n"); fputs($socket, "UserName: root\r\n"); fputs($socket, "Secret: energy\r\n\r\n"); ?> *AMI command:-* Below commands are for musiconhold.conf. I want to add new MOH cont...
2009 Dec 23
1
AMI originate and PHP
...Please guide me how to do this properly. Following is the code and the context: $sys_ip = "127.0.0.1"; $User_str = "test"; $Secret_str = "test"; $phoneNumb = "14167777777"; $dialNumb = "14168888888"; $spoofNumb = "1416999999"; $oSocket = fsockopen($sys_ip, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $User_str\r\n"); fputs($oSocket, "Secret: $Secret_str\r\n\r\n"); fputs($oSocket, "Events: off\r\n\r\n"); fputs($...
2006 Dec 06
2
auth unix sockets
...th unix socket. As fas as I understood login must be sent in form "user\0\user\0password" as base64 encoded string. pp code (I'm using socket used by postfix auth): -------------------- <?php $authstr = base64_encode('test at virtual.net\0test at virtual.net\0test'); $fp = fsockopen("unix:///var/spool/postfix/private/auth",0, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "$authstr\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> --------------...
2003 Nov 02
3
PHP Manager examples
Anyone have any example scripts in PHP that connect to the manager? I'm not really a much of a programmer so I could use boost. Once I can figure out how to get it to login properly, I'll be ok from there. Thanks, Kevin _____________________________________________________________ Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com
2005 May 26
1
Little Php question
...stion > > > 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"); &...
2005 May 26
0
SV: Little Php question
...t - 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&quo...