The protocol described in this article is used between the push object in the PBX and an external push service. It's purpose is to trigger push notifications for smartphone apps on events inside the PBX. Currently those are the following:
innovaphone uses that mechanism to send push notifications from customer PBXes to the innovaphone push service (services.innovaphone.com). The push service triggers actual push notifications for myPBX and myApps for iOS and Android. However the same mechanism can be used to integrate third-party smartphone apps that need to be notified about events in the PBX.
The protocol is based on AppWebsocket. The push object establishes an outgoing appwebsocket connection to the configured URL and authenticates using the configured password. The push service needs to implement the server side of the appwebsocket protocol including authentication. This document only describes the push specific messages that are exchanged after authentication.
{
"mt": "PushNotifyPost",
"token": string
}
{
"mt": "PushNotifyPostResult",
"err": string,
"info": string
}
{"mt":"AppChallenge"} {"mt":"AppChallengeResult","challenge":"577fb2b83962c53a"} {"mt":"AppLogin","sip":"push","guid":"13192b1d681c5e013aa40050569751d2","dn":"Push","digest":"909a756af923bfe2cd1acfc32a41a816b62ed4c435f5c505e112491b3f6de7de","domain":"pbx.example.com/master","app":"ws","info":{"appobj":"push","appurl":"https://services.innovaphone.com/push/ws","cn":"Push","unlicensed":true}} {"mt":"AppLoginResult","ok":true}
{"mt":"PushNotifyPost","src":"5","token":"xxxxxxxxx"} {"mt":"PushNotifyPostResult","src":"5"}