API Asterisk Java features?

Hello everyone,

I am actually looking for an Asterisk API in order to allows a client program to connect to an Asterisk instance and issue commands or read events.

I have found Asterisk Java and I want to know, what are its features?

For example, can it send actions to Asterisk like agent login/logoff, presence state?
And can it read events like agent presence state, registered peers?

Best regards,
Thank you in advance.

Asterisk-java doesn’t seem to have support beyond 1.6 from what I can see.

What you’re probably looking for is and AMI or REST API. Google them, and you should find plenty of info.

Here’s a manual way to use AMI. Press Enter twice to run the Action once all of the info has been entered.

enabled = yes
webenabled = no

port = 5038
bindaddr =


mark@mark ~ $ telnet localhost 5038
Connected to localhost.
Escape character is ‘^]’.
Asterisk Call Manager/2.8.0
Action: Login
Username: asterisk
Secret: asterisk

Response: Success
Message: Authentication accepted

Action: Command
Command: core show hints

Response: Follows
Privilege: Command

-= Registered Asterisk Dial Plan Hints =-

_10XXX@hints : Custom:${EXTEN}@hint State:Unavailable Presence: Watchers 0
_ZXXXX@hints : SIP/${EXTEN} State:Unavailable Presence: Watchers 0
12966@hints : SIP/12966 State:Idle Presence:not_set Watchers 1

  • 3 hints registered

Action: Logoff

Response: Goodbye
Message: Thanks for all the fish.

Connection closed by foreign host.

Thank you for your answer :smile:

If I understand what are you telling me, I can install and use the AMI directly on the server?

Have a look at asteriskdocs.org/en/3rd_Edit … k-AMI.html

–Satish Barot