" /> Retrieve the DN alias - Genesys CTI User Forum

Author Topic: Retrieve the DN alias  (Read 3039 times)

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Retrieve the DN alias
« on: February 22, 2014, 12:56:03 PM »
Advertisement
Hello,

If I have the DN number, is it possible to retrieve it's alias in IRD? I do believe I should use GetObjectProperty but can't seem to find any documentation for this function.

Thank you,
Mihai

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Retrieve the DN alias
« Reply #1 on: February 22, 2014, 07:02:54 PM »
Number alone is not enough to completely identify DN object - sometheing else need to be known like switch name (or switch dbid) this dn belongs to.
Assuming this information is available (switch myswitch, dn number id 123) function FindConfigObject to get information you need.
- Create variable (say DNObject) of type LIST or STRING (FindConfigObject return LIST value)
- DNObject= FindConfigObject[CFGDN, 'switch:myswitch|number:123']
          (or DNObject= FindConfigObject[CFGDN, 'switchdbid:dbidofswitch|number:123'])
    returned DNObject will contain quite a bit info about DN including alias (aka name) - you can print it and see.
- alias= KVListGetStringValue[DNObject, 'name'] 

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Re: Retrieve the DN alias
« Reply #2 on: February 25, 2014, 03:05:20 PM »
worked like a charm
Thank you!