Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrius Kairiukstis andrius

View GitHub Profile
View logs.txt
freeswitch@dev-voice>
error: tport_logging: capture socket error: No error information
2021-05-14 11:49:22.883128 [NOTICE] switch_channel.c:1118 New Channel sofia/internal/USR-7800c431-e6bf-4af0-9bf7-e03b4bd9ca4f@dev-voice.app.mobitalk.io [e2a313f6-36a4-4c4f-b246-6663dbe6772f]
2021-05-14 11:49:22.883128 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/USR-7800c431-e6bf-4af0-9bf7-e03b4bd9ca4f@dev-voice.app.mobitalk.io) Running State Change CS_NEW (Cur 1 Tot 24)
2021-05-14 11:49:22.883128 [DEBUG] sofia.c:10279 sofia/internal/USR-7800c431-e6bf-4af0-9bf7-e03b4bd9ca4f@dev-voice.app.mobitalk.io receiving invite from 172.18.0.2:41880 version: 1.10.3 -release 64bit
2021-05-14 11:49:22.883128 [DEBUG] sofia.c:10373 verifying acl "domains" for ip/port 172.18.0.2:0.
2021-05-14 11:49:22.883128 [DEBUG] sofia.c:10402 IP 172.18.0.2 Approved by acl "domains[]". Access Granted.
2021-05-14 11:49:22.883128 [DEBUG] sofia.c:11476 Setting NAT mode based on via received
2021-05-14 11:49:22.883128 [DEBUG] sofia.c:7325 Channel
@andrius
andrius / keybase.md
Last active Nov 4, 2020
keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am andrius on github.
  • I am andrius_kai (https://keybase.io/andrius_kai) on keybase.
  • I have a public key whose fingerprint is 5C74 52AF 3515 361A 29AA FDE2 C7F7 E072 25E1 DD9C

To claim this, I am signing this object:

@andrius
andrius / terminate-calls-after-timeout.md
Last active Oct 27, 2019
Script to terminate Asterisk PBX calls after the timeout
View terminate-calls-after-timeout.md

Initial steps:

Following command will print out details of all active calls:

asterisk -rx "core show channels concise"
# Output:
# SIP/alice-00000002!asterisk.cr!!1!Up!Echo!!!!!3!77!!1572188916.4
@andrius
andrius / description.md
Last active Sep 30, 2019
Loopback SIP calls with Asterisk PBX
View description.md

Loopback SIP call with Asterisk

Reason

I need it for testing of new AMI/AGI/ARI library with crystal-lang;

Demo

asciicast

@andrius
andrius / # crystal - 2019-08-10_14-47-32.txt
Created Aug 10, 2019
crystal on Debian GNU/Linux 10 (buster) - Homebrew build logs
View # crystal - 2019-08-10_14-47-32.txt
Homebrew build logs for crystal on Debian GNU/Linux 10 (buster)
Build date: 2019-08-10 14:47:32
@andrius
andrius / # crystal - 2019-08-10_14-30-50.txt
Created Aug 10, 2019
crystal on Debian GNU/Linux 9.9 (stretch) - Homebrew build logs
View # crystal - 2019-08-10_14-30-50.txt
Homebrew build logs for crystal on Debian GNU/Linux 9.9 (stretch)
Build date: 2019-08-10 14:30:50
@andrius
andrius / # crystal - 2019-08-10_13-44-09.txt
Created Aug 10, 2019
crystal on Debian GNU/Linux 9.9 (stretch) - Homebrew build logs
View # crystal - 2019-08-10_13-44-09.txt
Homebrew build logs for crystal on Debian GNU/Linux 9.9 (stretch)
Build date: 2019-08-10 13:44:09
View embedded_hash.rb
require 'pp'
def embedded_hash(levels, key, data)
if levels == 0
{key => data}
else
{key => embedded_hash(levels-1, key, data)}.merge(data)
end
end
View 1-backup.sh
# docker volume name databases_mysql
docker run -ti --rm \
-v databases_mysql:/volume \
-v ${PWD}:/backup alpine \
tar -cjf /backup/databases_mysql.tar.bz2 -C /volume ./
@andrius
andrius / docker-volume-migration.md
Last active Jul 1, 2022
#howto rename #docker volume
View docker-volume-migration.md

Say, folder with docker-compose files was renamed or we do merging volumes etc. Then we shall rename docker volume. Because docker natively does not support renaming, we shall create it, then copy data, then inspect new volume, test and delete old one at the end

Volumes:

docker volume ls