Client-initiated connections (RFC 5626, SIP outbound). Equivalent to
NkSIP's nksip_outbound.
defmodule MyEdgeProxy do
use Malla.Service, plugins: [Caracola.Outbound], sip: [listen: "sip:all:5060"]
endThe plugin adds outbound to the Supported header. With it:
- As UA, Contacts get the
+sip.instanceof the service (the:instance_idof the sip config), REGISTER requests sent with the{:reg_id, n}option areg-id, and dialog-forming requests theobparameter. SeeCaracola.UACAutoOutboundto keep the flows alive. - As registrar (with
Caracola.Registrar), the first hop adds a Path with a flow token pointing to the connection the REGISTER came from, contacts with areg-idare identified by their instance andreg-id, the response hasRequire: outbound, and a REGISTER with areg-idthrough a first hop without outbound support is rejected with 439. Requests to the registered contacts (proxied to theCaracola.Registrar.find/4results) go through the flow. - As proxy, REGISTER requests proxied with
:path(and the requests with a Contact withob, proxied with:record_route) get a Path or Record-Route with a flow token, and requests with a route with a flow token are sent through that flow, or rejected with 430 (Flow Failed) if it is down.