Skip to content

Connect your PBX

Connect your PBX in one of two ways:

  1. IP-to-IP trunk: no registration; authorize the PBX public IP in the account configuration.
  2. Registered extension: AI4CALL registers an extension on your PBX.

For inbound routing, call the assistant’s virtual number and place that number in the SIP TO field. Virtual numbers are unique to an assistant.

Use GET and PATCH /account/allowed-ips to manage the allowlist. Allowed IPs apply to the entire account, not to an individual assistant. Review the full list before patching it so an existing PBX is not removed accidentally.

For outbound calls through your PBX, use /webhook/outbound_call_pbx; the supplied ipPbx must be on this allowlist.

Use IP-to-IP mode when AI4CALL must reach the PBX public address:

{
"dst": "+390212345678",
"callerId": "+390212300000",
"assistantApiKey": "<ASSISTANT_API_KEY>",
"method_uac": false,
"ipPbx": "203.0.113.10",
"sipPort": "5060"
}

For registered-UAC mode, set method_uac to true and omit both ipPbx and sipPort. Do not combine the two modes in the same request.