cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
951
Views
5
Helpful
5
Replies

UCCE/ICM(11.6) SCRIPTING DN node

Triggus
Level 1
Level 1

Hi there,  a simple question  (got couple more but as these are not related will post in new threads for clarity)  been digging through dosc and other online resources but could not find any answer at all.

In our environment (we're talking here thousands of UTNs in hundreds of scrpits) we widely use DN node in scripts  I am wondering if there is any way to report on it. Any way of gathering information  what UTNs are present in a DN node in what script would be more then enough. I've dug  in database schema but could not find any SQL table storing this info. This node is nasty, you can't even get to the script and simply copy paste the list from there as you can with many other objects. Adding and receiving numbers in or from there is painful manual labor for us  especially in rather big environment like ours so any word of wisdom from the thousands years of collective knowledge here will be more then appreciated! 

DN PAIN.PNG

 
 
5 Replies 5

I might be misunderstanding you, but why not use the Script Reference option in Configuration Manager and select Dialed Number and then select the dialed number you want to see in which script(s) it is referenced?

Hi Bill, well this is sort of opposite of what I am trying to achieve.  I am not worried about singe number and what script it goes to I would like to be able to tell DN nodes (could be their IDs at least in particular scripts) and list all numbers they contain. Script reference in Config Manager could be handy for a quick check on particular number, providing some excel worthy data for customer is different story I think (you can't even copy paste stuff from Config manager! :))

Are you me? I'm currently supporting a customer who has scripting with dozens and dozens of DN nodes in a script. They are used to specify data for specific numbers, but it's a monster to manage. We're working moving this to DB lookups, which will reduce the scripting by 90%.

 

So to answer your question, I've built a SQL query which goes through every DN node and confirms that it has the right number of DNs inside it. This is a rough way to at least confirm that you've captured all the DNs. This can be modified to look inside the DN nodes and confirm they are all the same too.

 

SELECT dn.DialedNumberString, COUNT(*) as CountofDNs
FROM Script s
JOIN Master_Script ms ON (ms.MasterScriptID = s.MasterScriptID)
JOIN Script_Cross_Reference scf ON (s.ScriptID = scf.ScriptID)
JOIN Dialed_Number dn ON (scf.ForeignKey = dn.DialedNumberID)
WHERE (s.Version = ms.CurrentVersion OR
(ms.CurrentVersion=-1 and ms.NextAvailableVersion=s.Version+1)) -- restricts to Current version only.
AND ms.EnterpriseName = '{Name of your script here}'
AND scf.TargetType = '11' -- This tells us to look at DN nodes
GROUP BY DialedNumberString

The results will look something like:

DialedNumberString, CountofDNs

2145551234, 4

2145553434, 3

 

david

 

 

This looks interesting at first glance I'll play with SQL when I have a minute and see what I can produce from there based on your stuff and if I can modify it to my needs.  The idea is to get list of number per particular DN  node rather then counts ... if possible. 

I suspect what I got you will help you get there as ultimately you just need to find the node ID and add it to the query. Then you'll see what numbers are inside the node and their count.

 

david