Restoring a NethVoice backup can abort during restore-module/70configure_module when the script calls set-nethvoice-hotel through agent.tasks.run(). The same action works when executed from outside with api-cli, but fails from the module context with 403 Forbidden.
This prevents the following restore steps from running, including SIP/SIPS port adjustment and service reload.
Steps to reproduce
- Restore a NethVoice backup from version <= 1.7.0.
- Let the restore reach
restore-module/70configure_module.
- The script calls
set-nethvoice-hotel with a valid payload through agent.tasks.run().
- Check the restore result and logs.
Expected behavior
The set-nethvoice-hotel action is authorized from the module context and the restore completes all post-restore steps.
Actual behavior
The set-nethvoice-hotel action fails with 403 Forbidden, causing restore-module to abort at step 70configure_module.
Traceback (most recent call last):
File "/home/nethvoice1/.config/actions/restore-module/70configure_module", line 33, in <module>
response = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='set-nethvoice-hotel', data={
File "/usr/local/agent/pypkg/agent/tasks/apiclient.py", line 246, in _apost_task
async with client.post(
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/aiohttp/client_reqrep.py", line 629, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='http://cluster-leader:9311/api/module/nethvoice1/tasks'
task/module/nethvoice1/xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxx: action "restore-module" status is "aborted" (1) at step 70configure_module
See also
Restoring a NethVoice backup can abort during
restore-module/70configure_modulewhen the script callsset-nethvoice-hotelthroughagent.tasks.run(). The same action works when executed from outside withapi-cli, but fails from the module context with403 Forbidden.This prevents the following restore steps from running, including SIP/SIPS port adjustment and service reload.
Steps to reproduce
restore-module/70configure_module.set-nethvoice-hotelwith a valid payload throughagent.tasks.run().Expected behavior
The
set-nethvoice-hotelaction is authorized from the module context and the restore completes all post-restore steps.Actual behavior
The
set-nethvoice-hotelaction fails with403 Forbidden, causingrestore-moduleto abort at step70configure_module.See also