cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5346
Views
0
Helpful
6
Replies

Adding a directory number to phone associated with a user Using AXL

AR7
Level 1
Level 1

I am working on a script to automate the adding of DN to Phone and than adding then making directory number association with a User. I am not able to figure out the AXL syntax for that, will it using SQL or there is some tag for it.

6 Replies 6

BjoernMartin
Spotlight
Spotlight

Hi,

try this post!

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:updateUser sequence="?">
         <userid>USER1</userid>
          <lineAppearanceAssociationForPresences>
            <lineAppearanceAssociationForPresence>
                 <laapAssociate>t</laapAssociate>
                 <laapProductType>Cisco Unified Client Services Framework</laapProductType>
                 <laapDeviceName>CSFUSER1</laapDeviceName>
                 <laapDirectory>1062</laapDirectory>
                 <laapPartition>p_intern</laapPartition>
            </lineAppearanceAssociationForPresence>
         </lineAppearanceAssociationForPresences>
      </ns:updateUser>
   </soapenv:Body>
</soapenv:Envelope>

dstaudt
Cisco Employee
Cisco Employee
If the DN does not already exist, you would use <addLine> to create it.
You can use <updatePhone> to add the existing DN to the device:
- You can use the <updatePhone><lines> list and include your new DN, but note you will want to retrieve the existing <lines> list (via <getPhone>) and add your DN to the existing list of lines - otherwise you'll remove any other lines that were there before, as <lines> is fully replaced by what you submit
- You can use <updatePhone><addLines> to just specify the new DN to add

Not sure what you mean by 'making directory number association with a User'...can you elaborate?

When associating a DN to a Phone, how do we get the list of un-used DNs from the pool. so that we can associate it to the device.

For adding a new DN, I am using the following AXL, 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
<SOAP-ENV:Body>    
  <axl:addLine xmlns:axl="http://www.cisco.com/AXL/API/12.0" sequence="12055">         
    
    <pattern>5007</pattern>
    <description>Test<description>
    <usage>For test purposes</usage>
    
    
  </axl:addLine>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

is the syntax correct?, it's showing an error

Yes, Syntax is niccht correct.

<usage>Device</usage>

 

Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:addLine sequence="?">
         <line>
            <pattern>1000</pattern>
            <description>DN 1000</description>
            <usage>Device</usage>
            <routePartitionName>glo_intern</routePartitionName>
         </line>
      </ns:addLine>
   </soapenv:Body>
</soapenv:Envelope>

Note <usage> possible values are listed here, though the one you usually want defaults to 'Device':

https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_XPatternUsage.html#Link15C