Fix JSON payload template to generate valid JSON (v2.0.9)
This commit is contained in:
@@ -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) }}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user