Skip to content

Instantly share code, notes, and snippets.

@EasyBB1
EasyBB1 / dscp-check-lin.sh
Created May 20, 2017 11:04
Check whether your internet provider blocks certain DSCP values. Script is for Linux.
#!/bin/bash
#echo > dscp.txt
for i in {0..63}
do
TOS=$(($i * 4))
ping -W 1 -c 1 -Q $TOS google.com.au > /dev/null
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "DSCP $i ToS $TOS: Passed!" # >> dscp.txt
else
@EasyBB1
EasyBB1 / dscp-check-win.bat
Last active May 20, 2017 11:08
Check whether your internet connection blocks certain DSCP values. Script to be run on a Windows computer. May not work on all Windows versions without ToS IP header registry hack.
@ECHO OFF
SETLOCAL EnableDelayedExpansion
ECHO. > dscp.txt
FOR /L %%A IN (0, 1, 63) DO (
SET /A tos = %%A * 4
ECHO DSCP %%A ToS !tos! >> dscp.txt
PING -n 1 -v !tos! google.com.au | FIND "TTL="
IF ERRORLEVEL 1 ( ECHO Failed >> dscp.txt ) ELSE ( ECHO Passed >> dscp.txt )
ECHO. >> dscp.txt)
@EasyBB1
EasyBB1 / radiolisten.lua
Last active April 2, 2025 00:50 — forked from moteus/radiolisten.lua
Radio Station listening for Freeswitch
-- Radio Station listening for Freeswitch
--
-- Dial Plan format
-- condition ^\*55(\d{2})$
-- action lua radiolisten.lua $1 shout (Argument 'shout' is optional)(You'll need mod_shout installed and loaded)
-- OR
-- action lua radiolisten.lua $1 vlc (Argument 'vlc' is optional)(If specified, you'll need mod_vlc installed and loaded)
--
-- radiostations.txt (see below for file format)
-- # Radiostation name