Polycom 3725-49106-001 Rev A Cell Phone User Manual


 
Web Application for Polycom Phones UC Software 5.0.0
Polycom, Inc. 70
2 Using the IDE of your choice, create a file called webcallback.aspx.cs.
Table 60: webcallback.aspx.cs Example
using System;
using System.IO;
using System.Text;
using System.Data;
using System.Configuration;
using System.Net;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Threading;
public partial class WebCallback : System.Web.UI.Page
{
public static ManualResetEvent allDone = new ManualResetEvent(false);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
String phoneNum = BoxNumber.Text ;
String name = BoxName.Text;
//send a push request to the phone with the IP address
//NOTE: Change this hardcoded IP address
callbackReq("172.18.103.32", phoneNum, name);
}
private void callbackReq(String phoneIP, String phoneNum, String name)
{
String strLoc = "http://" + phoneIP + "/push";
String[] cred = { "Polycom", "456" };
NetworkCredential myCred = new NetworkCredential(cred[0], cred[1]);
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri(strLoc), "Digest", myCred);