The Services protocol is available on AppWebsocket connections to innovaphone PBX objects, if the object is enabled for the Services api. It allows an application to find other app services that provide a specific service on incoming AppWebsocket connections. Also a login for the that app service can be optained. With that information an additional AppWebsocket connection can be established to the service.
For finding and authenticating against a service, the permission for app providing the service must be configured at the own app object.
{
"api": "Services",
"src": string,
"mt": string,
}
{
"api": "Services",
"mt": "SubscribeServices",
}
With this message the application subscribes for service information. The PBX answers with SubscribeServicesResult and ServicesInfo. Each time the service information changes the PBX sends an updated version ServicesInfo until the application unsubscribes using UnsubscribeServices.
{
"api": "Services",
"mt": "SubscribeServicesResult",
}
Result of the SubscribeServices operation
{
"api": "Services",
"mt": "UnsubscribeServices",
}
Unsubscribes from the service info. The PBX answers with UnsubscribeServicesResult and stops sending ServicesInfo messages.
{
"api": "Services",
"mt": "UnsubscribeServicesResult",
}
Result of the UnsubscribeServices operation
{
"api": "Services",
"mt": "ServicesInfo",
"services": AppServices,
}
Information about an existing call at at the time of the attach.
This message requests a login for the given app service. It contains the challenge received in the AppWebsocket message AppChallenge. See the AppWebsocket for details.
{
"api": "Services",
"mt": "GetServiceLogin",
"app": SipUri,
"challenge": string,
}
The answer to the GetServiceLogin message. Contains all the parameters that shall be forwarded to the other app service in the AppLogin message. See the AppWebsocket for details about the individual parameters.
{
"api": "Services",
"mt": "GetServiceLoginResult",
"domain": string,
"sip": string,
"guid": string,
"dn": string,
"pbxObj": string,
"app", string,
"info": object,
"digest": string,
"key": string,
"salt": string
}
An array containing AppService objects.
[
AppService,
AppService,
AppService
]
Information about an app service.
{
"name": SipUri,
"title": DisplayName,
"url": WebsocketUrl,
"info": AppServiceInfo
}
An object containing the services that an app services provides on incoming AppWebsocket connections.
{
ServiceId: ServiceModel,
ServiceId: ServiceModel
}