Hi, I am using Asterisk 16. Asterisk AMI working fine with users defined in manager.conf file. Anyway to make them realtime just like queues or moh?
There is no such thing for AMI.
Thanks for your reply. So if i update manager.conf file manually, i have to reload manager module.
Can you please confirm that freepbx also update manager.conf file and restart manager module after creating/updating “asterisk manager user”?
I can’t comment on FreePBX or how it works, it’s a separate project.
I don’t think searching an ami user IN REALTIME would be a good idea, this authentication could happen many times per single second !!
with that option out of mind , you are left with loading users at boot time or at manager reload command, in which case you can rely on asterisk #exec
1/ enable it in asterisk.conf
2/ create a script that connects to your database and generate text output such as this below : (i am using python here)
enabled = yes
webenabled = yes
port = 5038
bindaddr = 127.0.0.1
secret = mypass
displayconnects = yes
read = system
write = system
3/ in your manager.conf add this line :
4/ Done, of course your script content is left to your imagination.
Great, thanks for detailed explanation
When you create AMI credentials in FreePBX, they are written to
manager_additiona.conf which is #included in manager.conf. The apply config step will reload manager module.