cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
164
Views
0
Helpful
2
Replies
JasunKAR
Beginner

addCommonPhoneConfig ignoring vendorConfig info?

Howdy!  Adding everything I need through a python script to spin up a site in CUCM.  When adding a common phone config it seems to be ignoring a vendorConfig piece I want to modify.

 

# Create commonPhoneConfig siteCode_locationType Common Phone Profile
commonPhoneConfig = {
    'name': ( globalName + ' Common Phone Profile' ),
    'description': ( globalName + ' Common Phone Profile' ),
    'dndOption''Ringer Off',
    'dndAlertingType''Beep Only',
    'alwaysUsePrimeLine''Default',
    'alwaysUsePrimeLineForVoiceMessage''Default',
    'vendorConfig':
        {
            'sshAccess''1',     
            'lineMode''1'
        }
    }
It all adds great with no issues.  But the lineMode/SSH doesn't get toggled.  In XML it works fine:

<commonPhoneConfig>
    <name>TEST2 Common Phone Profile</name>
    <description>TEST2 Common Phone Profile</description>
    <dndOption>Ringer Off</dndOption>
    <dndAlertingType>Beep Only</dndAlertingType>
        <vendorConfig>
            <sshAccess>1</sshAccess>
            <lineMode>1</lineMode>
        </vendorConfig>
</commonPhoneConfig>

That works fine.  Just not the python option.  Thoughts?

Also, all the lines have ' and , after then but this post seems to be combining them into ; /shrug 
1 ACCEPTED SOLUTION

Accepted Solutions
alexstev
Cisco Employee

Hello,

 

I'm not a CUCM expert but I found some other discussions here on the Cisco Community Forums, which may be helpful:

Hope this helps!

View solution in original post

2 REPLIES 2
alexstev
Cisco Employee

Hello,

 

I'm not a CUCM expert but I found some other discussions here on the Cisco Community Forums, which may be helpful:

Hope this helps!

View solution in original post

Thanks alex you pointed me in a good direction.  I got it to work through AXL using this code from that second link:

 
lineMode = etree.Element( 'lineMode' )
lineMode.text = '1'
vendorConfig = []
vendorConfig.append( lineMode )
xvcType = client.get_type( 'ns0:XVendorConfig' )
commonPhoneConfig[ 'vendorConfig' ] = xvcType( vendorConfig )
 
The python script to create the commonPhoneConfig now properly sets the line mode.  Appreciate the help!
Content for Community-Ad

This widget could not be displayed.