Skip to main content

SIP trunk

Connect your own SIP carrier or PBX to place and receive calls through Fonema agents instead of using Fonema-managed phone numbers.

SIP trunk is available when your account's partner has a SIP domain configured. If you do not see SIP trunk under New telephone, contact your Fonema administrator.

Outbound calls (your carrier)

Use this when Fonema should place outbound calls through your SIP provider.

1) Add a SIP number

  1. Open Telephones in the dashboard.
  2. Click + New telephone.
  3. Select SIP trunk.
  4. Fill in your trunk details and click Add.

SIP trunk form

2) Outbound trunk fields

FieldRequiredDescription
Caller ID numberYesYour DID in E.164 format (for example, +15551234567). Used as the outbound caller ID.
NameNoFriendly label shown in the dashboard.
Trunk hostYesSIP hostname or IP of your carrier (for example, trunk.customer.com).
PortYesSIP port. Default is 5060.
TransportNoudp, tcp, or tls. Default is udp.
From domainYesSIP domain sent in the From header (usually your carrier domain).
Auth usernameConditionalRequired if you set a password, or if the trunk requires registration.
Auth passwordConditionalRequired if the trunk requires registration.
Trunk requires registrationNoEnable when your carrier only accepts calls after a SIP REGISTER with the credentials above.

3) Assign the number to an agent

  1. Open the agent profile.
  2. Go to InstructionsEdit agent.
  3. Open the Media tab.
  4. Under Telephone for outgoing calls, select your SIP number.
  5. Click Update.

Agent phone settings

If this is your company's first phone number, Fonema automatically assigns it to agents that do not have an outbound number yet.

Inbound calls (to your agents)

Use this when your carrier or PBX should forward inbound calls to a Fonema agent over SIP.

1) Enable SIP inbound

  1. Open Telephones.
  2. In the SIP inbound panel at the top, click Enable SIP inbound.
  3. Copy and store the credentials shown in the dialog:
    • SIP username
    • Password (shown only once)
    • SIP dial target (example format: 4829103746@sip.example.com)
warning

The password is displayed only once. Save it securely before closing the dialog. Fonema stores only a one-way hash and cannot show the password again.

2) Route calls to an agent

Each agent has a unique SIP dial target in the format:

<agentNumber>@<sip-domain>

Find it in the agent profile under the Media tab → Telephone for incoming callsSIP dial target.

Configure your PBX or carrier to forward the customer's DID to that address and authenticate with the SIP inbound credential from step 1.

3) Rotate credentials

If you need a new password:

  1. Open Telephones.
  2. In the SIP inbound panel, click Rotate credential.
  3. Confirm the action and update your PBX with the new password immediately.

Rotating invalidates the current password. Inbound calls fail until your PBX is updated.

Example PBX configuration

Typical setup on your side:

  1. Outbound: Fonema sends calls to your trunk host using the credentials you provided when adding the SIP number.
  2. Inbound: Your PBX registers or authenticates to Fonema's SIP domain and forwards DIDs to <agentNumber>@<sip-domain>.

Exact steps depend on your carrier (Twilio Elastic SIP, Asterisk, FreePBX, etc.). Share the SIP dial target and inbound credentials with whoever manages your telephony.

Troubleshooting

IssueWhat to check
SIP trunk option is missingYour partner may not have a SIP domain configured.
Outbound calls failVerify trunk host, port, transport, from domain, and auth credentials. If your carrier requires registration, enable Trunk requires registration.
Inbound calls do not reach the agentConfirm the PBX forwards to the correct <agentNumber>@<sip-domain> and uses the current SIP inbound username and password.
Calls fail after rotating credentialsUpdate the password on your PBX with the new value from the rotation dialog.