Ok, I now have ha-sip registring the extension successfully. However whenever I write a script to send a message I get a not an object error. I can’t seem to make the examples that use nested objects to work at all (IE the format:
addon:
input:
command: play_message
number: sip:number
etc
I am consistently getting a couple of weird statuses/messages:
this one: SIP outbound status for acc 0 is not active
and this one: Error: Not an object:
Here is the script that will save but doesn’t work with a “not an object” error:
alias: Send Lee a test message
sequence:
- sequence:
- action: hassio.addon_stdin
metadata: {}
data:
addon: c7744bff_ha-sip
input: >
{ "command":"play_message", "number":"sip:[email protected]",
"message":"This is a test messsage", "cache_audio": true,
"wait_for_audio_to_finish": true }
- action: hassio.addon_stdin
metadata: {}
data:
addon: c7744bff_ha-sip
input: |
{
"command": "dial",
"number": "sip:[email protected]",
"webhook_to_call_after_call_was_established": "hasip_web_call_established",
"webhook_to_call": "hasip_web_listen_in",
"ring_timeout": "hasip_web_no_answer",
"call_established": "hasip_web_call_answered",
"entered_menu": "hasip_web_entered_menu",
"timeout": "hasip_web_message_timeout",
"dtmf_digit": "hasip_web_digit_dialed",
"call_disconnected": "hasip_web_hung_up",
"playback_done": "hasip_web_playback_complete",
"ring_timeout": 15,
"sip_account": 1,
"message": "This is a different message"
}
description: ""
icon: mdi:phone
both of these calls fail (one uses the dial command, the other the play message command - and yes I tried doing each individually first)
0:57:02.234 pjsua_acc.c ....SIP outbound status for acc 0 is not active
10:57:02.234 pjsua_acc.c ....sip:[email protected]: registration success, status=200 (OK), will re-register in 300 seconds
10:57:02.234 pjsua_acc.c ....Keep-alive timer started for acc 0, destination:192.168.2.245:5060, interval:14s
| 10:57:02.234763 [1] OnRegState: 200 OK
| 10:57:53.913152 [ ] Error: Not an object: { "command":"play_message", "number":"sip:[email protected]", "message":"This is a test messsage", "cache_audio": true, "wait_for_audio_to_finish": true }
| 10:57:54.203629 [ ] Error: Not an object: {
"command": "dial",
"number": "sip:[email protected]",
"webhook_to_call_after_call_was_established": "hasip_web_call_established",
"webhook_to_call": "hasip_web_listen_in",
"ring_timeout": "hasip_web_no_answer",
"call_established": "hasip_web_call_answered",
"entered_menu": "hasip_web_entered_menu",
"timeout": "hasip_web_message_timeout",
"dtmf_digit": "hasip_web_digit_dialed",
"call_disconnected": "hasip_web_hung_up",
"playback_done": "hasip_web_playback_complete",
"ring_timeout": 15,
"sip_account": 1,
"message": "This is a different message"
}```