Replication using basic JSON messages
I've created an external app service by following the tutorial http://sdk.innovaphone.com/doc/tutorials/ExternalAppService.htm. Allthough not written in PHP but in nodejs, this seems to work rather simple and correct for the most APIs such as RCC, PbxAdminApi, etc... So the app is configured correctly, connecting works, permissions are set correctly and permissions are set for each API.
I'm now trying to use the messages as described in http://sdk.innovaphone.com/doc/appwebsocket/Replication.htm (given this is not a C++ app service, the IReplicator as suggested in the other tutorial is not applicable). I do not get this working however, probably because I'm missing something. Following is the communication from and to the PBX, all messages are sent on the web socket connection that is made when getting the PbxInfo message (like in the C++ tutorial). I think all message are according to the documentation, yet, the ReplicateStartResult is not what I would expect it to be:
RECV <= {"mt":"AppChallenge"} SEND => {"mt":"AppChallengeResult","challenge":"1234"} RECV <= {"mt":"AppLogin","sip":"ExternalApp","guid":"e7125bb4e0aa5e01381300903340016f","dn":"ExternalApp","digest":"646022a5a5aed17ab3085671d5e4a7287726f75a143a08f362410ed5e7fbb7fd","domain":"xqting.be","app":"monitor","info":{"appobj":"ExternalApp","appurl":"http://10.0.0.101:8080/hub/monitor","cn":"ExternalApp","unlicensed":true,"groups":["monitored"],"apps":[]}} SEND => {"mt":"AppLoginResult","ok":true} RECV <= {"mt":"PbxInfo","domain":"xqting.be","pbx":"inno13-pbx","pbxDns":"inno13-pbx.xqting.be","apis":["EpSignal","PbxAdminApi","PbxApi","PbxMessages","PbxSignal","PbxTableUsers","RCC","Services"]} SEND => {"api":"PbxTableUsers","mt":"ReplicateStart","src":"abc","add":false,"del":false,"columns":[{"cn":{}}]} RECV <= {"mt":"AppInfo","app":"monitor"} RECV <= {"mt":"ReplicateStartResult","src":"abc","api":"PbxTableUsers","columns":{}}
Can you please tell me what I'm doing wrong?