Custom ESPHome component for SIP Client (VoIP Phone / Intercom)

Hi everyone,

I’ve put together a custom ESPHome external component that brings full VoIP/SIP capabilities to ESP32 devices: sip_client.

Instead of just a simple media player, this component acts as a native SIP client. It allows your ESPHome devices to register with any standard VoIP/PBX server (such as Asterisk, FreePBX, Fritz!Box, or local PBX setups) to make and receive actual voice calls just like a hardware phone or intercom.

:rocket: Key Features

  • Full SIP Phone Capabilities: Supports active SIP registration, outbound calling, and inbound call reception.
  • Native ESPHome Integration: No complex coding or custom firmware setups—fully configurable entirely via YAML.
  • Hardware Flexible: Can be easily combined with buttons, keypads, microphones, and speakers to build standalone hardware.

:hammer_and_wrench: Quick Start (YAML Configuration)

You can test and include this component in your configuration using the external_components block:

external_components:
  - source:
      type: git
      url: https://github.com/eigger/espcomponents@latest
      components: [ sip_client ]

# Basic VoIP/SIP Setup
sip_client:
  server: "192.168.1.100"
  username: "1001"
  password: "your_password"


ezgif.com-speed

Hi, what about one I2S bus codecs? Now it is not possible to work with es8311.

It worked fine when I tested it on voicepe (aic3204_dac). Is the es8311 not playing any sound? I'll run a test on it.

Can you share config for it?

The voice PE example can be found in the link right above.

I've added a mono configuration option for the ES8311, but I haven't been able to verify it yet. You can find the setup instructions in the GitHub link.

You mean this one:

It is not looking good (no proper GPIO Pins)

It's the full configuration for VoicePE so it's a bit long, but of course, the GPIO is specified as well.

i2s_audio:
  - id: i2s_output
    # i2s_output data pin is gpio10
    i2s_lrclk_pin:
      number: GPIO7
    i2s_bclk_pin:
      number: GPIO8

  - id: i2s_input
    # data line is GPIO15
    i2s_lrclk_pin:
      number: GPIO14
    i2s_bclk_pin:
      number: GPIO13

microphone:
  - platform: i2s_audio
    id: i2s_mics
    i2s_din_pin: GPIO15
    adc_type: external
    pdm: false
    sample_rate: 16000
    bits_per_sample: 32bit
    i2s_mode: secondary
    i2s_audio_id: i2s_input
    channel: stereo

speaker:
  # Hardware speaker output
  - platform: i2s_audio
    id: i2s_audio_speaker
    sample_rate: 48000
    i2s_mode: secondary
    i2s_dout_pin: GPIO10
    bits_per_sample: 32bit
    i2s_audio_id: i2s_output
    dac_type: external
    channel: stereo
    timeout: never
    buffer_duration: 100ms
    audio_dac: aic3204_dac

This config is wrong for codecs like: ES8311
You cannot set diferent pins for input and output. Duplex here mean: one channel is a mic, second is speaker, so both mono.

it's not tested yet. I will update it here after testing.

I have full duplex!
I had integrate audio stack from project: GitHub - n-IA-hane/esphome-intercom: ESPHome Intercom API - Full-duplex bidirectional audio streaming for ESP32 with Home Assistant integration · GitHub
If you want to i can send you configuration.

My yaml:
Yaml
Thanks for support and awsome extension!