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

updateLine AXL API - version 9.1

richardbeaulieu
Level 1
Level 1

See below.  I would think that I need the route partition name to update a line but is not working for me.  I would appreciate any feedback.

Thanks,

Dick

The following getLine XML works in 7.1 but in 9.1 it returns dirn not found error.

<axl:getLine xmlns:axl="http://www.cisco.com/AXL/API/7.1" sequence="1">

   <pattern>3003</pattern>

</axl:getLine>

Looks like in 9.1 in order to do a getLine we need to include the route partiion.  XML below works in our 9.1 environment when route partition name is included.

<axl:getLine xmlns:axl="http://www.cisco.com/AXL/API/9.1" sequence="1">

   <pattern>3003</pattern>

<routePartitionName>ENG</routePartitionName>

</axl:getLine>

The following XML works in 7.1 but when we run it in 9.1 we get the dirn not found error.

<axl:updateLine xmlns:axl="http://www.cisco.com/AXL/API/7.1" sequence="1">

<line>

  <pattern>3003</pattern>

  <description>3003</description>

  <alertingName>Test</alertingName>

<asciiAlertingName>Test</asciiAlertingName>

  <userHoldMOHAudioSourceId>1</userHoldMOHAudioSourceId>

<networkHoldMOHAudioSourceId>1</networkHoldMOHAudioSourceId>

</line>

</axl:updateLine>

Based on the change required for the getLine to include the route partition to get the line information.  Made the assumption that the update line XML would require that too.  Following XML in 9.1 is still returning the dirn not found error.   Looking for assistance on what needs to be done to perform and updateLine AXL call.

<axl:updateLine xmlns:axl="http://www.cisco.com/AXL/API/9.1" sequence="1">

<line>

  <pattern>3003</pattern>

<routePartitionName>ENG</routePartitionName>

  <description>3003</description>

  <alertingName>Test</alertingName>

<asciiAlertingName>Test</asciiAlertingName>

  <userHoldMOHAudioSourceId>1</userHoldMOHAudioSourceId>

<networkHoldMOHAudioSourceId>1</networkHoldMOHAudioSourceId>

</line>

</axl:updateLine>

1 Accepted Solution

Accepted Solutions

I don't think he wants to update the device and assign a new line in another Partition, but rather update the Directory number, which does Need the updateLine command. However, with newer Versions, they are getting stricter at enforcing proper Syntax and that's the Problem here.an updateLine request should look like this

<axl:updateLine xmlns:axl="http://www.cisco.com/AXL/API/9.1" sequence="1">

  <pattern>3003</pattern>

<routePartitionName>ENG</routePartitionName>

  <description>3003</description>

  <alertingName>Test</alertingName>

<asciiAlertingName>Test</asciiAlertingName>

  <userHoldMOHAudioSourceId>1</userHoldMOHAudioSourceId>

<networkHoldMOHAudioSourceId>1</networkHoldMOHAudioSourceId>

</axl:updateLine>

as per the spec (I'm looking at the 9.1 spec you can download here: Cisco AXL) . Note that I'm not adding the <line> tag.. you only Need that for an addLine request. Update commands take one hierarchy less, their Container for the entire command is the command itself (updateLine, updatePhone, updateUser, etc.) whereas for the corresponding add, you'd have <addline><line>... your line here, <addPhone><phone>.. your phoen here, and <addUser><user>.. your user here.

Older CUCM Versions will at times accept Syntax that isn't quite correct. I suspect you are writing your own requests (as I do), and haven't noted that you're sending incorrect XML because it worked previously. I've experienced the same myself.. some of my code has been sending wrong XML, sometimes even invalid XML (non parseable if you plug the whole Thing into a Standard Parser), and it used to work for years until a CUCM upgrade broke things and I finally realized I've been doign things wrong for years.

View solution in original post

4 Replies 4

npetrele
Cisco Employee
Cisco Employee

getLine should work with just the pattern unless the line is assigned to a partition, in which case you need the route partition name. 

I'm not sure what you mean by a dim not found error.  Can you try these calls in Soap UI and post the exact XML request and response you get?

TDoan
Level 1
Level 1

Hi,

I think you use the wrong function. If you want to update the line you must use updatePhone.

In the updateLine function (AXL Soap) does not have <line>.....</line>

This is a sample for updatePhone

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/9.1">

  <soapenv:Header/>

  <soapenv:Body>

    <ns:updatePhone sequence="1">

      <uuid>{0E3AA512-3B5A-A7B9-B4F6-6B41D099B130}</uuid>

      <callingSearchSpaceName>CSS_TEST_CHECK_OUT</callingSearchSpaceName>

      <lines>

        <line>

          <uuid>{E19A3CED-65AC-D8E0-CEE6-6AE4E83BCB48}</uuid>

          <index>1</index>

          <label>Extenion - 3003</label>

          <display>Extension - 3003</display>

          <asciiLabel>Extension - 3003</asciiLabel>

          <displayAscii>Extension 303</displayAscii>

          <dirn uuid="{F0C3375B-073D-4FBB-6A40-EFDBEF34DD89}">

            <pattern>319</pattern>

            <routePartitionName>ENGTEST</routePartitionName>          //This is routePartitionName you want to update

          </dirn>

        </line>

      </lines>

    </ns:updatePhone>

  </soapenv:Body>

</soapenv:Envelope>

I hope this will help you.

Regards

Thuy Doan

I don't think he wants to update the device and assign a new line in another Partition, but rather update the Directory number, which does Need the updateLine command. However, with newer Versions, they are getting stricter at enforcing proper Syntax and that's the Problem here.an updateLine request should look like this

<axl:updateLine xmlns:axl="http://www.cisco.com/AXL/API/9.1" sequence="1">

  <pattern>3003</pattern>

<routePartitionName>ENG</routePartitionName>

  <description>3003</description>

  <alertingName>Test</alertingName>

<asciiAlertingName>Test</asciiAlertingName>

  <userHoldMOHAudioSourceId>1</userHoldMOHAudioSourceId>

<networkHoldMOHAudioSourceId>1</networkHoldMOHAudioSourceId>

</axl:updateLine>

as per the spec (I'm looking at the 9.1 spec you can download here: Cisco AXL) . Note that I'm not adding the <line> tag.. you only Need that for an addLine request. Update commands take one hierarchy less, their Container for the entire command is the command itself (updateLine, updatePhone, updateUser, etc.) whereas for the corresponding add, you'd have <addline><line>... your line here, <addPhone><phone>.. your phoen here, and <addUser><user>.. your user here.

Older CUCM Versions will at times accept Syntax that isn't quite correct. I suspect you are writing your own requests (as I do), and haven't noted that you're sending incorrect XML because it worked previously. I've experienced the same myself.. some of my code has been sending wrong XML, sometimes even invalid XML (non parseable if you plug the whole Thing into a Standard Parser), and it used to work for years until a CUCM upgrade broke things and I finally realized I've been doign things wrong for years.

Thanks Stephan,

You are correct and that worked for me.

Dick