Skip to content

Instantly share code, notes, and snippets.

View hamidrhashmi's full-sized avatar
🏠
Working from home

Hamid R. Hashmi hamidrhashmi

🏠
Working from home
View GitHub Profile
@hamidrhashmi
hamidrhashmi / Freeswitch-test-dialplan.md
Last active October 30, 2024 08:10
Freeswitch Dial plan to test Different Call Scenario

Answer Call starting with 00 or +

    <extension name="echo_DZ">
            <condition field="${destination_number}" expression="^(?:\+|00)(\d+)$">
                <action application="log" data="Call Received with Call-ID: ${sip_call_id}"/>
                <action application="log" data="Call Received with Call-ID: <${sip_call_id}>"/>
                <action application="answer"/>
                <action application="echo" data=""/>
            </condition>
 
@hamidrhashmi
hamidrhashmi / sipp_uac.md
Last active October 14, 2024 07:52
SIPp UAC scenario file with pcap

Please install latest sipp (>3.7.3)

wget https://github.com/SIPp/sipp/releases/download/v3.7.3/sipp
chmor +x sipp
mv sipp /usr/bin/sipp

use the following sipp scenario file

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
@hamidrhashmi
hamidrhashmi / FS-on-Rockey.md
Last active October 10, 2024 10:36
How to install Freeswitch on Rocky Linux 8 from Source

Enable CRB

dnf config-manager --set-enabled crb

Enable Epel Repo for Rocky 8

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm
@hamidrhashmi
hamidrhashmi / VPN.md
Last active October 28, 2024 09:13
How to setup you own VPN Server ?

Prerequisite

  1. Debian 12 Machine
  2. on a cloud with Public IP (I am using DidgitalOcean)
  3. inerface name of public IP ( my interface name is eth0)

STEP 1: Configure IP Forwarding

Eidt sysctl.conf file

vim /etc/sysctl.conf
@hamidrhashmi
hamidrhashmi / viscosity-to-openvpn.py
Created September 19, 2024 18:52
Convert Viscosity file o OpenVPN file
#!/usr/bin/env python3.11
# -*- coding: utf-8 -*-
"""Converts viscosity export files into an open vpn package
Usage: viscosity-to-openvpn.py <input> <output>
"""
import io
import os
import sys
import tarfile
@hamidrhashmi
hamidrhashmi / heplify.md
Created August 22, 2024 09:54
How to configure / deploy heplify on SIP Server

Download and install the Latest heplify release

wget https://github.com/sipcapture/heplify/releases/latest/download/heplify
chmod +x heplify
mv heplify /usr/bin/heplify

Create service file for heplify

cat > /etc/systemd/system/heplify.service <<EOF
[Unit]
@hamidrhashmi
hamidrhashmi / ipsec_tunnel.md
Created August 14, 2024 10:02
How to create IPsec Tunnel

DEFAULT values

sysctl -a | grep "net.ipv4.ip_forward \|net.ipv6.conf.all.forwarding\|net.ipv4.conf.all.accept_redirects\|net.ipv4.conf.all.send_redirects"
net.ipv4.conf.all.accept_redirects = 1
net.ipv4.conf.all.send_redirects = 1
net.ipv4.ip_forward = 0
net.ipv6.conf.all.accept_redirects = 1
@hamidrhashmi
hamidrhashmi / fail2ban_freeswitch.md
Last active August 14, 2024 09:41
How to configure Fail2Ban with Freeswitch

Install fail2ban

apt install fail2ban

create the following file

vim /etc/fail2ban/jail.d/freeswitch.local

copy the foolowing content in file freeswitch.local

@hamidrhashmi
hamidrhashmi / goautodial.md
Created June 21, 2024 07:58
Free Call Center Solution for SMEs

STEP 1: Domain

If you are configuring GoAUtoDial on amchine with Private Ip or LAN IP. Then Set domain it etc/hosts

vim /etc/hosts

machine IP and domain For Example

192.168.0.111 goautodial.hbvoice.local
@hamidrhashmi
hamidrhashmi / nginx.md
Created June 21, 2024 06:32
How to relay HTTPS traffic to HTTP endpoint with nginx

Create file in site-available folder

vim /etc/nginx/sites-available/backendservice.conf

and past ethe following line in it

server {
    client_max_body_size 100M;
    server_name PUB_API;
 listen 3555 ssl;