Jump to content

Recommended Posts

Posted

HI James Aimonetti,

We are trying to create a workflow using the PIVOT as our call configurations are outside Kazoo and we need to retrieve from there. But the flow is some thing like this.

  1. A call comes to a specific number to Kazoo.
  2. The associated call flow will get executed.
  3. Now a PIVOT will execute to invoke the external application. It gives the response back saying that play media while we are searching for an available operator  and ends.
  4. The external system wants to make an API call(to be developed as custom API) to tell that please dial to this AGENT number.

Now the question is how to update the callflow object with the received in the API call in point 4? Please suggest the way forward.

Thanks & Regards

Ramesh

 

Posted

After a little bit ay R & D, figured out that METAFLOW is the way to go. Could you please confirm? I think we should set the Metaflow against a accountid/callflowid/callid. How to tell Kazoo that this metaflow shoud run against a specific call/callflow? Could you please advice?

Posted (edited)

Thank you so much mc_ for the direction. Will try this and keep you posted on this. Can you also guide us how to make the Konami application run? Do we have have instructions documented somewhere? I have gonr through 

https://github.com/2600hz/kazoo/tree/master/applications/konami

But did not find the instructions

Or how to check if that is already running?

 

Edited by Ramesh Atta (see edit history)
Posted (edited)

Hi MC_,

We have done the following steps.

We have enabled the konami kazoo application  using sup kapps_controller start_app konami
We have also enabled the metaflows in crossbar by sup crossbar_maintenance start_module cb_metaflows
we enabled the cb_channels module using sup crossbar_maintenance start_module cb_channels

After doing these things also, the logs says that the metaflow has been put on the channel, but not able to see it is running.
We are trying for help from Kazoo forums. 

The sequence of steps:

  1. A specific call flow has been mapped to a number
  2. A PIVOT has been added in the call flow and mapped to a URL. The output from the URL is { "module": "play", "data": { "id": "silence_stream://60000", } }
  3. After that we have executed a PUT on the channel with a metaflow definition : http://ip:8000/v2/accounts/:accountid/channel/:UUID, we have replaced the accountid and UUID from Kazoo log
  4. The metaflow we PUT was { "action": "metaflow", "data": { "module": "play", "data": { "id": "476174715a4ddb1c377334401213daa8" } } }
  5. Kazoo log says that PUT has been successfully executed and callflow ends with out playing the media with the 14d528a8d83fc0361cfc6ebcf8837d50 id.
  6. We are not able see if the metaflow is executing in the log. Somehow system is not executing the metaflow

Could you please check and guide us, where are we going wrong?

Could you please explain how to enable the metaflow on an account?

Thanks & Regards

Ramesh

 

 

Edited by Ramesh Atta (see edit history)
Posted

H MC_,

 

Yes we did configured the metaflows on the account. It was able to bind the binding digit as "*" which is printing in the freeswitch log. But after that it is not accepting subsequent digits to inoke the corresponding module. 

 

Here are the detailed thags that we have done.

1. 

{
"data": {
"binding_digit": "*",
"listen_on": "self",
"numbers": {
"2": {
"data": {
"id": "476174715a4ddb1c377334401213daa8",
"leg": "both"
},
"module": "play"
}
}
}
2. After setting the metaflow on the account
 we have started the konami app
started the cb_channels module
started the cb_metaflow module
2. While the call is playing the scilence stream , we have pressed "*2" with the expectation that it will execute the play module , but nothing happens
 
Could you please check this once and see if we are doing something wrong?.
  • Administrators
Posted

You will need to consult your logs to see that callflows sends the metaflow request to start the Konami listener and that Konami is receiving the DTMFs and attempting to match them to a metaflow.

  • 1 month later...
Posted

Hi MC_,

We are able to resolve the metaflow issue by changing the routing key of metaflow and  succesfull in receiving the put request and send to konami_listener queue.

But we are getting the below  error in konami_listener function handle_metaflow.

sandbox 2600hz[28688]: |0000000000|Undefined:Undefined(emulator) Error in process <0.6148.0> on node 'kazoo_apps@sandbox.com' with exit value:#012{function_clause,[{kz_json,get_json_value,[<<"Custom-Channel-Vars">>,undefined,{[]}],[{file,"src/kz_json.erl"},{line,771}]},{kapps_call,from_json,2,[{file,"src/kapps_call.erl"},{line,439}]},{konami_listener,handle_metaflow,2,[{file,"src/konami_listener.erl"},{line,71}]}]}.

does the put request needs to have Custom-Channel-Vars also.

Below is the put request

{"action":"metaflow","data":{"module":"callflow","data":{"flow":{"module":"set_variables","data":{"custom_application_vars":{"action-name":"play-media","tenant-id":"92f50f30-661c-11e6-b9-ca81484488df","interaction-id":"87ea1654-f964-4f7d-8927-8252eae1e1e8","sub-id":"4b2f4f1c-6f6654-8ff0-7d6c4c4f6972","action-id":"89123b50-fa4d-11e9-8a87-45be5952b"}},"children":{"_":{"module":"play","data":{"id":"http://testlabs-dev-configurator-media.s3.amazonaws.com/92f50f30-661c-11e6-b1b9-ca81488df/1990f37d-2282-4815f5-3b8fe59ef5fd/Coincidences.mp3","terminators":[]},"children":{"_":{"module":"pivot","data":{"method":"POST","req_format":"kazoo","voice_url":"https://us-east-1-dev-kazoo-gateway.testlabs.net/tenants/92f50f3061c-11e6-b1b9-ca81484488df/interactions/87ea1654-4-4f7d-8927-8252eae1e1e8/tasks/4b2f4f1c-6f66-4254-8ff0-7d6c4c4f6972/actions/89123b50d-11e9-8a87-45b605e5952b?actionName=play-media"},"children":{}}}}}}}}}

 

Please have a look and let us know If any modifications are required.

 

Regards,
Vijay

 

 

Posted
On 9/18/2019 at 5:15 PM, mc_ said:

You are on the right track. You need to use the channels API: https://docs.2600hz.com/dev/applications/crossbar/doc/channels/#execute-an-application-against-a-channel

Enable metaflows on the account, execute your pivot request as before, then use the Channels API to interact with the call in progress. You'll need Konami running to handle the call manipulation.

does this require konami pro or the opensource konami is ok

×
×
  • Create New...