pinecall numbers
The org's numbers and where they point.
pinecall numbers list
pinecall numbers available [--account <id>]
pinecall numbers import <+34…> --agent <slug> [--channel phone|whatsapp] [--dry-run]
pinecall numbers drop <+34…>
Adding a number to the org from a terminal is numbers import: the number is one an account of
the org owns, and the account itself is kept first with carriers add when the org
does not hold it yet. A Twilio number reaching an agent is these two lines, and nothing else:
$ pinecall carriers add twilio --account-sid AC0123… --user SK4567… # once, the secret on stdin
$ pinecall numbers import +34910000000 --agent clinica-norte # the number, to the agent
Which numbers there are to import is numbers available (GET /v1/numbers/available): every
number the org's Twilio accounts own, every page of Twilio's, one per line with its name at the
carrier and its account, and routed here or not routed here for the environment asked. --account asks
one account of several. It is per environment: a number production routes reads not routed here in the
sandbox, so look with --prod before importing one there.
not routed here is not free. The list knows what this org routes in this environment, and
nothing about a number held on another org's trunk of the same Twilio account: that one is found out
at import, as a 409 naming the trunk and asking for move. numbers import <number> --agent <slug> --dry-run is the check, and a 409 is a number to leave alone. A SIP peer owns what it owns and
lists nothing; its import takes the number as typed.
$ pinecall numbers available --prod
+13158182774 · (315) 818-2774 · AC5f7c… · routed here
+16814413619 · (681) 441-3619 · AC5f7c… · not routed here
A number is one environment's and reaches one agent: it is imported where it answers, and list
shows that environment's — the sandbox's, or production's with --prod. No verb here moves a number
between the two; the console's Numbers screen does (PUT /v1/numbers/{number}/env, which re-routes the
carrier's trunk), because a number is a route in one environment's table and a carrier call that matched
two would be refused.
import takes a number the org's carrier account already owns and points it here: the carrier's
trunk, the SFU's trunk, the route — --dry-run prints those steps and writes nothing, which is
what you read before letting the gateway touch a carrier account. drop forgets the route and
takes the number off the SFU trunk; the carrier account keeps it, so nobody is un-bought by a typo.
Whose corner a ring lands in, once an environment is answering it, is line.