This handbook provides the PortaSwitch configuration steps required to set up the Voice AI Agent (Apifonica) module, available via the Add-on Mart.
After completing the described steps, refer to this
instruction for comprehensive instructions on configuring and deploying the Voice AI Agent (Apifonica) module.
Configuration overview
Link copied to clipboard
- Verify SIP-to-SIP connection
- Create a new node for the Voice AI GW
- Create a new service for calls handled by Voice AI agents
- Create a new rate code for the AI agent service
- Create a new tariff and rate for the AI agent service
- Update the product to include the AI agent service
- Create a vendor for Voice AI GW
1. Verify SIP-to-SIP connection
Link copied to clipboard
Make sure an internal connection for SIP-to-SIP (on-net) calls exists in PortaBilling. This is required for routing calls between PortaSIP and the Voice AI GW.
2. Create a new node for the Voice AI GW
Link copied to clipboard
- Navigate to Infrastructure > Nodes and fill in the following details:
- Click Save & Edit details.
- Navigate to the Communication with billing panel, turn on the Enable communication with billing toggle, and fill in the following details:
3. Create a new service
Link copied to clipboard
- Navigate to Service catalog > Services.
- Click + Service and fill in the new service details:
- Click Save.
4. Create a new rate code
Link copied to clipboard
- Navigate to Service catalog > Rate codes.
- Click + Add and fill in the new rate code details:
5. Create a new tariff and rate
Link copied to clipboard
- Navigate to Service catalog > Tariffs.
- Click + Tariff and fill in the new tariff details:
- Click Save & Edit.
- On the Rates page, click + Rate, select AI-AGENT rate code, and define the price for calls to AI Agent.
6. Update the product
Link copied to clipboard
- Navigate to Service catalog > Products and find the product assigned to your cloud PBX customers.
- Add AI agent service to the product. On the product page, go to Services, click Add a service, select the checkbox for AI agent service, and click Add.
- Add a new usage charge entry to the product. On the product page, go to Usage charges, click Add, and fill in the details:
7. Create a vendor for Voice AI GW
Link copied to clipboard
A vendor connection is required to generate xDRs and track costs for calls routed to AI agents. You can create a separate vendor and connection for this, or add a new connection to the existing vendor.
- Navigate to Service catalog > Tariffs.
- Click + Tariff and fill in the new tariff details:
- Click Save & Edit.
- On the Rates page, click + Rate, select AI-AGENT rate code, and set the per-minute cost of calls to AI Agent (if any).
- Create a connection for calls handled by the AI agent. On the vendor page, navigate to Connections, click + Add, and fill in the connection details:
- Name – specify the connection name, e.g., Calls to AI Agent.
- Service type – select Voice calls.
- Type of connections – select PSTN.
- Direction – select To vendor.
- Tariff – select the tariff created in step 7.
- Node – select the node configured in step 2.
- Capacity - type the maximum number of simultaneous calls handled by the node. This parameter is only used for correctly scaling the load graph for the connection.







