Embed the Wavix voice widget in your web app to add inbound and outbound calling with minimal code.
Wavix Embeddable is a ready-to-use web phone you can add to any web app, such as a CRM or support portal. It gives your users inbound and outbound calling, call history, custom styling, and real-time call events, with little code. Answering Machine Detection (AMD) and call recording work out of the box.
The widget loads from a script that Wavix hosts. It signs in with a short-lived widget token tied to your SIP trunk: you create the token on your server, then start the widget in the browser. You can embed it inline on the page, or open it in a separate window.
Load the widget script and start it. For sip.server, use the SIP gateway with the lowest ping from your users (find the gateway list on the Numbers & trunks page in the Wavix portal). Replace WIDGET_TOKEN with the token from Step 1.
Outbound calls work as soon as you embed the widget. Inbound calls reach the widget only if the number the customer dials is routed to the widget’s SIP trunk. If the number has no destination, or points to a different trunk, it won’t ring the widget, even though the widget loads and signs in correctly.In the Wavix portal, go to Numbers & trunks, open the number, and set its destination to the SIP trunk your widget token uses. You can also set the destination with the API. See Update number destination.
If inbound calls don’t reach the widget, the usual cause is a number with no destination, or one routed to a different SIP trunk. Check that the number’s destination is the widget’s SIP trunk.
The incoming-call screen appears, but answering fails. The call shows the answer buttons, then either throws a JavaScript error (such as Cannot read properties of null (reading 'invite')) or connects for about a second and drops with no audio.This almost always means the dialed number isn’t routed to the widget’s SIP trunk. Set the number’s destination to that trunk, as shown in Enable inbound calls.