Active Unassigned DN’s – Updating with SQL

Update to a previous post

Disclaimer :

Provided as is – you break your box all on your own buddy!  Lab this first.

 The offending DNs can be queried using:

select n.dnorpattern from numplan n
left outer join devicenumplanmap m on m.fkdevice = n.pkid
where m.fkdevice is null
and n.tkpatternusage = ‘2’
and n.iscallable = ‘t’

  • m.fkdevice is null assures the Route Plan element is unassigned
  • tkpatternusage = ‘2’ matches DNs only
  • iscallable=’t’ defines the “Active” checkbox on the DN page – and our offending behaviour.

Some help came from here.

Construct your own UPDATE SQL statement to fix it!  As assistance – start here, it’s not too difficult.

#dontcalltac

Advertisements
Tagged , , , , , ,

2 thoughts on “Active Unassigned DN’s – Updating with SQL

  1. Nikhil says:

    I need to modify this script to change this header. Can any one pls help me on this.

    Remote-Party-ID “London Test” ;party=calling;screen=yes;privacy=off

    To

    Remote-Party-ID “London Test” ;party=calling;screen=yes;privacy=full

    The script is

    M = {}
    function M.outbound_INVITE(msg)
    local fromtag = msg:getHeaderValueParameter(“From”, “tag”)
    local pai = msg:getHeader(“P-Asserted-Identity”)
    local uri = string.match(pai, “()”)
    local uri2 = string.match(pai, “()”)
    if uri or uri2
    then
    msg:modifyHeader(“From”, “Anonymous “)
    msg:addHeaderValueParameter(“From”, “tag”, fromtag)
    msg:addHeader(“Privacy”, “id”)
    end
    end
    return M

    I tried applying below but it failed.

    function M.outbound_INVITE(msg)
    local remote = msg:getHeader(“Remote-Party-ID”)
    local privacy = string.find(remote, “off”)
    local target = string.sub(remote, privacy)
    local replace = string.gsub(target, “full”)
    msg:modifyHeader(“Remote-Party-ID”, replace)
    end
    return M

    Can anyone pls help me on this?

    Regards,
    Nikhil

    Like

  2. jonathan says:

    Hi Nikhil.

    Happy to help. Your post is a little confusing. Please can you confirm what exactly you need to change? Is it only the privacy setting in the RPID? Also, please confirm the call direction? Is this inbound to CUCM, or outbound on the SIP trunk?

    Also, why are you trying to use a normalization script for this – why not set privacy on the line or trunk?

    Regards,
    Jonathan

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Collaboration Engineer

All things Technology - Posts to save for when you need them

Gerry Keleghan's Blog

A Blog about Cisco Unified Communications

ccieme

my personal journey to ccie collaboration

Striving for greatness

Thoughts on emerging tech, open source, and life

Network Experts Blog

“Knowledge comes by eyes always open and working hands.”

SIP Adventures

A unified communications blog by Andrew Prokop

The Cloverhound Blog

Cloverhound Employees Talk Unified Communications and Contact Center

Warcop

Fog navigator. Get out of the clouds. Down to earth solutions. @Warcop

Cisco Collab Engineering Tips

Michael White - CCIE #26626

Darkroomstory

Photography by Manos,

afterthenumber

Thoughts and experiences of a Cisco Collaboration engineer after clearing the CCIE lab...

The Daily Post

The Art and Craft of Blogging

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

%d bloggers like this: