Disable CfgDN object gracefully

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,

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?

@hsujdik

My code snippet generates the following logging in the TServer log :

@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

Yeah, no TServer client, but a change at CfgServer will be propagated to TServer and maybe the Cfg event is what is different and TServer reacts to that change accordingly

Yeah, may be that’s the case…the CFGEvent update to TServer might be different in this case for a native client (i.e., GA) than from a PSDK app.

I will look at the CfgServ log and see if I find anything interesting.

cheers,