How use TopView Voice Dial-In With Twilio

How use TopView Voice Dial-In With Twilio

AlertTo allow multiple TopView engines to have Dial-in enabled, you must have a separate phone number for each engine.
Notes
These instructions assume you have already set up outgoing voice notifications. Click here to refer to those steps if necessary.

Create a Second SIP Domain

A health warning is generated by a TopView engine when it recognizes both the Incoming and Outgoing softphones are registered to the same SIP extension. To heed this warning, we create a second domain that the incoming softphone can register to instead.
  1. Go to the SIP Domain page
  2. Click the the blue plus sign (‘+’)
  3. Enter a friendly name and give the SIP URI a unique name that is not the same as the domain used for outgoing calls (e.g.: "yourdomaininc")
  4. Click (‘+’) next to Credentials List and provide a friendly name, then add the username and password for your SIP client. This should be the same username and password that you created when you set up Voice Notifications.
  5. Skip Call Configuration. This domain will not handle outgoing calls. 
  6. Set SIP Registration to enabled
  7. Click into the SIP Registration Authentication credential list and select the credential list you created
  8. Click Save
Notes
Free trial accounts will only be able to receive inbound calls from numbers that are verified caller IDs on the account. Click here for more information.

Configure TopView

  1. Run the TopView Configurator and open the configuration.
  2. Click on Voice Dial-In (Configuration Settings -> Remote Access) and click the checkbox to enable voice dial-in.
  3. Click on Copy from primary voice extension
  4. Change the lowest-level domain under SIP Server Host/IP from the first domain name to the second domain name
    1. example: "firstdomain.sip.us1.twilio.com" to "seconddomain.sip.us1.twilio.com"
  5. Click OK to exit Voice Dial-In Settings
  6. Save the configuration and Restart the engine.

Add a TwiML Bin for Incoming Calls.

  1. Go to the TwiML Bins page
  2. Click the the blue plus sign (‘+’)
  3. Name the TwiML bin "TopViewDialIn"
  4. Paste in the following TwiML code
    1. Replace "{Username}" (including brackets) with the SIP client Username (the value of the Username field in the TopView Dial-In VOIP settings) 
    2. Replace "{SecondDomain}" with the second domain name you created.
    3. example: 15005551212@yourdomaininc.sip.us1.twilio.com
  1. <?xml version="1.0" encoding="UTF-8"?>
    <Response>
    <Dial>
    <Sip>{Username}@{SecondDomain}.sip.us1.twilio.com</Sip>
    </Dial>
    </Response>

Configure Twilio Phone Number

  1. Go to the Phone Numbers page
  2. Click on the phone number used by TopView
  3. Under Voice Configuration -> A call comes in
    1. change the first dropdown to "TwiML Bin"
    2. change the second dropdown to "TopViewDialIn"
  4. Scroll to the bottom of the page and click Save