SIP auth_web3 Module Demo

Demonstrating blockchain-based SIP authentication with auth_web3 module

Your credentials will be based on your Gmail, therefore we require you log in.

SIP auth_web3 Module Demo

Blockchain-based SIP authentication via auth_web3 module

Create Your Account

What you will do? Create credentials for a SIP account that will be able to authenticate using the auth_web3 module.

You'll receive an Username, Auth Username, and Password via Gmail. Use these to register to kama6.cellact.nl (UDP transport) on any SIP client. Once registered, call other users or dial asteriskTest which is our IVR.

1

Your Credentials

Click to start
-
Generated from your Google email
Account details will be sent to your Gmail

You will receive via email:

  • Auth Username: Stored with your password on Oasis Sapphire, mapped to a blockchain wallet
  • Password: Your chosen password
  • Username/Display Name: An ENS subdomain (e.g., yourname.demoauth.global) owned by the blockchain wallet mapped to your auth username
2

Getting Your Credentials

Locked

Creating your account...

Storing credentials on Oasis Sapphire and registering ENS identity on Hoodi. Your credentials will be sent to your Gmail shortly.

Done

Account created successfully!

Your credentials have been sent to your Gmail. Check your inbox for the full details.

3

Using Your Credentials

Locked

Register to kama6.cellact.nl with UDP transport on any SIP client using your credentials.

What you can do:

  • Call any other registered user
  • Call our IVR at asteriskTest if you only have one device

How It Works - Implementation Guide

What's Happening Behind the Scenes

When you create an account:

  • Your credentials are stored in a confidential smart contract on Oasis Sapphire (an EVM blockchain with built-in encryption)
  • An ENS identity is registered on the Hoodi network, linking your username to a wallet address
  • When you authenticate via SIP, the Kamailio server queries these blockchain contracts to verify your credentials

How to Use This in Your Own Kamailio Setup

1. Load the auth_web3 module:

loadmodule "auth_web3.so"

2. Configure module parameters:

# Point to your authentication contract on Oasis Sapphire
modparam("auth_web3", "authentication_contract_address", "0xYourContractAddress")
modparam("auth_web3", "authentication_rpc_url", "https://testnet.sapphire.oasis.dev")

# Optional: Enable ENS resolution on Hoodi (or any ENS-compatible network)
modparam("auth_web3", "ens_rpc_url", "https://rpc.hoodi.ethpandaops.io")
modparam("auth_web3", "ens_registry_address", "0x5841d17010252BE760D055cba2f2853874457443")

# Adjust timeout for blockchain queries
modparam("auth_web3", "rpc_timeout", 40)

3. Use in your routing logic:

route[AUTH] {
    if (is_method("REGISTER")) {
        # Drop retransmissions
        if (!t_newtran()) {
            sl_reply_error();
            exit;
        }
        
        # Authenticate via blockchain
        if (!web3_www_authenticate("$fd", "$rm")) {
            auth_challenge("$fd", "0");
            exit;
        }
        
        # Save location and continue
        save("location");
    }
    
    if (is_method("INVITE")) {
        # Drop retransmissions
        if (!t_newtran()) {
            sl_reply_error();
            exit;
        }
        
        # Proxy authenticate
        if (!web3_proxy_authenticate("$fd", "$rm")) {
            proxy_challenge("$fd", "0");
            exit;
        }
    }
}

4. Deploy your smart contract:

Your authentication contract must implement:

function authenticateUser(
    string memory username,
    string memory realm,
    string memory method,
    string memory uri,
    string memory nonce,
    uint8 algorithm,
    bytes memory response
) public view returns (bool);

function getWalletAddress(
    string memory username
) public view returns (address);

Resources

  • Module: auth_web3 (compatible with Kamailio and OpenSIPS)
  • Authentication Network: Oasis Sapphire (confidential EVM)
  • ENS Network: Any ENS-compatible chain (Ethereum, Hoodi, etc.)
  • Demo Contract: 0xf4B4d8b8a9b1F104b2100F6d68e1ab21C3a2DF76 (Oasis Sapphire Testnet)