You'll find here a quick patch against the asterisk AMI proxy astmanproxy 1.21 ( that will allow you to use it with the asterisk-java java library (

What it does:
  1. Have astmanproxy honor the ActionID during the authentication and logoff phases so asterisk-java can track the action (this dirty patch requires that the client sent an ActionID header, not sure it won't segfault without it)
  2. Keep the username and password in the users file unaltered (the stock astmanproxy converts it to lowercase, that doesn't work with all asterisk versions)
  3. Modify the header sent by the proxy:  "Asterisk Manager Proxy" instead of "Asterisk Call Manager Proxy" so the library's startsWith("Asterisk Manager") check works (although this is now fixed in the latest asterisk-java)
  4. Restore the logout message so the proxy is more transparent (we had tools that expected the famous "Thanks for all the fish." instead of "Goodbye: Y'all come back now, y'hear?")
  5. Add the missing "Response" headers for failed authentication and logoff.

EDIT 2008/02/11: Patch updated, previous one segfaults astmanproxy on authentication failure. Thanks to Thilo Stallherm for the patch on the patch :)

Click here for the patch. Apply to astmanproxy 1.21 (latest as of 2007/10/01), make & make install as usual...

Gaetan Minet