Author Topic: Disable CfgDN object gracefully  (Read 1617 times)

Offline oceanblue

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Disable CfgDN object gracefully
« on: May 10, 2020, 06:34:49 AM »
Hey Guys - I need your expert advice here. I'm trying to switch DN state (Disable/Enable) using config API, which works and GA/CME reflects appropriate DN state as well as WDE generates DNOutofService/backinService messages.


Below is what I see in the TServer log when I execute the code :


@16:47:05.4108 [TCONF] DN info changed (dbid 89720) (number 9130017) (switch-dbid 122)
tserv_dn_changed(9130017)
16:47:05.411  -- forced disable

 So, basically I am forcing it :o

If I perform the same task using GA, I see different message in the TServ log. It looks more graceful in nature :

@22:18:19.0471 [TCONF] Changed in
DN array
  9130017 [89720] dn = '9130017' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force <+>
    linked-resources array register-flag = true
@22:18:19.0806 [TCONF] READER: status: [3]->[3]
22:18:19.094: SIPCFG: Event Type: 5, Object type 2, objectptr 320997f0, objectcntr 0
 [89720] dn = '9130017' type = Extension xtype = DN cfgtype = 1 hash = 1 contact = '*' record = 'true' authenticate-requests = 'register' password = '***' sip-ring-tone-mode = 1 sip-cti-control = 'talk,hold' dial-plan = 'VoIPSvc_PhoneDN_NoRec' cpn = '' request-uri = ''
22:18:19.094: $*:CTI:PRM:PRIVATE_LINE_CHANGED:3195556
22:18:19.094: DN out of service (not registered): 9130017
22:18:19.094: SetDnInService: DN 9130017 Out of Service


Below is a code snippet from my script that I am using for this purpose :


     CfgDN dn = "some DN";
     dn.setState(CfgObjectState.CFGDisabled);
     dn.save(); 

My question is: what should I be doing differently, so that, I am not forcing a disable rather doing it gracefully like GA?

Thanks in advance.

cheers,

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7172
  • Karma: 56330
Re: Disable CfgDN object gracefully
« Reply #1 on: May 11, 2020, 07:55:31 AM »
Guess GA does an unregister first, then set the device as OOS

Enviado de meu SM-N9600 usando o Tapatalk


Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 378
  • Karma: 15
    • Genesys Brasil
Re: Disable CfgDN object gracefully
« Reply #2 on: May 11, 2020, 10:00:46 PM »
Guess GA does an unregister first, then set the device as OOS

Enviado de meu SM-N9600 usando o Tapatalk



I don't think so. GA is not a client of TServer to register or unregister. His code and GA should perform the exact same operation.
Is it the same log file for both the snippets you sent?