OpenSIPS: dialplan module usage examples

December 8th, 2024

Use case 1:
convert the username consisting of letters in incoming INVITE from your VoIP provider to digits
(e.g. INVITE: rt_user1@192.168.1.203 -> INVITE: 13511654321@192.168.1.203, where country-city-subscriber is 1-3511-654321):

Add to your dialplan table:

So, the SQL record is as follows:

Read the rest of this entry »

Linux Application Firewall

December 4th, 2024

OpenSnitch – a Linux firewall for applications – interactive outbound connections filtering.
https://www.linux-magazine.com/index.php/Issues/2022/259/OpenSnitch
https://github.com/evilsocket/opensnitch

A Bash web server

December 4th, 2024

Nice oneliners which may be useful to show some console output via HTTP.

An example of showing the iptables FORWARD chain:

Then go to http://ip.add.re.ss:8080 and you will see the output as a web page. In case of adding new rules renew the webpage and you will see the newly added rules.

To report file system disk space usage:

More info: https://www.linux-magazine.com/Issues/2021/250/Bash-Web-Server/(offset)/3/(tagID)/92#

Slackware Tagfiles

October 12th, 2024

Found some old notes concerning tagfiles. This all is for Slackware 14, but mainly should be useful for newer versions as well, though may have differences, I haven’t checked and compared. See below…

Read the rest of this entry »

opensips: getting media IP

June 9th, 2024

To get the IP address from the SDP part of incoming INVITE:

http://lists.opensips.org/pipermail/users/2024-June/048189.html

NetBSD 10: httpd with PHP support

April 24th, 2024

By default httpd is run under _httpd user. To start from command line and specify another user (e.g. nobody) type:

To start httpd automatically, edit /etc/rc.conf (not /etc/rc.local , not /etc/defaults/rc.conf):

Ubuntu 20.04 remove old unused kernels

April 13th, 2024

https://askubuntu.com/a/1253348

Check what current kernel You are running:

So, this system runs 5.6.13-050613-lowlatency kernel.

List all installed kernels in Your OS:

Uninstall kernels You don’t need:

flameshot

March 10th, 2024

flameshot – a good alternative for Deepin Screenshot which seems to be unavailable in *buntu 23.10

OpenSIPS dispatching algorithms

February 20th, 2024

Just some explanation of dispatcher module argorithms.

hash over callid – ensures that all requests within a dialog goes to same box
hash over from uri – ensures that all requests from same user goes to same box
hash over to uri – ensures that registrations of an AoR goes to same box
hash over request-uri – ensures that requests to same destination are processes by same box
#hash over config variable – for different needs

NetBSD useful links

February 20th, 2024

https://netbsd.org/docs/guide/en/chap-boot.html#chap-boot-keyboard-layout

https://netbsd.org/docs/guide/en/chap-boot.html#chap-boot-system-time

https://netbsd.org/docs/guide/en/chap-boot.html#chap-boot-mount-cdrom

https://netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc

https://netbsd.org/docs/misc/index.html#wifi

https://netbsd.org/docs/misc/index.html#package-management

https://netbsd.org/docs/misc/index.html#installing-rootcerts

https://netbsd.org/docs/misc/index.html#managing-services

https://netbsd.org/docs/misc/index.html#run-on-startup

https://netbsd.org/docs/misc/index.html#viewing-disks

https://netbsd.org/docs/guide/en/chap-rmmedia.html#using-usb-flash-drives

https://netbsd.org/docs/guide/en/chap-rmmedia.html#cdrom

https://netbsd.org/docs/guide/en/chap-rmmedia.html#cdrom-users

https://netbsd.org/docs/guide/en/chap-rmmedia.html#vnconfig

NPF: NetBSD Packet Filter:

https://rmind.github.io/npf/nat.html

https://github.com/rmind/npf/tree/master/docs

https://rmind.github.io/npf/

3nmp (like LAMP)
https://wiki.netbsd.org/tutorials/services/3nmp/

how to install a lamp server
https://wiki.netbsd.org/pkgsrc/how_to_install_a_lamp_server/

setting up blocklistd (like fail2ban)
https://wiki.netbsd.org/tutorials/setting_up_blocklistd/

the netbsd system manager’s manual
https://wiki.netbsd.org/tutorials/the_netbsd_system_manager__39__s_manual/

tuning netbsd for performance
https://wiki.netbsd.org/tutorials/tuning_netbsd_for_performance/

unicode
https://wiki.netbsd.org/tutorials/unicode/