11-22-2013 09:05 PM - edited 03-19-2019 07:34 AM
Hi, I have imported 13000 users from 3 unity systems onto single Unity connection 8.6 cluster. all ok except the smtp notification device gets imported as 'text pager 1'.
i have to edit the from filed for this notification , the bulk edit allows you to choose 'smtp' device but not text pager 1 - is there anyway i can change this in bulk.
Can i use subscriber dump to export an existing user with the text pager 1 field and then do an update - what fields willm i require for the csv.
thanks...jeff
Solved! Go to Solution.
11-23-2013 07:15 AM
If you just want to update all SMTP based notification devices that are named "text pager 1" (case insensitive) to some static text you can use this script with the Python Scripting Host for Unity Connection which can be downloaded here:
http://www.ciscounitytools.com/Applications/CxN/PythonScriptingHost/PythonScriptingHost.html
just change the static text to whatever you want (up to 256 characters). If you want to limit it to only notification devices currently active or the like, it's easy enough to change that query.
===================
import clr
clr.AddReference('System.Data')
clr.AddReference('Cisco.Unity.Connection.PythonScriptingHost')
from System.Data import DataTable
from Cisco.Unity.Connection.PythonScriptingHost import ProcDataType
Helpers.SetActiveDatabase("UnityDirDb")
query = 'SELECT ObjectId from vw_Notificationdevicesmtp WHERE fn_tolower(displayname)=?'
dtDevices = Helpers.CreateDataTable(query,"text pager 1")
assert dtDevices.Rows.Count>0,"No notification devices named 'text pager 1' found!"
strStaticText = 'To check voice messages please dial 54321 and sign in with you extension and password'
for device in dtDevices.Rows:
print ('updating:'+device['objectid'])
Helpers.StartNewCommand('csp_NotificationDeviceSMTPModify')
Helpers.AddCommandParam('pObjectid',ProcDataType.Char,device['ObjectId'])
Helpers.AddCommandParam('pStaticText',ProcDataType.LVarChar,strStaticText)
Helpers.ExecutProc_NoRet()
11-23-2013 07:15 AM
If you just want to update all SMTP based notification devices that are named "text pager 1" (case insensitive) to some static text you can use this script with the Python Scripting Host for Unity Connection which can be downloaded here:
http://www.ciscounitytools.com/Applications/CxN/PythonScriptingHost/PythonScriptingHost.html
just change the static text to whatever you want (up to 256 characters). If you want to limit it to only notification devices currently active or the like, it's easy enough to change that query.
===================
import clr
clr.AddReference('System.Data')
clr.AddReference('Cisco.Unity.Connection.PythonScriptingHost')
from System.Data import DataTable
from Cisco.Unity.Connection.PythonScriptingHost import ProcDataType
Helpers.SetActiveDatabase("UnityDirDb")
query = 'SELECT ObjectId from vw_Notificationdevicesmtp WHERE fn_tolower(displayname)=?'
dtDevices = Helpers.CreateDataTable(query,"text pager 1")
assert dtDevices.Rows.Count>0,"No notification devices named 'text pager 1' found!"
strStaticText = 'To check voice messages please dial 54321 and sign in with you extension and password'
for device in dtDevices.Rows:
print ('updating:'+device['objectid'])
Helpers.StartNewCommand('csp_NotificationDeviceSMTPModify')
Helpers.AddCommandParam('pObjectid',ProcDataType.Char,device['ObjectId'])
Helpers.AddCommandParam('pStaticText',ProcDataType.LVarChar,strStaticText)
Helpers.ExecutProc_NoRet()
11-27-2013 01:50 PM
Thanks for your help, did the trick for me.
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: