Membrane.RTC.Engine.Endpoint.SIP (Membrane RTC Engine SIP Endpoint v0.6.0)
View SourceAn Endpoint responsible for:
- registering at a SIP provider,
- dialing a phone number,
- receiving audio from the callee and forwarding it to other Endpoints,
- mixing audio tracks from other Endpoints and sending them to the callee.
Limitations
- Incoming calls are unsupported,
- only the G.711 A-law audio codec is supported (SDP negotiation will fail if the SIP provider doesn't support it).
Setup
All SIP Endpoints share a single UDP socket for SIP signaling messages.
By default, it is opened on 0.0.0.0:5060; this can be changed by adding the following line to your config.exs:
config :membrane_rtc_engine_sip, sip_address: "1.2.3.4", sip_port: 5061The range of UDP ports (available to all SIP Endpoints) used for RTP media stream exchange
can be modified by adding the following line to your config.exs:
config :membrane_rtc_engine_sip, port_range: {from, to} # (both ends inclusive)Bin options
Passed via struct Membrane.RTC.Engine.Endpoint.SIP.t/0
rtc_enginepid()Required
PID of parent Engineregistrar_credentialsRegistrarCredentials.t()Required
Credentials needed to connect with the SIP registrar serverexternal_ipString.t()Required
External IPv4 address of the machine running the Endpoint, required for SDP negotiationregister_interval_msnon_neg_integer()Default value:
45000
Interval (in ms) in which keep-alive (keep-registered) REGISTER messages will be sent to the SIP registrar serverdisconnect_if_aloneboolean()Default value:
true
Whether the Endpoint should disconnect from the call when all incoming tracks are removed, i.e. when all other Endpoints publishing audio are removed from the Engine
Pads
:input
Accepted formats:
Membrane.RTP| Direction: | :input |
| Availability: | :on_request |
:output
Accepted formats:
Membrane.RTP| Direction: | :output |
| Availability: | :on_request |
Summary
Types
Struct containing options for Membrane.RTC.Engine.Endpoint.SIP
Functions
Starts calling a specified number
Ends ongoing call or cancels call attempt
Returns description of options available for this module
Types
@type t() :: %Membrane.RTC.Engine.Endpoint.SIP{ disconnect_if_alone: boolean(), external_ip: String.t(), register_interval_ms: non_neg_integer(), registrar_credentials: Membrane.RTC.Engine.Endpoint.SIP.RegistrarCredentials.t(), rtc_engine: pid() }
Struct containing options for Membrane.RTC.Engine.Endpoint.SIP
Functions
Starts calling a specified number
Ends ongoing call or cancels call attempt
@spec options() :: keyword()
Returns description of options available for this module