Configuring inbound calls with SIP

Overview

This article will show you how to accept the call from your SIP Provider or IP PBX.

Prerequisites

  • Dasha CLI
$ npm install --global "@dasha.ai/cli"
  • You have to be logged into your account using Dasha CLI:
$ dasha account login
  • Your application (or example app from this tutorial)
  • Access to SIP Provider or your PBX, for example you can use Twilio

Configuring on Dasha side

$ dasha sip create-inbound --application-name <your_app_name> <config_name>

For this example

$ dasha sip create-inbound --application-name sip sip-inbound-calls
  • <your_app_name> name of your app (you can find it in .dashaapp file), in this example sip
  • <config_name> unique name of your configuration, for example office-pbx

The output of this command will show you the auto-generated sip URI, for example sip:c23151ed-2bdd-41ee-9f7a-54af8a611a36@sip.us.dasha.ai.

Configuration with Twilio SIP Trunking

  1. Buy a phone number https://www.twilio.com/console/phone-numbers/search
  2. Create sip trunk https://www.twilio.com/console/sip-trunking/trunks
  3. Go to tab Numbers
  4. Press a plus button to assign the phone number to sip trunk
  5. Go to tab Origination
  6. Press a plus button near to Origination URI and write Origination SIP URI with an URI you got from Dasha CLI
  7. Start your app (node main.js)
  8. Call the phone number (1) using your cell phone

Example output

Dasha SDK allows you to print self diagnostics information on starting your app, here you can see application deployment and registration process

We've called Twilio phone number from phone number 19733588889, and here you can see information, that was passed by Dasha about this call

And here we can see dialogue output context with success variable.

  • When success is true - user and dasha can hear each other
  • When success is false - something went wrong