I am trying to create a view in my asterisk server mysql db so that I can see IPs mapped to accounts. The issue is that the information is held on the same server in two seperate databases
database1 = asterisk
database2 = endpointconfig
database2 has two tables that I need and database1 has 1 table I need.
I tried the following code below and am definatley doing something wrong
CREATE VIEW SITEPHONE
SELECT D.name,extension FROM asterisk.users
INNER JOIN endpointconfig.endpoint_account.account O ON O.account = D.extension
What I need is there is a vale in database 1. so total is "asterisk.users.name" is what I want to pull from that table by matching its value of 'asterisk.users.extension"
unt" then I need to match that table up to another table by endpointconfig.endpoint.id
asterisk.users.extension = endpointconfig.endpoint_ac
endpoint.endpoint.id = endpointconfig.endpoint.id
Results in view should be