Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

jueves, 16 de abril de 2015

AMI ORIGINATE PHP

<?php

$pbx="localhost";

$pbx="localhost";

$trunk="cpeak";

$src=$_GET[src];

$dest=$_GET[dest];


$callerid=$_GET[cid];

$message=$_GET[code];





////////////////////////////////////////////////////

  $socket = fsockopen($pbx,"5038", $errno, $errstr, $timeout);
 fputs($socket, "Action: Login\r\n");
 fputs($socket, "UserName: admin\r\n");     //
 fputs($socket, "Secret: 1234\r\n\r\n");  //
                                            //
              $wrets=fgets($socket,128);
              echo $wrets;
              fputs($socket, "Action: Originate\r\n" );
               fputs($socket, "Channel: SIP/$trunk/$dest\r\n" );
                fputs($socket, "Application: Saydigits\r\n" );
               fputs($socket, "Data: $message\r\n" );
              fputs($socket, "CallerID: $callerid\r\n" );
                fputs($socket, "Variable: __var1=$src\r\n" );
              fputs($socket, "Variable: __var2=$dest\r\n" );
              fputs($socket, "Async: yes\r\n\r\n" );
              fputs($socket, "Action: Logoff\r\n\r\n");
 sleep (1);
 $wrets=fgets($socket,128);


//////////////////////////////////////////////

?>


/

http://165.11.118.32/webcall.php?dest=01161285411381&cid=18007142020&code=4563









No hay comentarios:

Publicar un comentario