Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo app application.properties id setting #89

Open
weihongchua opened this issue Dec 18, 2017 · 6 comments
Open

demo app application.properties id setting #89

weihongchua opened this issue Dec 18, 2017 · 6 comments
Assignees

Comments

@weihongchua
Copy link

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=

@ikrustev
Copy link
Contributor

Exactly. I admit the name is a bit misleading. Will clarify in the doc and change it in subsequent release.

@weihongchua
Copy link
Author

@ikrustev Could you provide some example here. I am trying to get the demo app working.

@ikrustev
Copy link
Contributor

@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>

@ikrustev ikrustev self-assigned this Dec 18, 2017
@weihongchua
Copy link
Author

weihongchua commented Dec 19, 2017

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?

@ikrustev ikrustev assigned angel-popov and unassigned ikrustev Dec 19, 2017
@ikrustev
Copy link
Contributor

@angel-popov could you, please, verify the config I've posted here and answer the questions?

@angel-popov
Copy link
Contributor

angel-popov commented Dec 19, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants