Skip to content

Instantly share code, notes, and snippets.

View cyanide-burnout's full-sized avatar

Artem Prilutskiy cyanide-burnout

View GitHub Profile
@cyanide-burnout
cyanide-burnout / asterisk-hook.php
Last active October 12, 2024 17:29
Retreive VoIP configuration from SFP ONU and MikroTik, then apply to Asterisk (triggered by dhcp-voip.rsc)
<?php
define('PJSIP_PEER_NAME', 'mgts');
define('PJSIP_PEER_FILE', '/etc/asterisk/pjsip-mgts.conf');
define('ONU_ADDRESS', '192.168.1.1');
define('ONU_USER', 'admin');
define('ONU_PASSWORD', 'admin');
define('ONU_COMMAND', '/sbin/omcicli mib get 00148');
@cyanide-burnout
cyanide-burnout / fix-docsis.rsc
Last active February 28, 2025 10:15
Automate switching Sagem F@ST DOCSIS modem to bridge mode on power cycling
:local password "password"
:global headers
:global header
:global cookie
:global index
:global data
:global key
:set data (([/tool fetch url=http://192.168.0.1/login.html output=user-with-headers as-value])->"data")