Difference between revisions of "AMI Connection"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 23: Line 23:
Solution:  
Solution:  


1. upgrade GUI from SVN
# upgrade GUI from SVN
2. Execute to your DB:
# Execute to your DB:


  INSERT INTO conflines (name, value) SELECT 'AMI_Host', '127.0.0.1' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Host') = 0;
  INSERT INTO conflines (name, value) SELECT 'AMI_Host', '127.0.0.1' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Host') = 0;
  INSERT INTO conflines (name, value) SELECT 'AMI_Username', 'mor' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Username') = 0;
  INSERT INTO conflines (name, value) SELECT 'AMI_Username', 'mor' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Username') = 0;
  INSERT INTO conflines (name, value) SELECT 'AMI_Secret', 'morsecret' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Secret') = 0;
  INSERT INTO conflines (name, value) SELECT 'AMI_Secret', 'morsecret' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Secret') = 0;

Revision as of 08:09, 29 October 2008

Check settings in /etc/asterisk/manager.conf, should have"

[general]
enabled = yes

The end of this file should look like this:

[mor]
secret = morsecret
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Attention, these settings are valid only if the asterisk server and MOR gui are in the same server. If they are on a different servers you should edit these settings according to your needs.

Reload asterisk


Then check settings in your GUI: SETUP - Settings - AMI Interface. They should be 127.0.0.1/mor/morsecret.

If these settings are empty when you save them - that means DB does not have necessary fields.

Solution:

  1. upgrade GUI from SVN
  2. Execute to your DB:
INSERT INTO conflines (name, value) SELECT 'AMI_Host', '127.0.0.1' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Host') = 0;
INSERT INTO conflines (name, value) SELECT 'AMI_Username', 'mor' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Username') = 0;
INSERT INTO conflines (name, value) SELECT 'AMI_Secret', 'morsecret' FROM dual WHERE (SELECT COUNT(*) FROM conflines WHERE name = 'AMI_Secret') = 0;