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

Getting Phone info with RisPort by LoginUserId ?

stephane.lhp
Level 1
Level 1

Hi !

I'm trying to limit my application requests.

Actually, i need to get some informations about my phones park :

- Phone Name

- Phone IP Address

- User Id logged into the Phone (LoginUserId)

...

To do this, i'm using AXL request to get the phone's name.

After having the phone name, i need it's own IP Address, so i'm doing a RisPort request.

I would like to get the phone IP ADDRESS and the PHONE NAME within only 1 request, the RisPort request.

But i really dont know how to SEARCH a phone on RisPort, having the LoginUserId (it's the Windows Session userid).

I'm trying to do this :

===================

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://schemas.cisco.com/ast/soap/" xmlns:types="http://schemas.cisco.com/ast/soap/encodedTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Header>

<tns:AstHeader id="id1">

<SessionId xsi:type="xsd:string">SessionId</SessionId>

</tns:AstHeader>

</SOAP-ENV:Header>

<SOAP-ENV:Body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<tns:SelectCmDevice>

<CmSelectionCriteria href="#id1"/>

</tns:SelectCmDevice>

<tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">

<MaxReturnedDevices xsi:type="xsd:unsignedInt">4294967295</MaxReturnedDevices>

<Class xsi:type="xsd:string">Phone</Class>

<Model xsi:type="xsd:unsignedInt">255</Model>

<Status xsi:type="xsd:string">Any</Status>

<SelectBy xsi:type="tns:CmSelectBy">Name</SelectBy>

<LoginUserId xsi:type="xsd:string">JSMITH</LoginUserId>

<SelectItems href="#id2"/>

</tns:CmSelectionCriteria>

<soapenc:Array id="id2" soapenc:arrayType="tns:SelectItem[1]">

<Item href="#id3"/>

</soapenc:Array>

<tns:SelectItem id="id3" xsi:type="tns:SelectItem">

<Item xsi:type="xsd:string">*</Item>

</tns:SelectItem>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

=============================

But, the server answer me : "internal ERROR 500".

When i remove the follow line :

<LoginUserId xsi:type="xsd:string">JSMITH</LoginUserId>

It's working well, but i CAN'T filter on the LoginUserID...

How can I build my SOAPXML - RisPort request to get only 1 result, filtered on the LoginUserId ?

Thanks a lot.

4 Replies 4

stephane.lhp
Level 1
Level 1

I'll make another post, not on the same subject, but still with RisPort.

I'm afraid you have to use two requests... the SelectCmDevice command has 4 search options::

Name, IP Address, device description and directory number. It is not possible to search by logged on user id.

So, you have to make an SQL query to get the devicename from the logon user id, then do a Risport SelectCmDevice request to get the device's IP address.

By the way, if it's about pushing some data to the user after the lookup, you could consider going the CTI route as with CTI you do not need the device's ip address... knowing the name will do (and with the super provider you don't need any device association either).

Actually I need IP Address from the phone (which I know the name) to PUSH XML (to make : CiscoIPPhoneExecute Dial:1234) for example.

So I need to make a RisPort request to obtain the IP Address, right ? Or could I use CTI route ?

How could I use it if I don't need to do RisPort Request (to obtain IP Address) to push XML on the phone ?

Check out the RIS passthrough part in the JTAPI developer guide.. and the part about the super provider. Without giving any code, basically you initialize the terminal via super provider (something like provider.getTerminal("SEP...."), followed by a cast of the return of this command to CiscoTerminal, and then you can call term.sendData(".....");

The only problem is that JTAPI is Java whereas I see you're using C#.. I'm using both and don't find the switch too difficult though.

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: