- Joined
- Sep 11, 2012
- Messages
- 2
- Reaction score
- 0
Hey guys, just been writing C# code based off the samples provided for the object model API.
I've sucessfully connected to the configuration server using:
With that I'm getting a list of extensions (not 100% sure on what "DN" is an abbreviation of). I'm also a little confused about the significance of the ApplicationName, how unique does it need to be, why does the sample use a random number?
So with that working, I'm trying to now use the PBXConnection portion of the API, I have this simple code:
However no matter what I try, I can't get this connected, I keep running into the TCX.PBXAPI.PBXIsNotConnected exception.
I've tried ports 5485 (config server port, 3CXSLDBServ.exe), 5482 (3CXPhoneSystem.exe), I've tried using my extension name as the username along with the password, I've tried the web interface username/password (admin password), I've tried the config server username and password (DBServ/pass, out of the INI file) and nothing seems to work. When I use port 5482 I get a log entry in the server stating:
So not sure what to put in here for the user/pass so I can programatically make calls?
I also noticed that the sample references configs that don't exist in my .INI - PBXUser, PBXPass, CMHost and CMPort.
Any help is appreciated.
Thanks.
I've sucessfully connected to the configuration server using:
Code:
Random a = new Random(Environment.TickCount);
PhoneSystem.ApplicationName = PhoneSystem.ApplicationName + a.Next().ToString();
PhoneSystem.CfgServerHost = "127.0.0.1";
PhoneSystem.CfgServerPort = 5485;
PhoneSystem.CfgServerUser = "DBServ";
PhoneSystem.CfgServerPassword = "pass";
DN[] ps = PhoneSystem.Root.GetDN();
With that I'm getting a list of extensions (not 100% sure on what "DN" is an abbreviation of). I'm also a little confused about the significance of the ApplicationName, how unique does it need to be, why does the sample use a random number?
So with that working, I'm trying to now use the PBXConnection portion of the API, I have this simple code:
Code:
var conn = new PBXConnection("127.0.0.1", 5482, "231", "1bk875m");
conn.MakeCall("231", myNumber);
However no matter what I try, I can't get this connected, I keep running into the TCX.PBXAPI.PBXIsNotConnected exception.
I've tried ports 5485 (config server port, 3CXSLDBServ.exe), 5482 (3CXPhoneSystem.exe), I've tried using my extension name as the username along with the password, I've tried the web interface username/password (admin password), I've tried the config server username and password (DBServ/pass, out of the INI file) and nothing seems to work. When I use port 5482 I get a log entry in the server stating:
Code:
10:13:31.540 [EC000001]: Authentication failed:
application:MPI-PHONE:0/CFGManager1693193895
local:127.0.0.1:5482
remote:127.0.0.1:59816
So not sure what to put in here for the user/pass so I can programatically make calls?
I also noticed that the sample references configs that don't exist in my .INI - PBXUser, PBXPass, CMHost and CMPort.
Any help is appreciated.
Thanks.