Connecting Panasonic, Avaya, Grandstream and Bitvoice PBXs
This chapter connects the gateway to an IP PBX that is not Asterisk or FreePBX. It covers Panasonic KX-NS/KX-NSX, Avaya IP Office (and Avaya Aura in brief), Grandstream UCM and Bitvoice. Set up the gateway side from SIP trunk first; this chapter only covers the PBX.
Menu names below follow recent firmware. Your firmware may label a field differently or put it under another tab; the values in Values every PBX needs are what matter.
Two ways to connect
| A. SIP trunk to the gateway | B. The bot as a PBX extension | |
|---|---|---|
| What you create on the PBX | An IP-based (peer) SIP trunk, no registration | One SIP extension, for example 7000 |
| Gateway variables | SIP_ALLOWED_IPS |
SIP_REGISTER_URI, SIP_AUTH_USER, SIP_AUTH_PASSWORD, SIP_ALLOWED_IPS |
| How calls reach the bot | An outbound route or short code that uses the trunk | Any call routed to the extension: a DID, an IVR option, a transfer |
| Several bot calls at once | Yes, up to the trunk's channel count | Only if the PBX lets one extension take several calls |
| Uses a PBX trunk licence | Usually yes | Usually no, it uses an extension licence |
| Best for | Production, many parallel calls | Quick start, PBXs where adding a trunk is locked or licensed |
Start with B if you want a first call in a few minutes. Move to A when you need many parallel calls.
Values every PBX needs
| Setting | Value |
|---|---|
| Server or proxy address | <gateway-ip> |
| Port | 5080 (the gateway's SIP_PORT) |
| Transport | UDP |
| Registration (option A) | Off. The gateway does not register to the PBX on a trunk |
| Authentication (option A) | None. The gateway trusts the PBX by its IP in SIP_ALLOWED_IPS |
| Codecs | G.711 only: PCMU (mu-law) and PCMA (A-law). Remove G.729, G.722, Opus and video |
| Packet time (ptime) | 20 ms |
| DTMF | RFC 2833 (telephone-event, payload 101). SIP INFO also works |
| T.38 / fax | Off |
| PRACK / 100rel (reliable provisional responses) | Off. The gateway does not send PRACK |
| Session timers | Off, or let the PBX be the refresher. The gateway answers re-INVITEs |
| Keep-alive (OPTIONS ping) | The gateway answers OPTIONS with 200 OK. If the trunk then shows out of service, turn the ping off |
| NAT / media proxy | The PBX sends audio to the address in the gateway's SDP. Set SIP_PUBLIC_ADDRESS on the gateway when it is behind NAT |
On the gateway, add the PBX's address to SIP_ALLOWED_IPS (exact IPs, no CIDR ranges), and match SIP_CODEC to what your carrier uses: 0 for mu-law, 8 for A-law. Most Indian and European lines use A-law.
Option B: the bot as an extension
This works the same on every PBX in this chapter.
On the PBX, create a generic SIP extension, for example
7000, with a password. Allow G.711 only, DTMF RFC 2833.On the gateway, register to the PBX with that extension:
TELEPHONY_MODE=sip_bridge SIP_PORT=5080 SIP_REGISTER_URI=sip:<pbx-ip> SIP_AUTH_USER=7000 SIP_AUTH_PASSWORD=<extension-password> SIP_ALLOWED_IPS=<pbx-ip>Restart the gateway. The log shows
SIP Registration successful with sip:<pbx-ip>, and the PBX shows extension7000as registered.Route a DID, an IVR option or a ring group to extension
7000. Calling7000from a desk phone is the quickest test.
If the PBX expects a port other than 5060 for registration, put it in the URI: sip:<pbx-ip>:5062. If registration fails, see Registering to a carrier.
Panasonic KX-NS, KX-NSX
Configure in the Web Maintenance Console.
Option A, trunk.
- Add virtual SIP trunk channels: under the slot setup, install a V-SIPGW (virtual SIP gateway) card if none exists. Each channel is one concurrent bot call and needs an activation key.
- Open the card's Port Property for the channels you want to use:
- Provider name:
vexyl. - Proxy server address:
<gateway-ip>. Proxy server port:5080. - Registrar server: blank. Registration: Disable.
- Authentication ID and password: blank.
- Codec priority: G.711A and G.711Mu only. Packet time 20 ms.
- DTMF type: Outband (RFC 2833). T.38: Disable. 100rel: Disable (if listed).
- Provider name:
- Put those channels in their own trunk group.
- Reach the bot by dialling: add an ARS leading-digit entry (for example
8) that seizes that trunk group and strips the digit. - Send a DID to the bot: the DDI/DID table points at extensions, not trunks. Point the DID at a virtual extension with forwarding to an outside number, using the ARS code from step 4. Option B is simpler for DIDs on Panasonic.
Option B, extension. Create a SIP extension (generic SIP phone, not a KX-UT/HDV model), set its password, and route the DID to it in the DDI table.
Transfers back from the bot (TRANSFER_SIP_URI) need REFER on the virtual SIP trunk. Check that your firmware supports it before you rely on it.
Avaya IP Office
Configure in IP Office Manager, then save and merge.
Option A, trunk.
- Line, New, SIP Line. Give it a line number and an outgoing group ID, for example
80. - SIP Line tab: ITSP domain name
<gateway-ip>. Turn REFER Support on if you want bot transfers. Check OOS (the OPTIONS ping) can stay on, because the gateway answers OPTIONS; turn it off if the line shows out of service. - Transport tab: ITSP proxy address
<gateway-ip>, layer 4 protocol UDP, send port5080. Network topology: none (or your NAT profile). - SIP URI tab: add a URI with local URI, contact and display name set to use internal data (or
*), incoming and outgoing group80. - VoIP tab: codec selection custom, G.711 A-law and mu-law only. DTMF support RFC 2833. Fax transport none. Re-invite supported off. PRACK/100rel off where the field exists.
- Add a system short code, for example
8N, feature Dial, telephone numberN, line group ID80. Staff dial8plus any digits to reach the bot. - Send a DID to the bot: give the Incoming Call Route a destination that matches that short code, for example
8100.
Option B, extension. Add a SIP extension and a user with that extension number, set the login code (the password), and point the DID's incoming call route at that user.
Avaya Aura (Communication Manager with Session Manager). In System Manager, add a SIP entity for the gateway (type Other, <gateway-ip>), an entity link over UDP port 5080, a routing policy to it and a dial pattern for the bot numbers. Allow G.711 only in the codec set the route uses, and turn off PRACK and session refresh with UPDATE for that entity. Then route the bot numbers to Session Manager from Communication Manager as you would for any SIP service.
Grandstream UCM
Configure in the UCM web interface.
Option A, trunk.
- Extension/Trunk, VoIP Trunks, Add SIP Trunk. Type: Peer SIP Trunk. Provider name:
vexyl. Host name:<gateway-ip>:5080. Transport: UDP. - Edit the trunk, Advanced Settings:
- Codec preference: PCMA and PCMU only.
- DTMF mode: RFC 4733 (RFC 2833).
- Enable heartbeat detection: optional; the gateway answers OPTIONS.
- Session timer: off. 100rel: off.
- Max channels: the number of parallel bot calls you allow.
- Extension/Trunk, Outbound Routes, Add. Pattern
_8X., strip 1 digit, trunkvexyl. Staff dial8plus digits to reach the bot. - Send a DID to the bot: in the carrier trunk's Inbound Route, choose the destination External Number if your firmware lists it, and enter a number that matches the outbound route from step 3. On firmware without that option, use option B.
Option B, extension. Create a SIP extension, set its SIP/IAX password, allow PCMA/PCMU only, and set the DID's inbound route destination to that extension.
Grandstream UCM can also act as the front PBX for Opus: see Two ways to connect for when that matters.
Bitvoice
Bitvoice PBXs take a standard IP-based SIP trunk. Use the trunk or SIP-provider page of the admin panel and enter the values from Values every PBX needs:
- Add a SIP trunk of the peer or IP-authenticated kind, with host
<gateway-ip>, port5080, UDP, no registration, no username or password. - Allow G.711 A-law and mu-law only. DTMF RFC 2833. Fax off.
- Add an outbound route with a prefix (for example
8) that uses this trunk, or point the DID's inbound route at the trunk if the panel allows it.
For option B, create a SIP extension and register the gateway to it as shown above. If a field in your Bitvoice panel does not match these steps, ask your Bitvoice support for the screen that adds a peer SIP trunk without registration, and give them the values table.
Which bot answers
- With no extra headers, every call through one gateway reaches the default bot, language and voice set in
.env(for a LiteBot brain,LITEBOT_BOT_ID). - If the PBX can add custom SIP headers on the trunk or route, send
X-Bot-Id,X-Language,X-TTS-Provider,X-TTS-VoiceandX-STT-Providerto choose them per call. Every accepted value is listed in Per-call settings reference. - The caller's number reaches the bot as
caller_id, and the dialled number is stored asdestination_number. - A PBX that cannot add headers: use one trunk, or one gateway instance (each on its own
SIP_PORT), per bot profile, or put an Asterisk in front to add the headers.
Testing and common problems
- From a desk phone, dial the short code or extension that reaches the bot.
- On the gateway, watch for
SIP call connectedin the log. If nothing arrives, watch the wire:tcpdump -n udp port 5080. - Speak, and check the bot hears you and you hear the bot.
| What you see | Likely cause | Fix |
|---|---|---|
PBX shows 403 Forbidden, gateway logs Blocked request from unauthorized IP |
PBX address not in SIP_ALLOWED_IPS |
Add the exact address the INVITE comes from. On a multi-NIC PBX this may be the LAN address, not the public one |
| 488 Not Acceptable Here, or call fails at once | No common codec | Allow PCMA and PCMU on the trunk. Remove G.729 or G.722 from the top of the list |
| Call connects, then drops after about 30 seconds | PRACK/100rel or session timer required by the PBX | Turn off 100rel and session timers on the trunk |
| Silence both ways | RTP blocked, or the PBX's media relay sends to a private address | Open the gateway's RTP range from the PBX. Set SIP_PUBLIC_ADDRESS. Turn the PBX's NAT or media-proxy setting on or off to match the network |
| Trunk shows out of service but calls work | The PBX's OPTIONS ping is not answered as it expects | Turn the trunk's keep-alive or out-of-service check off |
| Bot does not react to key presses | DTMF sent in-band or in a format the PBX converts | Set DTMF to RFC 2833 on the trunk or extension |
| Only one bot call at a time | Option B extension limited to one call, or one trunk channel | Raise the extension's call limit, add trunk channels, or use option A |
| Option B never registers | Wrong extension password, or the PBX blocks SIP registration from unknown IPs | Check SIP_AUTH_USER and SIP_AUTH_PASSWORD. Allow the gateway's address in the PBX's SIP security or fail2ban settings |
More symptoms and log lines are in SIP trunk and Troubleshooting.
Next: Asterisk over AudioSocket, or Configuration recipes to choose the speech and AI providers.