comms-router icon indicating copy to clipboard operation
comms-router copied to clipboard

How it works "app.nexmoCallbackBaseUrl" ?

Open HoriNexmo opened this issue 5 years ago • 1 comments

Hi, Appreciated if I have following answer.

  1. What is difference "app.callbackBaseUrl" and "app.nexmoCallbackBaseUrl" ?

  2. Case of "app.nexmoCallbackBaseUrl", It looks work to callback Agent SIP number When task being assigned to Agent ?

Regards, Hori

HoriNexmo avatar Jul 10 '19 07:07 HoriNexmo

Hi Hori, app.nexmoCallbackBaseUrl points to URL that will be used from the Nexmo server for invoking web hooks, e.g. http://host:port/demo-app-root/api For example, when a call is received on nexmo side, nexmo will call this app.nexmoCallbackBaseUrl in order to get answer ncco

app.callbackBaseUrl is URL that will be used from the Comms Router web app for invoking Task callback hooks, e.g. http://host:port/demo-app-root/api For example, when task gets in state assigned.

Sample workflow is as follow:

  • Nexmo receives a call and notifies demo-app using app.nexmoCallbackBaseUrl.

  • Demo-app creates a task in comms-router and returns some ncco. In the task, there is a parameter where is the callback that will be called by comms-router on task change. Here app.nexmoCallbackBaseUrl is used as a prefix

  • When the task could be started by agent, comms-router notifies demo-app about status of the task using app.callbackBaseUrl.

  • demo-app initiates call to an agent, bridges incoming call to the agent, and when call is completed, sets task as completed.

angel-popov avatar Jul 10 '19 12:07 angel-popov