Soporte & Consultoria

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

miércoles, 22 de agosto de 2018

FreePBX session unlock ( reset password)

Unlock

fwconsole unlock xxxxxxxxxxxxxxxx- The fwconsole unlock command will unlock the GUI login of FreePBX to let you into the FreePBX GUI without the username and password.  This is handy if you lost or misplaced your FreePBX GUI username or password and need to get into the GUI to change or setup a new user.  You need to replace the xxxxxxx with your PHP session ID.  Follow the steps below.
  • Bring up the main login page to FreePBX in your browser.  Such as http://192.168.0.2/admin
  • Do a "ctrl a" to highlight the whole page and look to the left center of the screen for some text.  This is your unique php session ID.  Copy this into your clipboard.
  • Go into the linux CLI and type the following command replacing the session ID below with your own.
    [root@localhost ~]# fwconsole unlock ppnr8l1vle32s3q8b79s4n1sp7
    Please wait...
    session unlocked!
    [root@localhost ~]#
  • Go refresh your browser page and it will log you in this one time automatically for you based on that php session ID. Now you can go add or change the FreePBX admin users.
  • https://wiki.freepbx.org/pages/viewpage.action?pageId=37912685#fwconsolecommands(13+)-Unlock

lunes, 6 de agosto de 2018

php mailer asterisk

<?php
$path=$argv[1];
$email=$argv[2];
$subject=$argv[3];
$body=$argv[4];
//**** email confg ****//
require "PHPMailerAutoload.php";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->Username = "asterisk@gmail.com";
$mail->Password = "12340";
$mail->CharSet = 'windows-1250';
$mail->SetFrom ('System@gmail.com', 'YPhoneSystem');
$mail->AddAddress ("$email");
$mail->Subject = "$subject";
$mail->ContentType = 'text/plain';
$mail->IsHTML(true);
$mail->Body = "$body ";
$mail->AddAttachment($path);
if($mail->Send()) {
echo " email sent ";
}
else {
echo " email sent failed ";
}
?>
/var/lib/asterisk/agi-bin
php email.php /var/lib/asterisk/sounds/en/ivr/custom/1533559466.97264.wav ambiorixg12@gmail.com " Test Subject" " Test Body";
exten => 3,1,Set(path=/var/lib/asterisk/sounds/en/ivr/custom)
same=>n,playback(/var/lib/asterisk/sounds/en/ivr/Please_Leave_A_Msg_After)
same=>n,Record(${path}/${UNIQUEID}.wav,,30,yk)
;same=>n,System(echo "Subject hachzukas option 3 ${CALLERID(num)}" | mail -a ${path}/${UNIQUEID}.wav -s "Subject hachzukas option 3" yss@viznitzny.com)
same=>n,system(php /var/lib/asterisk/agi-bin/email.php ${path}/${UNIQUEID}.wav ambiorixg12@gmail.com " option 3" " option 3")
same=>n,playback(/var/lib/asterisk/sounds/en/ivr/Thanks_For_The_Msg)
same=>n,Goto(ivr-payment-hachzukas,s,1)