Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Cobras Import to Connection smtp notification devices

                   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

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Cobras Import to Connection smtp notification devices

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()

2 REPLIES
Cisco Employee

Re: Cobras Import to Connection smtp notification devices

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()

New Member

Re: Cobras Import to Connection smtp notification devices

Thanks for your help, did the trick for me.

339
Views
0
Helpful
2
Replies
CreatePlease to create content