Hi All,
I am trying to automate the provisioning of Cisco phone for a user. As a first step i have identified a free extension and update the DN with the details. i was going through the schema and i had built an XML for posting to the webservice but it throws an error. I am able to post if i remove the parameters Voice mail profile,CSSName,presencegrp etc. there are lot of parameters that would need to be updated. But since i am stuck here unable to proceed further. Kindly assist.
function Set-CUCMLine {
param(
[Parameter(Mandatory,ValueFromPipelineByPropertyName)][String]$Pattern,
[Parameter(Mandatory)][String]$RoutePartitionName,
[String]$Description,
[String]$AlertingName,
[String]$AsciiAlertingName,
[String]$voiceMailProfileName,
[String]$shareLineAppearanceCssName,
[String]$presenceGroupName,
[String]$autoAnswer
)
$AXL = @"
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.0">
<soapenv:Header/>
<soapenv:Body>
<ns:updateLine sequence="?">
<pattern>$Pattern</pattern>
<routePartitionName>$RoutePartitionName</routePartitionName>
<description>$Description</description>
<alertingName>$AlertingName</alertingName>
<asciiAlertingName>$AsciiAlertingName</asciiAlertingName>
<voiceMailProfileName uuid="?">$voiceMailProfileName</voiceMailProfileName>
<shareLineAppearanceCssName uuid="?">$shareLineAppearanceCssName</shareLineAppearanceCssName>
<presenceGroupName uuid="?">$presenceGroupName</presenceGroupName>
<autoAnswer>$autoAnswer</autoAnswer>
</ns:updateLine>
</soapenv:Body>
</soapenv:Envelope>
"@
Invoke-CUCMSOAPAPIFunction -AXL $AXL -MethodName updateLine
}