Configuration schema for SIP services, placed under the :sip key.
Equivalent to NkSIP's nksip_syntax:app_syntax/0 (without the sip_ prefix).
Defaults match NkSIP's nksip_syntax:make_config/1.
Options
:listen(String.t/0) - Listening URIs, for example"sip:all:5060, <sip:all:5061;transport=tls>". For WS and WSS, a path accepts only that HTTP path ("<sip:all:8080/ws;transport=ws>").:allow- Methods sent in the Allow header. The default value is["INVITE", "ACK", "CANCEL", "BYE", "OPTIONS", "INFO", "UPDATE", "SUBSCRIBE", "NOTIFY", "REFER", "MESSAGE"].:supported- Option tags sent in the Supported header. The default value is["path"].:timer_t1- Timer T1 (msecs). The default value is500.:timer_t2- Timer T2 (msecs). The default value is4000.:timer_t4- Timer T4 (msecs). The default value is5000.:timer_c(pos_integer/0) - Timer C (secs). The default value is180.:trans_timeout- Transaction timeout (secs): every2 * trans_timeoutseconds, calls remove the transactions older than that, replying{:error, :timeout}to their callers. The default value is900.:dialog_timeout- Dialog timeout (secs): dialogs without activity are ended with a BYE (and removed after twice this time). The default value is1800.:event_expires(pos_integer/0) - Default subscription expiration (secs). The default value is60.:event_expires_offset(non_neg_integer/0) - Extra time before a subscription is removed (secs). The default value is5.:session_expires- Session interval for session timers (secs, seeCaracola.SessionTimers). The default value is1800.:min_se(pos_integer/0) - Minimum session interval accepted for session timers (secs). The default value is90.:digest_algorithms- Digest algorithms accepted from clients (RFC 8760)::md5,:sha256and:sha512_256. Challenges offer them, the strongest first. The default value is[:md5].:nonce_timeout- Validity of digest auth nonces (secs). The default value is30.:from(String.t/0) - Default From URI.:accept- Default Accept values.:events- Supported event packages. The default value is[].:info_packages- INFO packages received (RFC 6086), sent in the Recv-Info header of INVITEs and their responses. Without it, no Recv-Info is sent (seeCaracola.InfoPackages).:route(list ofString.t/0) - Default Route URIs. The default value is[].:no_100(boolean/0) - Do not send automatic 100 Trying. The default value isfalse.:max_calls- Maximum concurrent calls. The default value is100000.:local_host- Host used in Via and Contact (IPv4). The default value is:auto.:local_host6- Host used in Via and Contact (IPv6). The default value is:auto.:tls(keyword/0) -:ssloptions for TLS and WSS listeners (certfile,keyfile...). The default value is[].:tls_client(keyword/0) -:ssloptions for outgoing TLS connections, merged with the defaults.:password(term/0) - Passwords to answer digest challenges: a password, an HA1 ({:ha1, hex}for MD5 or{:ha1, algorithm, hex}, seeCaracola.Digest.ha1/4),{realm, password}or a list of them. Used after the ones in the request options.:auto_auth_max_tries(non_neg_integer/0) - Maximum number of times a challenged request is sent again with credentials. The default value is5.:udp_max_size(non_neg_integer/0) - Requests larger than this are sent over TCP. The default value is1300.:via_params(list of tuple ofString.t/0, values) - Parameters added to the Via of the requests sent, as{name, value}(for plugins). The default value is[].:instance_id(String.t/0) - Instance id (RFC 5626+sip.instance, used by outbound and GRUU), like"<urn:uuid:...>". By default, one derived from the service and node names.
Summary
Functions
Adds values to the :allow, :supported, :events or :info_packages list of the sip configuration
of a service, for plugins (in their Malla.Plugin.plugin_config/2)
Validates SIP options and fills in defaults.
Types
@type t() :: keyword()
The validated sip configuration of a service, as a keyword list.
Functions
@spec add_values(keyword(), :allow | :supported | :events | :info_packages, [ String.t() ]) :: keyword()
Adds values to the :allow, :supported, :events or :info_packages list of the sip configuration
of a service, for plugins (in their Malla.Plugin.plugin_config/2):
def plugin_config(_srv_id, config),
do: {:ok, Caracola.Config.add_values(config, :supported, ["myext"])}
@spec validate(keyword()) :: {:ok, t()} | {:error, NimbleOptions.ValidationError.t()}
Validates SIP options and fills in defaults.