pinecall carriers
The org's carrier accounts: Twilio, a SIP peer, WhatsApp, a Facebook Page.
pinecall carriers list
pinecall carriers show [<account>]
pinecall carriers add twilio --account-sid <AC…> --user <SK…> [--label <name>]
pinecall carriers add sip --username <user> --address <ip or network>… [--outbound-host <host>]
[--outbound-transport auto|udp|tcp|tls] [--outbound-username <user>] [--label <name>]
pinecall carriers add whatsapp --phone-number-id <id> [--label <name>]
pinecall carriers add messenger --page-id <id> [--instagram-id <id>] [--label <name>]
pinecall carriers add email --address <address> --imap-host <host> --smtp-host <host> [--imap-port <port>]
[--smtp-port <port>] [--username <login>] [--smtp-username <login>] [--name <name>]
pinecall carriers drop [<account>]
A carrier account is where the org's numbers live, and the org holds as many as it has: a
Twilio account, a SIP peer (its own PBX, or a carrier with no API here), a WhatsApp number at
Meta, a Facebook Page (its Messenger, and the Instagram account linked to it), a mailbox. An account is the org's, one for both environments; a number it owns is routed to an agent with
numbers import, in the environment it should answer in. So bringing a Twilio number to an
agent is two verbs:
$ pinecall carriers add twilio --account-sid AC0123… --user SK4567… --label Clínica
Twilio secret (the API key's, or the auth token):
kept: AC0123… · twilio · Clínica
route one of its numbers: `pinecall numbers import <+34…> --agent <slug>`
$ pinecall numbers import +34910000000 --agent clinica-norte
Every secret is read on stdin, never from the command line, where ps and the shell's history
would keep it: typed with nothing echoed on a terminal, or piped one per line —
printf '%s\n' "$TWILIO_SECRET" | pinecall carriers add twilio …. A SIP peer reads its password,
and its outbound password on a second line when --outbound-username is given; a WhatsApp number
reads Meta's token, and the Meta app's secret on a second line. Nothing is printed back: the gateway
seals each secret under the platform's vault key and answers the account by its id.
-
Twilio.
--useris an API key SID (make one at Twilio → Account → API keys, and revoke it there any time) or the account SID again, with the auth token as the secret. The pair is tried against Twilio before anything is kept, so a pair Twilio refuses isTwilio refused these credentialsand exit 2. With a Twilio account the platform finds the trunk that points at it, or makes one, when a number is imported. -
A SIP peer.
--addressis each network it calls from, repeated: an IPv4 address or a network no wider than a/24, public. Each one waits for the operator to approve it before 5060 opens to it;showprintswaiting,approvedorrefusedbeside each. The four--outbound-*flags say where the platform dials it; unsaid, the platform dials with the pair it registers with. -
WhatsApp.
--phone-number-idis the number's id at Meta. Two secrets are read: the access token, then the secret of the Meta app the number lives in (App settings ▸ Basic), which Meta signs the number's messages with. An empty second line keeps the app secret given before, so a token is renewed by typing the token alone. Meta is asked for that number with that token before anything is kept, so an id or a token Meta does not open isMeta does not open WhatsApp number <id> with this token: …and exit 2.addandshowthen print what goes in the Meta app's WhatsApp ▸ Configuration ▸ Webhook, without which the agent replies but never hears a message:Terminal $ pinecall carriers add whatsapp --phone-number-id 105512345678901 --label Clínica WhatsApp access token: Meta app secret (empty keeps the one given before): kept: 105512345678901 · whatsapp · Clínica in your Meta app, WhatsApp ▸ Configuration ▸ Webhook: Callback URL https://cloud.pinecall.io/v1/whatsapp/webhook Verify token org_8f2c….3f9ac01d77b24e6a8c5d1f0b9e7a6c42 then subscribe to the webhook field `messages`The Meta side, step by step, is WhatsApp.
-
A Facebook Page.
--page-idis the Page's id at Meta. Two secrets are read: a Page access token of your Meta app (the dashboard's, Messenger ▸ Messenger API Settings, answers Messenger alone; one that answers Instagram too is made in the Graph API Explorer, step by step in Messenger and Instagram; a Page with--instagram-idand a token that cannot answer it is refused, naming what it lacks), then the app's secret, which signs every message Meta delivers for the Page and its Instagram account; an empty second line keeps the one given before. The token must open the Page's conversations (a refusal isMeta does not open Facebook Page <id> with this token: …and exit 2), and the Page is subscribed to the app for its messages.--instagram-idis the Instagram professional account linked to the Page (the app's Messenger ▸ Instagram settings show it): the token Meta's dashboard generates carriespages_messagingalone and reads nothing of the Page, so the account is said here; a token that may read the Page (pages_read_engagement) names the Page and its account by itself. Bringing the Page again with a new token alone keeps its secret and its Instagram account. Pinecall gives the app its webhook too, the same callback URL and verify token WhatsApp's are, with the message fields chosen (verifying the callback in Meta's dashboard alone chooses none, and then Meta delivers nothing). Its Messenger and its Instagram are then given to an agent:Terminal $ pinecall carriers add messenger --page-id 1472943555898656 --instagram-id 17841400000000001 --label "Pinecall Prueba" Facebook Page access token: Meta app secret (empty keeps the one given before): kept: 1472943555898656 · messenger · Pinecall Prueba · Instagram 17841400000000001 $ pinecall numbers import 1472943555898656 --agent front-desk --channel messenger --account 1472943555898656 $ pinecall numbers import 17841400000000001 --agent front-desk --channel instagram --account 1472943555898656The agent only answers on these channels: Meta lets a Page reply within 24 hours of a contact's last message, and nothing writes first. The Meta side is Messenger and Instagram.
-
A mailbox.
--agent--addressis the mailbox, which the account is named by. The mailbox's password is read first; with--smtp-username, a relay's password on a second line (Amazon SES's SMTP credentials, say), an empty one keeping the one given before. IMAP is 993 over TLS and logs in as--username, the address when unsaid; SMTP is 465 over TLS, or STARTTLS on any other port (587). Both logins are tried before anything is kept, so a refusal is<address> cannot be read and answered: …and exit 2. The address is then given to an agent with `pinecall numbers import--channel email`, and the agent answers every email that arrives from then on, set in the org's layout ([`email`](/cli/email/)).
add with an account the org already holds replaces its secret: that is how a key is rotated.
An account's id is its own: Twilio's account SID, the peer's username, Meta's phone number id, the Page's id.
list is every account, oldest first, one line each with its id and how many numbers it routes in
the environment asked — and, when there are several, the reminder that numbers import names one
with --account; show is one, the org's only account or the one named; drop forgets one, and with several the id is required. Its numbers
stay routed until each is let go with numbers drop, so forgetting an account never silences a
line by surprise. The same accounts are the console's Numbers screen, Add a number —
the console — and the REST endpoints are
phone numbers, "Accounts and numbers".