-
Notifications
You must be signed in to change notification settings - Fork 72
Automatic Account Configuration
juha-h edited this page Feb 27, 2023
·
11 revisions
When a new account <user>@<domain>
is added, baresip tries to pre-configure it based on file https://<domain>/baresip/account_config.xml
. User specific and sensitive configuration items are not included and need to be entered manually. The web site <domain>
needs to have a valid SSL certificate.
File account_config.xml
has the following format:
<?xml version="1.0" encoding="UTF-8"?>
<account-config>
<outbound-proxy-1>sip uri</outbound-proxy-1>
<outbound-proxy-2>sip uri</outbound-proxy-2>
<registration-interval>60-3600</registration-interval>
<register>yes|no</register>
<audio-codecs>
<audio-codec>audio codec</audio-codec>
...
</audio-codecs>
<video-codecs>
<video-codec>video codec</video-codec>
...
</video-codecs>
<media-encoding>value</media-encoding>
<media-nat>value</media-nat>
<stun-turn-server>stun|turn uri</stun-turn-server>
<voicemail-uri>sip uri</voicemail-uri>
<prefer-ipv6-media>yes|no</prefer-ipv6-media>
<dtmf-mode>rtp-event|sip-info</dtmf-mode>
<answer-mode>auto|manual</answer-mode>
<voicemail-uri>sip uri</voicemail-uri>
<country-code>e.164 country code</country-code>
<tel-provider>sip uri hostpart</tel-provider>
</account-config>
If a configuration item is not needed, it can be omitted. See baresip app Account for possible audio-codec
, video-codec
,media-encoding
, and media-nat
values.
Below is an example account_config.xml
file.
<?xml version="1.0" encoding="UTF-8"?>
<account-config>
<outbound-proxy-1>sip:ob1.example.com:5061;transport=tls</outbound-proxy-1>
<outbound-proxy-2>sip:ob2.example.com:5061;transport=tls</outbound-proxy-2>
<registration-interval>900</registration-interval>
<register>yes</register>
<audio-codecs>
<audio-codec>opus/16000/1</audio-codec>
<audio-codec>AMR-WB/16000/1</audio-codec>
<audio-codec>AMR/8000/1</audio-codec>
<audio-codec>PCMU/8000/1</audio-codec>
<audio-codec>PCMA/8000/1</audio-codec>
</audio-codecs>
<video-codecs>
<video-codec>VP9</video-codec>
<video-codec>H265</video-codec>
<video-codec>VP8</video-codec>
<video-codec>H264</video-codec>
<video-codec>AV1</video-codec>
</video-codecs>
<media-encoding>ZRTP</media-encoding>
<media-nat>STUN</media-nat>
<stun-turn-server>stun:stun.l.google.com:19302</stun-turn-server>
<voicemail-uri>sip:voicemail@example.com</voicemail-uri>
<prefer-ipv6-media>yes</prefer-ipv6-media>
<dtmf-mode>sip-info</dtmf-mode>
<answer-mode>manual</answer-mode>
<voicemail-uri>sip:voicemail@example.com</voicemail-uri>
<country-code>+1</country-code>
<tel-provider>pstn.example.com</tel-provider>
</account-config>