• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

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.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,621
Messages
748,857
Members
144,734
Latest member
AmirLD
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.