Skip to content

Instantly share code, notes, and snippets.

https://community.asterisk.org/t/call-detail-records-are-not-saving-in-cdr/76743/6
Install packages
apt-get install unixodbc-dev unixodbc-bin unixodbc
/etc/odbc.ini
[asterisk-mysql]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = asterisk
Server = localhost
@ca4ti
ca4ti / HowToOTG.md
Created November 29, 2021 00:24 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@ca4ti
ca4ti / asterisk-13.2.0-win.patch
Created November 29, 2021 12:49 — forked from meitinger/asterisk-13.2.0-win.patch
Compile guide for Asterisk on Cygwin.
diff -ru asterisk-13.2.0-orig/apps/Makefile asterisk-13.2.0-patched/apps/Makefile
--- asterisk-13.2.0-orig/apps/Makefile 2013-04-15 18:43:47.000000000 +0200
+++ asterisk-13.2.0-patched/apps/Makefile 2015-03-24 03:28:53.684406200 +0100
@@ -34,6 +34,6 @@
$(subst .c,.o,$(wildcard confbridge/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,app_confbridge)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
- LIBS+= -lres_features.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
+ LIBS+= -lres_stasis.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
LIBS+= -lres_smdi.so
@ca4ti
ca4ti / remotehintpoll.php
Created December 7, 2021 21:18 — forked from lgaetz/remotehintpoll.php
Simple PHP script that checks the extension status at a remote PBX and updates a custom hint on the local pbx for proper BLF operation.
<?php
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
* remotehintpoll.php
*
* Created by Lorne Gaetz [email protected]
*
* Latest version: https://gist.github.com/lgaetz/8545099
*
* Licensed under GNU GPL version 2 or any later verison.
@ca4ti
ca4ti / check-auth.py
Created December 9, 2021 13:26 — forked from 62mkv/check-auth.py
Python script to calculate SIP REGISTER Digest authentication (in order to check password validity)
from md5 import md5
# header from 401 response on REGISTER
# Authorization: Digest username="883140776410950", realm="gw_youmagic", algorithm=MD5, uri="sip:GW_Youmagic", nonce="1476157437:0a1418a40f8ee1c9a55f1587ab931c14", response="3ff479ccc24874f66aae45dac889d099"
login = '883140776410950'
uri = 'sip:GW_Youmagic'
nonce = '1476157437:0a1418a40f8ee1c9a55f1587ab931c14'
realm = 'gw_youmagic'
password = '----------'
@ca4ti
ca4ti / termux_mxrig.md
Created January 26, 2022 17:44 — forked from 2niuhe/termux_mxrig.md
install XMRig on termux

Monero XMR mining via termux ;ubuntu

  1. install ubuntu in termux command; (ubuntu is optional)
pkg install update && upgrade
apt install git
apt install wget
apt install proot
@ca4ti
ca4ti / build-gcc-offload-nvptx.sh
Created January 26, 2022 20:04 — forked from matthiasdiener/build-gcc-offload-nvptx.sh
Script to build gcc with OpenMP offloading to Nvidia devices (via nvptx)
#!/bin/bash
#
# Build GCC with support for offloading to NVIDIA GPUs.
#
set -o nounset -o errexit
# Location of the installed CUDA toolkit
cuda=/usr/local/cuda
@ca4ti
ca4ti / wine-breeze-dark-theme.md
Created September 20, 2022 08:21 — forked from Zeinok/wine-breeze-dark-theme.md
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@ca4ti
ca4ti / blcheck.sh
Last active September 22, 2022 10:29 — forked from Samgarr/blcheck.sh
Blacklist monitoring script for Zabbix.
#!/usr/bin/env bash
DEBUG="$2"
IP="$1"
blstatus=0
# RBL list from http://www.anti-abuse.org/multi-rbl-check/, slightly customized
RBL="bl.spamcop.net cbl.abuseat.org b.barracudacentral.org dnsbl.sorbs.net http.dnsbl.sorbs.net dul.dnsbl.sorbs.net misc.dnsbl.sorbs.net smtp.dnsbl.sorbs.net socks.dnsbl.sorbs.net spam.dnsbl.sorbs.net web.dnsbl.sorbs.net zombie.dnsbl.sorbs.net dnsbl-1.uceprotect.net dnsbl-2.uceprotect.net dnsbl-3.uceprotect.net bl.spamcannibal.org psbl.surriel.com ubl.unsubscore.com rbl.spamlab.com dyna.spamrats.com noptr.spamrats.com spam.spamrats.com cbl.anti-spam.org.cn cdl.anti-spam.org.cn dnsbl.inps.de drone.abuse.ch httpbl.abuse.ch dul.ru spamrbl.imp.ch wormrbl.imp.ch virbl.bit.nl rbl.suresupport.com dsn.rfc-ignorant.org ips.backscatterer.org spamguard.leadmon.net opm.tornevall.org netblock.pedantic.org black.uribl.com grey.uribl.com multi.surbl.org ix.dnsbl.manitu.net blackholes.mail-abuse.org rbl-plus.mail-abuse.org dnsbl.dronebl.org rbl.interserver.net query.senderbase.org bogons.cymru.co
@ca4ti
ca4ti / nginx-config-auth-cert-ssl.md
Created October 20, 2022 13:37 — forked from alexishida/nginx-config-auth-cert-ssl.md
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM