Need help on AMI

Hi, friends:

I am using a PBX in a Flash 1.4 with Asterisk 1.4 and trying to configure my server’s AMI so that it can work with an iPhone app for call back, the app’s description can be found at:

but I can’t get the app to work, obviously, that’s why I am here. :stuck_out_tongue:

I find something wired about the AMI, and hope you guys can help me out here:

  1. I can access the AMI through telnet from other machine, when I point to port 5038. but initially, I can’t login, after some trail and error, I find the AMI has to follow a strange format. There must be a space after the “:” symbol. or it won’t work. e.g., it must look like this to login:
    action: login
    username: test
    secret: test
    any other format won’t work. is this a designed way? or a bug?

  2. since I find the connection doesn’t work for iPhone app, I tried to test the connection through HTTP. I find the article in … %28AJAM%29 about how to do that. I followed the procedures, but when I put the link in the browser, which is: “http://my-host-ip:5038/asterisk/manager?action=login&username=test&secret=test”, but it doesn’t work. if will keep going until time out, then the asterisk cli will tell me: Connect attempt from ‘XXX.XXX.XXX.XXX(my ip)’ unable to authenticate. I find it wired since I can’t telnet,how come I can’t access from browser? Or my command is wrong?

To add up a bit more info, while the page is loading the url I put above, I restart the asterisk, I will be prompt with an error msg,
"Response: Error
Message: Missing action in request"
which means the AMI through HTTP is enabled and working. however, the parameter of the username and secret can’t pass in.

can anyone help me out or give me some hint? thx in advance!


pls kindly check that manager.conf is configured with the login credentials and access rights.

displaysystemname = yes
enabled = yes
; enable web only when required
webenabled = yes
port = 5038

bindaddr =

secret =
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config
;local access only



I checked. I have properly configured the manager.conf.

All what u have below is being set.

what’s more, if u set the permit to, you will only be able to access from local loop. I changed it to to allow access from any where.

Hi, all,

I manged to solve the problem. I installed a fresh asterisk on a virtual machine. and did a make samples. Then I copy paste over the httpd.conf. and I enabled the options I need. it is working then. seems like the file I own have something wrong that I didn’t notice previously. Hope this may help someone in need of this info.