cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1255
Views
5
Helpful
6
Replies

UpdateLine AXL API syntax error

JestyDS
Level 1
Level 1

Hi All,

I am trying to update Line using the below Powershell command but i am getting a response while trying to post from the web service. This works if i remove the below 4 attributes from the code.

 

[String]$voiceMailProfileName,
[String]$shareLineAppearanceCssName,
[String]$presenceGroupName,
[String]$autoAnswer

<voiceMailProfileName uuid="?">$voiceMailProfileName</voiceMailProfileName>
<shareLineAppearanceCssName uuid="?">$shareLineAppearanceCssName</shareLineAppearanceCssName>
<presenceGroupName uuid="?">$presenceGroupName</presenceGroupName>
<autoAnswer>$autoAnswer</autoAnswer>

 

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
}

 

6 Replies 6

JestyDS
Level 1
Level 1

Can someone please guide me if i could update the DN configuration using UpdateLine method. i understood from DB schema that these attributes such as Voiceemailname,CSSsearchspaces are FK attributes. How can they be parsed in an XML format.

 

Kindly assist.

Any help?

What errors are you seeing?

 

The value of the 'voiceMailProfileName' element should be an existing VM profile. Does that VM profile exist?

yes it does exist.

mathias.tonn
Level 1
Level 1

Hi,

 

please remove the attribute uuid="?". The character "?" does not match the uuid format. If the uuid attribute not set the axl interface takes the value to match, otherwise it will check for the value of the uuid attribute (in this case "?").

The uuid attribute has a higher priority.

 

Mathias

pkid value did the work for me. thanks for your suggestions