01-16-2004 08:17 AM - edited 03-13-2019 03:23 AM
I'm developing an Ip Phone Service and I must restart the phone that uses it.
How can I restart the phone by script.asp ?
01-20-2004 04:34 PM
There is an AXL method to reset devices.
here is the source
source
01-21-2004 08:41 AM
but how can I call doDeviceReset from my asp page after db query and
My Code:
----------------------------------
<%@ Language=JavaScript%>
<%
Response.ContentType = "text/xml";
Response.Buffer = true;
var deviceName = String(Request.QueryString("devicename"));
connStrSQLServer = "DRIVER={SQL Server};SERVER=mcs33;DATABASE=CCM0301;UID=sa;PWD=88cxfc482y"
connSQLServer = Server.createobject("ADODB.Connection");
connSQLServer.Open(connStrSQLServer);
connStrDBAccess = "Provider=Microsoft.Jet.OLEDB.4.0; DataSource='C:/CiscoWebs/IPPhoneServices/ForwardAllService/ForwardAllDestinations.mdb'";
connDBAccess = Server.createobject("ADODB.Connection");
connDBAccess.Open(connStrDBAccess);
strSQLServer = "SELECT NumPlan.dNOrPattern FROM Device,DeviceNumPlanMap,NumPlan WHERE Device.name='" + deviceName + "' AND Device.pkID=DeviceNumPlanMap.fkDevice AND NumPlan.pkID=DeviceNumPlanMap.fkNumPlan";
rsSQLServer = connSQLServer.Execute(strSQLServer)
strDBAccess = "SELECT ExtensionDestination FROM ForwardAllDestinations WHERE ExtensionSource='" + rsSQLServer("dNOrPattern") + "'"
rsDBAccess = connDBAccess.Execute(strDBAccess)
ExtensionDestination=rsDBAccess("ExtensionDestination");
strSQLServerUpdate = "UPDATE Numplan SET CFADestination ='" + ExtensionDestination + "' WHERE dNOrPattern='" + rsSQLServer("dNOrPattern") + "'"
connSQLServer.Execute(strSQLServerUpdate)
Response.Write("
Response.Write("Da...: " + rsSQLServer("dNOrPattern") + " - A: " + ExtensionDestination + serverIP + "\r");
Response.Flush;
Response.End();
Session.Abandon();
%>
01-21-2004 09:19 AM
I hate to be the bearer of bad news but... Making direct calls to the CCM database is a big no-no.
The AXL api provides you with the connection to the CCM database.
You will need to install SOAP it is available from Microsoft and freely distributable. You will then need the CCM Administrator user name and password as well as the device id. for the following axl request
strEnvelope = _
"
"
" & _ "
"
"
"" & _
"" & _
""
Regards,
James
01-22-2004 08:01 AM
Is this code correct?
----------------------------------------
<%@LANGUAGE="VBScript"%>
<%
Response.ContentType = "text/xml"
Response.Buffer = true
Response.AddHeader "POST", "/CCMApi/AXL/V1/soapisapi.dll"
Response.AddHeader "Host", "172.20.10.2:80"
Response.AddHeader "Accept", "text/*"
Response.AddHeader "Authorization", "Basic bGFycnk6Y3VybHkgYW5kIG1vZQ=="
Response.AddHeader "Content-Length", "613"
Response.Flush
...
deviceId = "{DE6CA1DA-AD17-490C-A933-CC8FD2DF418C}"
strEnvelope = _
"
"
" & _"
"
"
"" & _
"" & _
""
Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "POST", strEnvelop, False
Response.End()
%>
-------------------------------------------
Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide