Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_phone fail to run (lines parameter) #12

Open
borismand opened this issue Mar 1, 2021 · 2 comments
Open

add_phone fail to run (lines parameter) #12

borismand opened this issue Mar 1, 2021 · 2 comments

Comments

@borismand
Copy link

borismand commented Mar 1, 2021

Hi,

I'm trying to write a function for the creation of a SoftPhone device and it fails because there is a missing element for lines.
The exception is: zeep.exceptions.ValidationError: Missing element recordingMediaSource (addPhone.phone.lines)

This is the lines definition as described in the documentation: lines=[(extension, 'Internal', fullname, fullname, fullname, '')]
when "fullname" is the name of the user I'm creating it for and the extension is the directory number.

Adding the function:

`

def createSoftPhoneDevice(self, username):
fullname = self.getUserFullName(username)
extension = self.getUserExtensionNumber(username)
resp = self.ucm.add_phone(name=username,
description=username + ' - CSF',
product='Cisco Unified Client Services Framework',
device_pool='DP_Infinidat',
phone_template='Standard Client Services Framework',
common_device_config='Standard Common Phone Profile',
securityProfileName='Cisco Unified Client Services Framework - '
'Standard SIP Non-Secure Profile',
lines=[(extension, 'Internal', fullname, fullname, fullname, '')],
dev_class='Phone',
protocol='SIP',
softkey_template='',
subscribe_css='Internal',
ehook_enable='0')
return resp`

I will really appreciate your help and guidance
Thanks

@bradh11
Copy link
Collaborator

bradh11 commented Apr 3, 2021

We’re you able to resolve? If not, can you please share the version of CUCM you are working with?

@crypto-bot7
Copy link

I have exactly the same issue with the addPhone method.

zeep.exceptions.ValidationError: Missing element recordingMediaSource (addPhone.phone.lines)

I have cross checked the input expected on axl.addPhone, so the input provided by my script should be correct. I was getting a different error in case input was not formatted correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants