A docker container that uses baresip, pulseaudio and gstreamer RTSP server to provide a solution that connects to a SIP peer (audio only) and a video camera to present an ONVIF profile T video doorbell with two-way audio support.
Please the following block diagram how this is achieved.
Click here to open the block diagram in full screen.
The whole docker setup is based on the docker setup from the FRIGATE project. So all credits concerning the docker setup belongs to them.
Clone the GIT repo:
git clone https://github.com/nanosonde/sip2rtsp.git
Prepare configration file based on the example config file:
cp config/config.yaml.example config/config.yaml
Run the docker container in host networking mode:
make run
Once the container has started, a new folder /config/baresip will be created. It contains two subfolders:
The container will always overwrite the default folder on container startup. If you want to change any settings, e.g. to create a SIP account in
the acccounts
file. You can copy the file from the default folder to the custom folder and edit it as required.
Upon next startup the new custom config file will be used.
This way you can customize baresip to your own needs.
Watch out for comments in the config
file of baresip! Some things must not be changed to make the whole container logic work together!
Please note that the generated docker image uses a custom build of gstreamer and pulseaudio from this repository: https://github.com/nanosonde/pulsegst
Building gstreamer and pulseaudio takes a long time. So building those is done in a separate dockerfile.
Recent versions (from 03/17/2023) of sip2rtsp use Debian Bookworm which already includes latest version of gstreamer and pulseaudio.
See the comments provided in config/config.yaml.example
When the docker container is running in host networking mode, it will use the following ports (default config):