API Help

Status
Not open for further replies.

ChrisPriest

Joined
Feb 17, 2010
Messages
20
Reaction score
0
Hi All,

I'm trying to make use of the API, I am using C# running on the same PC as the phone system.

I seem unable to establish a link to the phone system, I've tried the sample (modifying it to work with v8)

The connection string is: mPbxConn = new PBXConnection("localhost", 5485, "<someuser>", "<somepassword>")

But I always get an exception from this saying:

---------------------------
TCX.PBXAPI.PBXIsNotConnected: Exception of type 'TCX.PBXAPI.PBXIsNotConnected' was thrown.

at TCX.PBXAPI.PBXConnection..ctor(String pbxSLHost, Int32 pbxSLPort, String pbxSLuser, String pbxSLpassword)

at HudSample.MyTree..ctor() in C:\CallControlAPI\MyTree.cs:line 57
----------------------------

I have added PhoneSystem.ApplicationName="Hudsample" to the 3cxphonesystem.ini file.

I can telnet to port 5485 OK, so I know the system is listening.

Can anyone shed any light?

Best Regards
Chris
 
I was able to get the sampe to run but I didn't modify the line "mPbxConn = new PBXConnection..." in MyTree.cs. I left that line as it was originally written (mPbxConn = new PBXConnection();). Instead, open the file Program.cs and add the line:
PhoneSystem.CfgServerPort = 5485;

after the line that reads:
PhoneSystem.ApplicationName = "HudSample";
 
That worked :) Thank you :)
 
Hello,
Can you provide me this sample. I have the same problem, I writing my own application and I can't find sample what you talking about.

Best regards,
Nico
 
Status
Not open for further replies.

Forum statistics

Threads
111,879
Messages
589,531
Members
164,733
Latest member
HLISolutions