[Asterisk-java-devel] The "getVariable(Constants.VARIABLE_TRACE_ID)" inside of ChannelManager.hand
Brought to you by:
srt
From: Bruno N. <bn...@gm...> - 2006-11-02 16:04:33
|
Hi guys, The method ChannelManager.handleDialEvent() calls twice the private method getTraceId() (code bellow): private String getTraceId(AsteriskChannel channel) { String traceId; try { traceId = channel.getVariable(Constants.VARIABLE_TRACE_ID); } catch (Exception e) { traceId = null; } //logger.info("TraceId for channel " + channel.getName() + " is " + traceId); return traceId; } My customer complains that this getVariable() is nonsense because the variable TRACE_ID is never set on our asterisk server. Also he says this action consumes resources on the server, so he is asking me to disable this. He even gave me a patch (bellow) to disable the call to getVariable(). I agree with the points my customer is saying. Guys, could you add an "option" to the AsteriskServer interface to disable this action? For example, something like AsteriskServer.discoverTraceId(boolean enable) Meanwhile I believe I'll have to apply his patch: > --- ./src/main/java/org/asteriskjava/live/internal/ChannelManager.java.original 2006-11-01 10:40:17.000000000 -0300 > +++ ./src/main/java/org/asteriskjava/live/internal/ChannelManager.java 2006-09-20 18:29:25.000000000 -0300 > @@ -604,7 +604,10 @@ > > try > { > - traceId = channel.getVariable(Constants.VARIABLE_TRACE_ID); > + //CHANGE BEGINS HERE > + //traceId = channel.getVariable(Constants.VARIABLE_TRACE_ID); > + traceId = ""; > + //CHANGE ENDS HERE > } > catch (Exception e) > { > |