0.1.0 (2026-11-30)
First release.
- Outbound calls through a 3CX PBX with
Sippy.call/2, optionally playing a WAV file (:audio) once answered. The:parent_pidreceives{:call_answered, pid}and{:call_ended, pid, reason}for every end the application did not cause itself::remote_hangup,{:rejected, status},:ring_timeout,:hangup_after_audio,:max_duration,:no_common_codec,:invalid_sdp,:auth_failedor{:error, reason}. - One set of functions for both kinds of call:
Sippy.hangup/1,Sippy.play_audio/2,Sippy.stop_audio/1andSippy.dtmf_digits/1. Inbound calls are answered withSippy.answer/2and also haveSippy.hold/1,Sippy.unhold/1,Sippy.caller_id/1and the transfers;Sippy.dialog_info/1gives an outbound call's dialog for an attended transfer. Sippy.reject/2turns down a ringing incoming call with486 Busy Here,603 Declineor480 Temporarily Unavailable.- An incoming call that was rejected, cancelled, timed out or turned away as busy is remembered for 32 seconds: a retransmitted INVITE gets the same final response again instead of being reported as a new call.
- Every DTMF digit is sent to the
:parent_pidas{:dtmf, call_pid, digit}, on outbound and inbound calls. A digit neither hangs up the call nor stops the audio: that is up to the application. - The end of the audio is reported as
{:audio_completed, call_pid}. An outbound call hangs up after its audio only when:hangup_after_audiois set to a number of milliseconds; it defaults tofalse. :max_durationhangs up an answered call, outbound or inbound, after that many milliseconds (default: 10 minutes,:infinityturns it off). An inbound call reports it as{:call_ended, pid, :max_duration}.- Calls use the G.711 codec the other side picks: PCMU or PCMA (A-law),
also on a dynamic payload type. An inbound call is answered with just that
codec, and an offer without either is rejected with
488 Not Acceptable Here; an outbound call answered without either is acknowledged and hung up. - DTMF is read from the negotiated telephone-event payload type instead of always 101.
- Audio played one file after another keeps one RTP stream: the sequence numbers continue, the timestamp follows the wall clock through the silence in between, and each new file starts with the marker bit set.
- Audio packets are sent on a fixed 20 ms schedule from the start of the file, so playback no longer drifts behind and sounds distorted.
- Playing a file replaces the audio that is playing, and
Sippy.play_audio/2returns an error for a file it cannot read. - The exit reason of an outbound call and
Sippy.dtmf_digits/1hold all the digits pressed, oldest first. - Inbound calls: registration as an extension, answering, playing audio, hold and resume, DTMF, attended and blind transfer, SIP session timers (RFC 4028).
Sippy.Registrarcan run under a supervisor ({Sippy.Registrar, config: ..., notify: pid}) or be started withSippy.register/2;Sippy.registered?/1reports its state.- Incoming calls arrive as
{:incoming_call, %Sippy.IncomingCall{}}and{:incoming_call_cancelled, call_id}; answer one withSippy.start_inbound_call/2. - Ringing without answering (
Sippy.ring/1): a CANCEL is answered with200 OKand the INVITE with487 Request Terminated. - OPTIONS keepalives are answered with
200 OK. - UDP transport only.
- A
Session-Expiresbelow RFC 4028's minimum of 90 seconds is raised to 90. - Call-IDs (128 bits), tags (64 bits), branches (96 bits) and RTP SSRCs and sequence numbers are cryptographically random.
- SDP addresses and ports are validated: answering a call with unusable SDP
returns
{:error, :invalid_sdp}, and an outbound call answered with one is acknowledged and hung up. - A failed registration (rejected credentials, an error response, no answer,
a failed send or socket) is retried with a fresh challenge and a growing
delay instead of stopping the registrar; a
stale=truechallenge is answered at once. - At most
:max_pending_callsincoming calls ring at once (further ones get486 Busy Here), and one left ringing for:pending_call_timeoutis ended with480 Temporarily Unavailable. - Responses only count when they belong to Sippy's own transaction (Call-ID, CSeq, Via branch, and for calls the From tag).
- SIP is only accepted from the PBX (or
:trusted_sources), and RTP only from the negotiated remote media address. - Every DTMF key press is detected, also the same digit twice in a row.
- WAV files at any sample rate play at the right speed, and audio is encoded as standard G.711 mu-law.
- Digest authentication follows RFC 2617 with and without
qop=auth, and echoes the server'sopaque. - Outbound calls acknowledge every non-2xx final response to an INVITE (such as 3CX's 407 challenge) with an ACK in the INVITE's transaction.
- Responses copy every Via header of the request, so Sippy works behind SIP
proxies, and compact header forms (
v:,i:,f:,t:, ...) are understood. - Outbound and inbound calls run under
Sippy.CallSupervisorand are not restarted when they crash. - Transfers run inside the inbound call, and each REFER uses the next CSeq.
Their outcome is reported as
{:transfer_completed, pid}, after which the call hangs up and ends with:transferred, or as{:transfer_failed, pid, status}when the PBX rejects the REFER or its NOTIFY reports a failure. In-dialog NOTIFYs go to the call they belong to. - Configuration is passed explicitly with
Sippy.config/1; Sippy reads no application environment, and unknown options raise anArgumentError.