cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2553
Views
0
Helpful
4
Replies

CME CallManager Express using External Directory

craiglcve
Level 4
Level 4

Does anyone happen to have a sample on setting up an external directory with CME - CallManager Express using xml and asp...cgi...etc that can query a xml, test file or database?

I created an XML file named services.xml that I put on a web server and pointed the services URL to.

In the services URL I have a couple items one of which is the directory. Under the directry url then points to another xml file that is named directory.xml That seems to work in the sense of now if I go to services then Directory, it will return all the entries in the xml file. But what I am trying to do is set it up so I can input the first three characters of the name and have it pull that name out of an xml or text file.

Here is what I have so far....

Services Url

url services http://192.168.61.121/services.xml

##################################

Services.xml

<?xml version="1.0"?>

<!-- File Name: services.xml -->

<CiscoIPPhoneMenu>

<Title>SERVICES</Title>

<Prompt>SELECT AN OPTION</Prompt>

<MenuItem>

<Name>DIRECTORY</Name>

<URL>http://192.168.61.121/directorylookup.xml</URL>

</MenuItem>

<MenuItem>

<Name>CUSTOMERS</Name>

<URL>http://192.168.61.121/directory.xml</URL>

</MenuItem>

<MenuItem>

<Name>Berbee</Name>

<URL>http://phone-xml.berbee.com/menu.xml</URL>

</MenuItem>

<MenuItem>

<Name>SHOW ITEM</Name>

<URL>http://192.168.0.71/lj.xml</URL>

</MenuItem>

</CiscoIPPhoneMenu>

##################################

directorylookup.xml

<?xml version="1.0"?>

<!-- File Name: directorylookup.xml -->

<CiscoIPPhoneInput>

<Title>Customer Lookup</Title>

<Prompt>Enter first letters of name</Prompt>

<URL>http://192.168.61.121/directory.xml</URL>

<InputItem>

<DisplayName>Name</DisplayName>

<QueryStringParam>DATAFLD</QueryStringParam>

<InputFlags>A</InputFlags>

<DefaultValue />

</InputItem>

</CiscoIPPhoneInput>

##################################

<?xml version="1.0"?>

<!-- File Name: Directory.xml -->

<CiscoIPPhoneDirectory>

<Title>CVE Directory</Title>

<Prompt></Prompt>

<DirectoryEntry>

<Name>Craig</Name>

<Telephone>3611</Telephone>

</DirectoryEntry>

</CiscoIPPhoneDirectory>

####################################

1 Accepted Solution

Accepted Solutions

julian.anstey
Level 1
Level 1

I have an Excel file wwwroot\excel\directory.xls which looks like this:

Name Number

Smith 0123456

Jones 0246810

etc.

I have a range defined as follows:

=Dalen1!$A$1:$B$213

(There are 212 entries in my directory).

The other files are stored in wwwroot.

My menu is as follows:

Menu

Select option

Directory

http://123.45.67.89/excel.xml

excel.xml is defined as follows:

Directory

Input start of name

http://123.45.67.89/excel.asp

Search for

param1

A

excel.asp is defined as follows:

<%

Response.ContentType = "text/xml"

' Get parameter

param1 = Request.QueryString("param1")

' Set up the connection

Set oConn = Server.CreateObject("ADODB.connection")

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=c:\Inetpub\wwwroot\Excel\Directory.xls;" & _

"Extended Properties=""Excel 8.0;HDR=Yes"""

' Run the SQL Query

Set RS=Server.CreateObject("ADODB.recordset")

selstr = "SELECT * FROM my_range WHERE Name LIKE '" & param1 & "%' ORDER BY Name"

RS.open selstr, oConn

' Get record count

iCount = 0

do until RS.EOF

iCount = iCount + 1

RS.movenext

Loop

If iCount > 0 Then

RS.movefirst

End If

' Create XML Directory

Response.Write ( "")

Response.Write ( "Directory")

If iCount = 1 Then

Response.Write ( "1 entry found")

Else

Response.Write ( "" & iCount & " entries found")

End If

'note maximum 32 entries in CiscoIPPhoneDirectory object

iLoop = 0

do until RS.EOF or iLoop = 32

iLoop = iLoop + 1

Response.Write ( "")

Response.Write ( "" & RS("Name") & "" & RS("Number") & "" )

Response.Write ( "" )

RS.movenext

Loop

Response.Write ( "")

' Close the recordset/connection

RS.Close

Set RS = Nothing

oConn.Close

Set oConn = Nothing

%>

View solution in original post

4 Replies 4

julian.anstey
Level 1
Level 1

I have an Excel file wwwroot\excel\directory.xls which looks like this:

Name Number

Smith 0123456

Jones 0246810

etc.

I have a range defined as follows:

=Dalen1!$A$1:$B$213

(There are 212 entries in my directory).

The other files are stored in wwwroot.

My menu is as follows:

Menu

Select option

Directory

http://123.45.67.89/excel.xml

excel.xml is defined as follows:

Directory

Input start of name

http://123.45.67.89/excel.asp

Search for

param1

A

excel.asp is defined as follows:

<%

Response.ContentType = "text/xml"

' Get parameter

param1 = Request.QueryString("param1")

' Set up the connection

Set oConn = Server.CreateObject("ADODB.connection")

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=c:\Inetpub\wwwroot\Excel\Directory.xls;" & _

"Extended Properties=""Excel 8.0;HDR=Yes"""

' Run the SQL Query

Set RS=Server.CreateObject("ADODB.recordset")

selstr = "SELECT * FROM my_range WHERE Name LIKE '" & param1 & "%' ORDER BY Name"

RS.open selstr, oConn

' Get record count

iCount = 0

do until RS.EOF

iCount = iCount + 1

RS.movenext

Loop

If iCount > 0 Then

RS.movefirst

End If

' Create XML Directory

Response.Write ( "")

Response.Write ( "Directory")

If iCount = 1 Then

Response.Write ( "1 entry found")

Else

Response.Write ( "" & iCount & " entries found")

End If

'note maximum 32 entries in CiscoIPPhoneDirectory object

iLoop = 0

do until RS.EOF or iLoop = 32

iLoop = iLoop + 1

Response.Write ( "")

Response.Write ( "" & RS("Name") & "" & RS("Number") & "" )

Response.Write ( "" )

RS.movenext

Loop

Response.Write ( "")

' Close the recordset/connection

RS.Close

Set RS = Nothing

oConn.Close

Set oConn = Nothing

%>

AWESOME.... Thanks, I will give that a shot.

Thanks again.

Hi julian

I'm trying your solution but I noticed that if I set the new url services or url directories I lost the default url services ( url services http:///voiceview/common/login.do ) or  local directory.

I would like to preserve voiceview and local directory, and have the additional external directory

In you solution should I set  url services or  url directories?,  is is possible to preserve the default options?

regards

Works like Magic

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: