Transport Comparison
| AudioSocket | WebSocket | |
|---|---|---|
| Asterisk version | 16+ | 20+ |
| Module | res_audiosocket | chan_websocket |
| Protocol | Raw TCP port 4573 | WSS (standard HTTPS port) |
| Firewall | TCP 4573 must be open outbound | Standard HTTPS only |
| Audio codec | SLIN 16-bit 8kHz | μ-law 8kHz |
| Latency | Lowest | Slightly higher |
| TLS | No | Yes (native WSS) |
| Best for | LAN / private network | Cloud / NAT traversal |
AudioSocket
Outbound via ARI (AudioSocket)
For outbound calls, Rapida uses Asterisk’s ARI to originate the channel. TheRAPIDA_CONTEXT_ID channel variable is injected by Rapida ARI automatically:
| Key | Required | Description |
|---|---|---|
ari_url | Yes | ARI base URL, e.g. http://asterisk.local:8088 |
ari_user | Yes | ARI username |
ari_password | Yes | ARI password |
endpoint_technology | No | Channel technology — default PJSIP |
trunk | No | SIP trunk name — builds PJSIP/trunk/number |
WebSocket
Outbound via ARI (WebSocket)
Production URLs
For Rapida SaaS:| Variable | Value |
|---|---|
RAPIDA_HOST (HTTP/WebSocket) | websocket-01.in.rapida.ai |
RAPIDA_AS_HOST (AudioSocket TCP) | socket-01.in.rapida.ai |
RAPIDA_PORT | 4573 |
SIP
Built-in SIP server for direct SIP connectivity
Configure Your Own
Add a new telephony provider
Configuration
AUDIOSOCKET env vars reference
Telephony Overview
All providers comparison