Jump to content

AMQP with Java


Recommended Posts

Hi, I have a Java background and have recently started looking into KAZOO. I'm hoping to be able to plug in to KAZOO's AMQP message bus but from outside of KAZOO and with a Java client instead of Erlang, in order to be able to dictate what to do with an incoming call as an internal KAZOO App (such as CallFlows) might do. Is there anywhere that documents some of the lower level AMQP information, such as what queues I can subscribe to, what messages relate to what functionality, etc.?


Link to comment
Share on other sites

@huwsc90 Its mostly in the form of JSON schemas for the payload formats. Most of the info will be in the source (which hopefully is readable for what you're wanting, even not knowing Erlang).

For instance, a route request to setup a call involves the 'req' payload published to all bound queues, each of which will respond with a 'resp' payload if able. One 'resp' payload will "win" and receive a 'win' payload back on a direct queue.


In there you'll see the 'req_definition' which will list the JSON keys (named headers) of the payload, the routing (and binding) keys used for publishing/binding, etc.


In this directory, you'll see auto-generated schemas. "kapi.route" maps to "kapi_route.erl" for instance, and the 'req' payload.

Should at least get you started, get a queue bound to AMQP for messages, and you can start inspecting things.

Link to comment
Share on other sites

Thanks @mc_, I'm now able to plug in to KAZOO over AMQP and answer an incoming call. I also found it useful inspecting the AMQP messages in a pcap taken from KAZOO when dialling in with a softphone and having Callflows answer the call, to get examples of the messages back and forth.

Is there any way I can use AMQP (or even maybe REST/WebSockets) to connect a non-SIP endpoint to a call that comes through KAZOO? I see numerous options in the API to bridge/transfer/redirect, but all options seem to require a SIP call out to the endpoint. Could I use something like FreeSWITCH's mod_verto through KAZOO?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...