Montesuma80 / 3cx-web-API

an local API to Controll your 3CX v16/v18 over HTTP
77 stars 38 forks source link

Attempting this against 16.0.8.9 gives errors and returns no data #7

Open JasonEde opened 3 years ago

JasonEde commented 3 years ago

API set up and running on 8888 on test system and trying something like showallcalls I can see it picked up the calls in the debug window, but after them "Object reference not set to an instance of an object." Browser or curl requests just seem to hang.

JasonEde commented 3 years ago

The error resolves to the Logger line below I think qa isn't returning for some reason.

var qa =new Queue[] { ps.GetDNByNumber(Queue_number) as Queue }; Logger.WriteLine( qa[0].Name); Queuename = qa[0].Name;

adn77 commented 1 year ago

Looks like the queue-number length is fixed to 4 digits.

I tried rewriting this: https://github.com/adn77/3cx-web-API/commit/bc8157a6483dd300c4e8c470f3a12efbb6b34df1#diff-522d9766d06b53099ebb37697620421fcd4e4861585ee696f85f8a7872a2fbe8