Skip to content

SNOM D120 provisioning returns HTTP 500 due to Twig runtime error in snom.tmpl (null * string) #7924

@Stell0

Description

@Stell0

Description

On a NethVoice 4 instance, provisioning for a SNOM D120 stays in “waiting” because the provisioning endpoint returns HTTP 500. The application log shows a Twig runtime error: Unsupported operand types: null * string while rendering snom.tmpl (reported at line 209).

Support ID: xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxx

Steps to reproduce

  1. On NethVoice 4, go to Devices → Phones.
  2. Add a SNOM D120 phone (enter MAC) and associate it to a user/extension.
  3. Trigger provisioning (or open the provisioning XML URL from a browser).
  4. Observe the provisioning status remains “waiting” and the provisioning endpoint returns HTTP 500.

Expected behavior

Provisioning endpoint returns the generated XML configuration for the SNOM D120 and the phone can complete provisioning.

Actual behavior

Provisioning endpoint returns HTTP 500 (“Internal server error”). Application log reports a Twig rendering failure:

provisioning.ERROR: TypeError: Unsupported operand types: null * string
...
Next Twig\Error\RuntimeError: ... in "snom.tmpl" at line 209.

Proposed local workaround tested:

  • Change template expression from:

    • <backlight perm="">{{ (1.2 * brightness + 3)|round }}</backlight>
    • to <backlight perm="">{{ (1.2 * (brightness ?? 5) + 3)|round }}</backlight>
  • Change:

    • {% set expkey_max = cap_expmodule_count * cap_expkey_count %}
    • to {% set expkey_max = (cap_expmodule_count|default(0)) * (cap_expkey_count|default(0)) %}

See also

Metadata

Metadata

Assignees

Labels

nethvoiceBug or features releted to the NethVoice project

Type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions