From ff6b2a2743fdd348a2584b4651834ccf58694ada Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Sun, 8 Feb 2026 15:18:26 +0100 Subject: [PATCH] Fix JSON payload template to generate valid JSON (v2.0.9) --- sip-notifier/README.md | 16 ++++++++++------ sip-notifier/config.yaml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sip-notifier/README.md b/sip-notifier/README.md index 0b97319..ab13296 100644 --- a/sip-notifier/README.md +++ b/sip-notifier/README.md @@ -52,8 +52,8 @@ script: - service: rest_command.sip_notification_call data: destination: "{{ destination }}" - audio_url: "{{ audio_url | default('') }}" - message: "{{ message | default('') }}" + audio_url: "{{ audio_url if audio_url else '' }}" + message: "{{ message if message else '' }}" duration: "{{ duration | default(30) }}" rest_command: @@ -61,11 +61,15 @@ rest_command: url: "http://088d3b92-sip-notifier:8099/send_notification" method: POST content_type: "application/json" - payload: > + payload: >- { - "destination": "{{ destination }}", - {% if audio_url and audio_url != '' %}"audio_url": "{{ audio_url }}",{% endif %} - {% if message and message != '' %}"message": "{{ message }}",{% endif %} + "destination": "{{ destination }}" + {%- if audio_url and audio_url != '' %}, + "audio_url": "{{ audio_url }}" + {%- endif %} + {%- if message and message != '' %}, + "message": "{{ message }}" + {%- endif %}, "duration": {{ duration | default(30) }} } ``` diff --git a/sip-notifier/config.yaml b/sip-notifier/config.yaml index c91fd88..7a54ac7 100644 --- a/sip-notifier/config.yaml +++ b/sip-notifier/config.yaml @@ -1,5 +1,5 @@ name: "SIP Voice Notifier" -version: "2.0.8" +version: "2.0.9" slug: "sip-notifier" description: "Send voice notifications via SIP phone calls" arch: