How can I handle inbound calls to my voice-enabled virtual number?

Question

  • How to forward calls using Voice API
  • How to forward calls to VoiceXML
  • How to forward calls to a SIP endpoint
  • How to forward calls to my mobile/cell/land line number

Context

You have four options for handling inbound calls to a Nexmo voice-enabled virtual number (DID). You may forward the call to:
1) an Voice API Application
2) another voice-enabled number directly
3) a SIP address
4) a VoiceXML script


Answer

Forward to Application (Voice API)
1) You can configure the application ID in Dashboard, by setting "Voice Setting" to "Forward to APP", once you have created your application using the Application API, referencing your NCCO and Event endpoints.

When we receive the call, we connect your call and run the parameters specified in your NCCO. You can play text-to-speech, play audio, create voicemails, start conferences, IVR menus and much more.

Example use cases can be found on our Tutorials.


Forward to Phone
2) You can configure the forwarding number in Dashboard, by setting the "Voice Setting" to "Forward to Phone" and entering a number in international format.

Forward to SIP
3) You can configure the forwarding address in Dashboard, by setting the "Voice Setting" to "Forward to SIP" and entering the address in the format of IP xxx.xxx.xxx.xxx or a SIP address xxxx@xxxx.xxx.
There is no authentication for inbound calls, however you can limit the requests to only our subnets.

Best practice is to set: 12345@your.IP.address or 12345@your.domain

Forward to VoiceXML (Call API)
4) You can configure the VoiceXML URL in Dashboard, by setting the "Voice Setting" to "Forward to VXML". Once you have created a VoiceXML script and are hosting it on a web server you can configure the VoiceXML URL against each voice number.

When we receive the call, we connect your call and run the script. You can play text-to-speech, play audio files, create voicemails, create IVR menus with call transfer or transfer the call to a phone number.

Example VoiceXML scripts can be found in our documentation.

If you are using a firewall, you should whitelist the following IPs:

174.37.226.128/27
174.36.209.48/28
119.81.194.0/27
119.81.38.216/29
119.81.44.0/28

We discourage anybody from using HTTPS for VoiceXML URLs, as we are only able to support SHA-1 certifications which are vulnerable. We advise all of our customers to use HTTP for the VoiceXML URLs.

Have more questions? Submit a request