Files
telephony/net/baresip/files/baresip.defaults
Daniel Danzberger 70d6a028ab baresip: add uci config section for accounts
Adds a new UCI config section that allows the user to define accounts
from which the init script will create the /etc/baresip/accounts file.

Using UCI has the big benefit, that changes in the config can be
recognized by reload_config which will restart baresip automatically.

Example /etc/config/baresip:
--
config baresip main
	option enable 1
	option options ''

config account
	option user '+49123456789'
	option password ''
	option server 'tel.t-online.de'
	option transport 'tls'
	option mediaenc 'srtp'

config account
	option user '12'
	option password '7282ce22eee6d91193a1d5014398356x'
	option server '172.27.0.97'
	option transport 'udp'
	option append 'answerdelay=0;rwait=90;mwi=no'
	option ignore 1
--

The basic account options user,password,server,mediaenc and tansport can
be set directly. All other custom baresip account options can be append
to the account string using the 'append' option.

Signed-off-by: Daniel Danzberger <dd@embedd.com>
2025-05-06 17:22:13 +02:00

30 lines
567 B
Plaintext

CFGFILE=/etc/config/baresip
if [ ! -f "$CFGFILE" ]; then
cat >$CFGFILE <<EOF
config baresip main
option enable 0
option options ''
config account
option user '+49123456789'
option password ''
option server 'tel.t-online.de'
option transport 'tls'
option mediaenc 'srtp'
option ignore 1
config account
option user '12'
option password '7282ce22eee6d91193a1d5014398356x'
option server '172.27.0.97'
option transport 'udp'
option mediaenc ''
option append 'answerdelay=0;rwait=90;mwi=no'
option ignore 1
EOF
fi
chown -R baresip:baresip /etc/baresip