comms-router
comms-router copied to clipboard
demo app application.properties id setting
In demo app application.properties, how do one find the id information to be set in the properties file? is routerId = Ref Id?
comms.routerId= comms.planId= comms.queueId=
Exactly. I admit the name is a bit misleading. Will clarify in the doc and change it in subsequent release.
@ikrustev Could you provide some example here. I am trying to get the demo app working.
@weihongchua here you are. Let me know if you need anything else:
# the demo application callback as visible by the router
app.callbackBaseUrl=http://localhost:8080/demo-application/api
# the demo application callback as visible by nexmo (external URL)
app.nexmoCallbackBaseUrl=https://api.comms-router.com/demo-application/api
app.phone=<some phone number>
comms.queueId=queue-ivr
comms.planId=simple-menu
comms.routerUrl=http://localhost:8080/comms-router-web/api
comms.routerId=router-ivr
nexmo.appId=<nexmo api id>
nexmo.appPrivateKey=private.key
app.musicOnHoldUrl=<some music on hold url>
Is the following the answer_url that needs to be configured in Nexmo voice application? app.nexmoCallbackBaseUrl=https://api.comms-router.com/demo-application/api
One would have created multiple queue ids, how shall one populate the comms.queueId field?
@angel-popov could you, please, verify the config I've posted here and answer the questions?
callback parameter is specified in the property. Note that it could accept user and password in the url. app.nexmoCallbackBaseUrl=https://user:[email protected]/demo-application/api
In nexmo voice setup - we should add
https://user:[email protected]/demo-application/api/event - as event url and
https://user:[email protected]/demo-application/api/answer_inbound - as answer url
When router assigns a task to agent, the router calls task's callback-url. In the body of the request there is info about task, the queue and router. Parameter comms.queueId is obsolete. Demo app uses plan that specifies which task goes to which queue.
The db setup is something like this:
Description:Replace or create router. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr' -H 'Content-type:application/json' -d "{"name":"name","description":"description"}" Response:{"ref":"router-ivr"} Checks:ok - publish ROUTER id ->router-ivr Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create queue. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/queues/en-support' -H 'Content-type:application/json' -d "{"description":"description","predicate":"HAS(#{language},'en') && #{department}=='support'"}" Response:{"ref":"en-support"} Checks:ok - publish QUEUE id ->en-support Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create queue. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/queues/es-support' -H 'Content-type:application/json' -d "{"description":"description","predicate":"HAS(#{language},'es') && #{department}=='support'"}" Response:{"ref":"es-support"} Checks:ok - publish QUEUE id ->es-support Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create queue. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/queues/en-sales' -H 'Content-type:application/json' -d "{"description":"description","predicate":"HAS(#{language},'en') && #{department}=='sales'"}" Response:{"ref":"en-sales"} Checks:ok - publish QUEUE id ->en-sales Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create queue. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/queues/es-sales' -H 'Content-type:application/json' -d "{"description":"description","predicate":"HAS(#{language},'es') && #{department}=='sales'"}" Response:{"ref":"es-sales"} Checks:ok - publish QUEUE id ->es-sales Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create queue. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/queues/queue-ivr' -H 'Content-type:application/json' -d "{"description":"description","predicate":"1==1"}" Response:{"ref":"queue-ivr"} Checks:ok - publish QUEUE id ->queue-ivr Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Replace or create agent. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/en-es-support' -H 'Content-type:application/json' -d "{"address":"12312377880","capabilities":{"language":["en","es"],"department":"support"}}" Response:{"ref":"en-es-support"} Checks:ok - publish AGENT id ->en-es-support Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Set state=ready of the agent Result:pass Request:curl -s -X POST 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/en-es-support' -H 'Content-type:application/json' -d "{"address":null,"state":"ready","capabilities":null}" Response:"" Checks:OK - result equals to ""
Description:Replace or create agent. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/en-sales' -H 'Content-type:application/json' -d "{"address":"12017621651","capabilities":{"language":["en"],"department":"sales"}}" Response:{"ref":"en-sales"} Checks:ok - publish AGENT id ->en-sales Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Set state=ready of the agent Result:pass Request:curl -s -X POST 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/en-sales' -H 'Content-type:application/json' -d "{"address":null,"state":"ready","capabilities":null}" Response:"" Checks:OK - result equals to ""
Description:Replace or create agent. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/es-sales' -H 'Content-type:application/json' -d "{"address":"12017621652","capabilities":{"language":["es"],"department":"sales"}}" Response:{"ref":"es-sales"} Checks:ok - publish AGENT id ->es-sales Checks:ok - result contains key "ref" Checks:ok - Response is json
Description:Set state=ready of the agent Result:pass Request:curl -s -X POST 'http://localhost:8080/comms-router-web/api/routers/router-ivr/agents/es-sales' -H 'Content-type:application/json' -d "{"address":null,"state":"ready","capabilities":null}" Response:"" Checks:OK - result equals to ""
Description:Create new plan to queue NULL with predicate 1 ==1. Result:pass Request:curl -s -X PUT 'http://localhost:8080/comms-router-web/api/routers/router-ivr/plans/simple-menu' -H 'Content-type:application/json' -d "{"rules":[ {"tag":"en-sales", "predicate":"#{language}=='en' && #{department}=='sales'", "routes":[{"queueRef":"en-sales","priority":0,"timeout":3600}]}, {"tag":"es-sales", "predicate":"#{language}=='es' && #{department}=='sales'", "routes":[{"queueRef":"es-sales","priority":0,"timeout":3600}]}, {"tag":"en-support", "predicate":"#{language}=='en' && #{department}=='support'", "routes":[{"queueRef":"en-support","priority":0,"timeout":3600}]}, {"tag":"es-support", "predicate":"#{language}=='es' && #{department}=='support'", "routes":[{"queueRef":"es-support","priority":0,"timeout":3600}]}], "description":"description", "defaultRoute":{"queueRef":"queue-ivr","priority":0,"timeout":3600}}" Response:{"ref":"simple-menu"} Checks:ok - result contains key "ref" Checks:ok - Response is json Result:pass