Skip to content
Shortcut: /, ⌘K or Ctrl+K

polymorfa sip-trunk

Connect a PBX to WhatsApp calls with SIP trunks.

Polymorfa CLI · CLI API requests

View as Markdown

polymorfa sip-trunk create

Create a SIP trunk.

Create a SIP trunk from one JSON object with name, direction, and the outbound and inbound sections the direction needs. Keep passwords in the input file or stdin, not in arguments. A trunk that accepts calls from your PBX returns its password once, followed by the SIP address your PBX sends calls to. Requires a server API key.

Usage

polymorfa sip-trunk create [flags]

Example

polymorfa sip-trunk create --project 018f0000-0000-7000-8000-000000000002 --input trunk.json

Flags

  • --input <value>takes a valuerequired

    Read the SIP trunk JSON object from a file or stdin (-).

Also accepts the global flags.

polymorfa sip-trunk delete

Delete a SIP trunk.

Delete a SIP trunk and its credentials. Fails with sip_trunk_in_use while a session routes incoming calls to it. Requires a server API key.

Usage

polymorfa sip-trunk delete TRUNK [flags]

Arguments

  • TRUNKrequired

    SIP trunk ID.

Flags

  • --yesbooleanrequired

    Confirm permanent deletion of the trunk.

Also accepts the global flags.

polymorfa sip-trunk endpoint

Show the SIP address for your PBX.

Show the host and ports your PBX sends SIP to, whether each transport requires SRTP, and the UDP port range call audio uses. The address is the same for every trunk. When this environment does not host SIP, the command says so and prints no address. Requires a server API key.

Usage

polymorfa sip-trunk endpoint [flags]

Examples

polymorfa sip-trunk endpoint
polymorfa sip-trunk endpoint --json

Flags

Also accepts the global flags.

polymorfa sip-trunk list

List SIP trunks.

List the SIP trunks of a project. Passwords are never returned. Requires a server API key.

Usage

polymorfa sip-trunk list [flags]

Example

polymorfa sip-trunk list --project 018f0000-0000-7000-8000-000000000002

Flags

Also accepts the global flags.

polymorfa sip-trunk rotate-credentials

Rotate SIP trunk credentials.

Replace the password your PBX uses to place calls through the trunk and print it once with the SIP address your PBX sends calls to. The previous password stops working within about a minute. Requires a server API key.

Usage

polymorfa sip-trunk rotate-credentials TRUNK [flags]

Arguments

  • TRUNKrequired

    SIP trunk ID.

Flags

  • --yesbooleanrequired

    Confirm that the current password will stop working.

Also accepts the global flags.

polymorfa sip-trunk update

Change a SIP trunk.

Change a SIP trunk. Fields you omit keep their values; omit authPassword to keep the stored password. Changes reach new calls within about a minute. Requires a server API key.

Usage

polymorfa sip-trunk update TRUNK [flags]

Examples

polymorfa sip-trunk update 6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10 --disable --expected-revision 3
polymorfa sip-trunk update 6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10 --input changes.json

Arguments

  • TRUNKrequired

    SIP trunk ID.

Flags

  • --disableboolean

    Stop new calls on the trunk.

  • --enableboolean

    Allow new calls on the trunk.

  • --expected-revision <value>takes a value

    Refuse the change if the trunk no longer has this revision.

  • --input <value>takes a value

    Read the JSON changes from a file or stdin (-).

Also accepts the global flags.

polymorfa sip-trunk view

Show a SIP trunk.

Show one SIP trunk, including its revision for guarded updates. Requires a server API key.

Usage

polymorfa sip-trunk view TRUNK [flags]

Arguments

  • TRUNKrequired

    SIP trunk ID.

Flags

Also accepts the global flags.