IPCortex.PBX.Auth.setHost not working

Hello Rob, I download nodejs host. When I try to start this, I get error in line 31 http://joxi.ru/8An54DbiGeK42O, because PBX isn’t init. How fix this?

Have you run the updateAPI.js script to download api.js to your node folder? Example:

cd node_modules/ipcortex-api
node updateAPI.js http://pabx.example.com

I download api.js and put in ‘lib’ folder.

–Node expects api.js to be within the lib folder of the module itself, not the parent module. (So it should be placed in node_modules/ipcortex-pabx/lib/)–

Scratch that, it should indeed be loading from where you put it. Investigating why it isn’t now…

I’ve updated the API wrapper - please try it and let me know how you get on.

I download this module again, but problem stays

What is your node.js version?

node version - 0.12.2

0.12.2 should be fine - and in fact works for me. Could you PM me your basic environment?

Jamie, I think this vm.runInContext(api, context, apiFile); in index.js:52 don’t create context I don’t know why. Maybe you send me sample where (like you said) work fine. It’s will be great.
my email : evgeniy.sushilnikov@chisw.com

And This forum has error in Chrome and IE;)

Hi, Jamie. I get your sample. I change pabx server path and credentials. In authCB I get status - true. Then I execute startPoll and I expect execute cb go or error function but they not fire. How I fix this problem?

You get no console output whatsoever? What is you do a console.log before startPoll?

Output - http://joxi.ru/MAj7vVBiO41Dre and that’s all

api.js which you gave me and that i can download from httt://…/api/api.js (from server) are different. Is it ok?

It’s best to use the version from whatever PABX you are connecting to, And might be what’s causing the issue.

But if I use version from PABX I get error which I describe in top:) What should I do to fix this problem?

What PABX version are you using?


It’s a little behind current firmware, but should be fine. How did you download the api.js file? Using the script? Could you send me a copy of your api.js file?