Below are two ASP pages I put together to serve as a CUCM service, accessed by a Service URL button on a phone.
The users have a button labelled "Call Recording" when pressed displays basic instructions and two softkeys on their display. The softkeys ultimately dial the codes. This technique was used since speed dial buttons do not generate DTMF in conversation.
This is the page that serves the text instructions on the phone display and creates the softkeys to start and cancel recordings.
<%@ Language=JavaScript %>
<%
var serverIP = Request.ServerVariables("LOCAL_ADDR");
var SERVICE_DIR="CiscoIPServices";
Response.Expires = -1;
Response.Buffer = true;
Response.ContentType = "text/xml";
Response.Write("<CiscoIPPhoneText>");
Response.Write("<Title>Call Recording</Title>");
Response.Write("<Prompt>Start or Cancel recording below</Prompt>");
Response.Write("<Text>Use the keys below to \"Record\" a call in progress, or \"Cancel\" a recording you started.\r\n\r\nContact your system administrator to retrieve your recordings.</Text>");
Response.Write("<SoftKeyItem>");
Response.Write("<Name>Record</Name>");
Response.Write("<URL>http://"+serverIP+"/"+SERVICE_DIR+"/ASP/recording/recordinginput.asp?rectype=start</URL>");
Response.Write("<Position>1</Position>");
Response.Write("</SoftKeyItem>");
Response.Write("<SoftKeyItem>");
Response.Write("<Name>Cancel</Name>");
Response.Write("<URL>http://"+serverIP+"/"+SERVICE_DIR+"/ASP/recording/recordinginput.asp?rectype=stop</URL>");
Response.Write("<Position>2</Position>");
Response.Write("</SoftKeyItem>");
Response.Write("<SoftKeyItem>");
Response.Write("<Name>Exit</Name>");
Response.Write("<URL>SoftKey:Exit</URL>");
Response.Write("<Position>4</Position>");
Response.Write("</SoftKeyItem>");
Response.Write("</CiscoIPPhoneText>");
Response.Flush();
%>
This is the recordinginput.asp page that is called by the one above. It uses CiscoIPPhoneExecute, ExecuteItem and SendDigits to generate DTMF in conversation. There are some unnecessary elements, as I was attempting various means to call the function directly from a service.
<%@ Language=JavaScript %>
<%
function InputMenu(rectype)
{
if(rectype== "start"){
mystatus="starting"
mydigits="*7*7*";
}else if(rectype=="stop"){
mystatus="stopping"
mydigits="*8*8*";
}else return;
Response.Write("<CiscoIPPhoneExecute>\r\n");
Response.Write("<ExecuteItem URL=\"SendDigits:"+mydigits+":1\"/>\r\n");
Response.Write("</CiscoIPPhoneExecute>\r\n");
return;
}
var serverIP;
var mystatus;
var myresponse;
SERVICE_DIR="CiscoIPServices";
serverIP = Request.ServerVariables("LOCAL_ADDR");
Response.ContentType = "text/xml";
Response.Buffer = true;
rectype = Request.QueryString("rectype");
InputMenu(rectype);
Response.Expires = -1 ;
Response.AddHeader("REFRESH","5;URL=http://localhost/CiscoIPServices/ASP/recording/recordingtext.asp?rectype="+rectype+"");
Response.Flush();
%>
Hi,
ReplyDeleteI am trying to accomplish something you did. In my asp.net program, it will send two CiscoIPPhoneExecute objects separately to an IP Phone. The first object has an execute item to "Dial" a number, the second object has an execute item to pass the PIN number by "SendDigits". I post the second object after I receive an XMLResponseItem for first object, and the response contains a status 0 ("Success").
My First XML Object
CiscoIPPhoneExecute
ExecuteItem URL="Dial:70000000000000061478765432:1:Cisco/Dialer"
CiscoIPPhoneExecute
My Second XML Object
CiscoIPPhoneExecute
ExecuteItem URL="SendDigits:56789:1:Cisco/Dialer"
CiscoIPPhoneExecute
I have successfully post the first XML object, however, for the second XML object I receive a HttpWebResponse with Status: 6, Data: No Active Call.
Would you share your experience with me, please?