4.1 Disconnect Operation
The following example shows how to form a request to disconnect a call that was previously initiated by a PlayOnPhone or PlayOnPhoneGreeting operation.
Before the Disconnect operation can be initiated, the following steps have to be performed:
Initiate a play-on-phone call by sending either a PlayOnPhone or PlayOnPhoneGreeting operation request. For more information, see the examples in sections 4.7 and 4.9.
Save the PlayOnPhoneResponse element value in a temporary variable. This value is the telephone identifier that will be used when making the Disconnect operation request.
The following is the request to disconnect a call.
-
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Disconnect xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <CallId>NDEzYjEzNmMtZTE2Zi00NTJlLWI3YzctNDhkMTE3MDE3YjlmQGRmLWV1bS0wMS5leGNoYW5nZS5jb3JwLm1pY3Jvc29mdC5jb20=</CallId> </Disconnect> </soap:Body> </soap:Envelope>
The following is the response to a request to disconnect a call.
-
<?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <DisconnectResponse xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" /> </soap:Body> </soap:Envelope>