cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
646
Views
0
Helpful
2
Replies

addCommonPhoneConfig ignoring vendorConfig info?

JasunKAR
Level 1
Level 1

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

Alex Stevenson
Cisco Employee
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

Alex Stevenson
Cisco Employee
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!

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!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: