cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
789
Views
0
Helpful
1
Replies

Why does my AXLAPI getLineReq not contain a pattern property ?

Hi, this is my first post to the community. I'm trying to automate CUCM and write a script with the goal of configuring a line to forward to another number by setting the CallForwardAll property of the line. I'm using PowerShell, and have extracted the wsdl to generate the proxy object as documented. I can retrieve a user, as shown in the picture below, but when I instanciate a getLineReq object I notice that it does not contain the documented elements, but shows Items, ItemsElementName, etc... whereas I was expecting to see a pattern property. What am I overlooking ? 

 

Capture.JPG

Thanks in advance for any assistance,

Stephane

1 Reply 1

ITJay
Level 1
Level 1

I don't know why, but getLine is different. You have to pass an array of search terms to Items and then set the ItemsElementName property to the field that you are searching on.  In the example below, I am searching via line UUID. Searching via pattern didn't work for me, so I used the listLine to get the line UUID and then search via that. I am trying to find the associated devices. I am using schema 12.5. You would need to change the .value__ property to reflect what you are search for. I believe 0 is pattern, 1 is routePartitionname and 2 is uuid.

 

 

 

$NSParam = $AXLParam.getType().namespace
$ReturnTagsParam = New-Object ($NSParam + ".RLine")
$SearchParam = New-Object ($NSParam + ".GetLineReq")

# Set return tags
$ReturnTagsParam.active = "?"
$ReturnTagsParam.associatedDevices = "?"

$SearchParam.returnedTags = $ReturnTagsParam
[System.Object[]]$SearchItems = @($LineUUIDParam) $SearchItemsElementName = New-Object ($NSParam + ".ItemsChoiceType65")
# Int value of 2 = uuid $SearchItemsElementName.value__ = 2 $SearchItemsElementNameArray = @($SearchItemsElementName) $SearchParam.Items = $SearchItems $SearchParam.ItemsElementName = $SearchItemsElementNameArray

$result = $AXLParam.getLine($SearchParam)

 

 

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: