Sign inGet Started

bird voice tools test-call

Usage

Code example
bird voice tools test-call <e164> [flags]

Description

Places a single real call through one of your trunks, to prove the trunk works before you point a PBX at it. It writes a throwaway account file into a temporary directory, runs baresip against it for --duration, and deletes the directory as soon as the call ends.

The call is carried and billed like any other, and it appears in the call log. Audio uses this machine's microphone and speakers. baresip must be on PATH (brew install baresip, apt install baresip).

The SIP password follows the trunk's caller switches before its stored credentials. workspace_users_enabled admits a session credential. sip_trunking_enabled admits your PBX's way in: the secret of an allowed API key that can still authenticate, sent from an address on the IP allow list when the trunk has one; or, on a trunk with an allow list and no allowed key, this machine's address alone. Keys and allow-list entries kept on a trunk with sip_trunking_enabled off admit nothing, and when neither switch can admit the call the command stops before --dry-run output or dialing. A successful call with a minted session credential tests workspace calling unless the trunk already admits this machine's address by its allow list alone, which takes the call as PBX traffic before any challenge.

BIRD_VOICE_TEST_CALL_API_KEY, when set, is the password on a trunk whose PBX way in takes a key, even on one that could mint, so it must be the secret of an API key the trunk allows. On any other trunk it is ignored. Otherwise, with workspace_users_enabled, this command mints a session credential for the call: it expires within minutes, so nothing long-lived is written to disk, and minting needs the voice:write scope, which a plain bird auth login does not hold. Otherwise, on a trunk that takes a key, the secret of the BIRD_API_KEY the CLI is authenticated with is the password. A trunk whose PBX way in is its IP allow list alone gets no password.

Verifying and activating the caller ID are dashboard steps this command cannot take. --dry-run prints the account file and the command without dialing; the password is still resolved the same way, minting included, because the line is of no use to another SIP client without one.

By default baresip's own console output is reduced to a few status lines and a peak-audio summary, where a zero in one direction is the one-way-audio symptom. --raw prints its stream byte-for-byte instead, and --verbose adds a SIP trace to that.

--srtp offers encrypted media: SDES-SRTP, with the keys in the SDP, so it needs --protocol tls and a trunk whose media encryption is preferred or required.

--trunk and --caller-id default to the workspace's first trunk and first verified, outbound-enabled caller ID, which is what makes a bare test call one argument; both are printed when they are inferred.

Examples

Code example
bird voice tools test-call +31612345678
bird voice tools test-call +31612345678 --trunk spt_01hx... --caller-id +31201234567 --protocol udp
bird voice tools test-call +31612345678 --srtp

Options

NameDescription
--caller-idVerified, outbound-enabled caller ID for the From header, E.164 (default: the workspace's first eligible caller ID)
--dry-runPrint the account file and the baresip command, then exit without dialing
--durationHang up after this long (default 30s)
--protocolSIP transport protocol, which selects the port: tls (5061), udp (5060), tcp (5060) (default tls)
--rawPrint baresip's output byte-for-byte instead of the status summary
--srtpOffer SDES-SRTP encrypted media; needs --protocol tls
--trunkTrunk to place the call through (default: the workspace's first)
--verbosePass baresip a SIP trace (-s); implies --raw, since the trace is what you came for

Continue with the documentation, guides and examples for this topic.