This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Action: Login | |
| Username: USER | |
| Secret: PASSWORD | |
| ActionID: 0 | |
| Asterisk Call Manager/5.0.3 | |
| Response: Success | |
| ActionID: 0 | |
| Message: Authentication accepted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from settings import login, connection | |
| from asterisk.ami import AMIClient,AutoReconnect | |
| def ami_disconnected(client, response): | |
| print(f"The AMI has disconnected: {response}") | |
| def event_notification(source, event): | |
| print(f"Event: {event}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| sudo apt update | |
| sudo apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 | |
| curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
| sudo apt update | |
| sudo apt install docker-ce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Disable root login | |
| sed -i -z 's/PermitRootLogin yes\|$/PermitRootLogin no/' /etc/ssh/sshd_config | |
| sed -i -z 's/#PasswordAuthentication yes\|$/PasswordAuthentication no/' /etc/ssh/sshd_config | |
| # Update and install packages | |
| apt update | |
| apt upgrade -y | |
| apt install -y\ |
NewerOlder