In windows phone 8 to invoke a voip agent, server needs to send a type 4 raw notification through MPNS with following payload.
HttpWebRequest sendNotificationRequest = (HttpWebRequest)WebRequest.Create(subscriptionUri);
sendNotificationRequest.Method = "POST";
// We will create a HTTPWebRequest that posts the raw notification to the Microsoft Push Notification Service.
// HTTP POST is the only allowed method to send the notification.
// Create the raw message.
string rawMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<root></root>";
// Sets the notification payload to send.
byte[] notificationMessage = Encoding.Default.GetBytes(rawMessage);
// Sets the web request content length.
sendNotificationRequest.ContentLength = notificationMessage.Length;
sendNotificationRequest.ContentType = "text/xml";
sendNotificationRequest.Headers.Add("X-NotificationClass", "4");
using (Stream requestStream = sendNotificationRequest.GetRequestStream())
{
requestStream.Write(notificationMessage, 0, notificationMessage.Length);
}
What is the push payload to start voip agent using WNS as notification service?