At least we should have used the “WayBack Machine” so we don’t lose that precious data. Or something else, but the issues are gone and we’re left stranded, making the same questions again
The device response is missing Value element. IIRC that’s an unsupported device so you’ll need to patch GenieACS. See soap.coffee and look up the function that parses GetParameterValuesResponse and make it fallback to empty string if the element is missing.
There was a problem also because the ATA was sending a faulty GetParameterNamesResponse. I patched it as follows:
function GetParameterNamesResponse(xml) {
try {
const b = parameterInfoList(xml.get("ParameterList"));
return {
name: "GetParameterNamesResponse",
parameterList: b
};
}
catch(err){
return {
name: "GetParameterNamesResponse",
parameterList: ""
};
}
}
Now the next problem is that Genie asks for Device.Services.VoiceService and the CPE returns a 9005 FAULTSTRING: Invalid parameter Name
How can I prevent GenieACS from asking that precise parameter? I don’t know in fact why is it asking for it, because it’s just a node without info, where the objects .1. .2. … get created as SIP lines.
I suspect we must modify cwmp.coffee but well… I don’t know exactly where.
I have tried to modify the cwmp.js directly, around these lines:
switch (task.name) {
case 'getParameterValues':
sessionContext.channels["task_" + task._id] = 0;
ref2 = task.parameterNames;
for (m = 0, len1 = ref2.length; m < len1; m++) {
p = ref2[m];
if (p == "Device.Services.VoiceService") break;
session.addProvisions(sessionContext, "task_" + task._id, [['refresh', p]]);
}
break;
I’ve added the line if (p == "Device.Services.VoiceService") break; but it only works when querying it manually, that is, if you refresh this param through genieacs-gui. But if you refresh the entire tree since the root Device then somehow the script doesn’t go through the same piece of code.
I still need some clues
Finally… The solution was to patch soap.js again. This is the new patched function:
function GetParameterValues(xml, methodRequest) {
const el = xml.node("cwmp:GetParameterValues").node("ParameterNames");
el.attr({
"soap-enc:arrayType": `xsd:string[${methodRequest.parameterNames.length}]`
});
for (const p of methodRequest.parameterNames) {
if (p == "Device.Services.VoiceService") continue;
el.node("string").text(p);
}
}
Anyway, after that, I had a Session Timeout problem, that I solved thanks to this post: ACK Timeout / Session Timeout