Closed Bram-diederik closed 1 year ago
Note: my failover ha-sip home assistant is now fully featured. I can fully test the next plugin.
I've updated the underlying SIP library to the latest available version. Can you please check if this is still a problem?
Surething.
My main crashed on the update.
My failover works after the update but the issue remains.
init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
| SIP Account 1: No file name for incoming call config specified.
| SIP Account 2: No file name for incoming call config specified.
20:47:27.867 os_core_unix.c !pjlib 2.13 for POSIX initialized
20:47:27.871 sip_endpoint.c .Creating endpoint instance...
20:47:27.871 pjlib .select() I/O Queue created (0xc77c48)
20:47:27.871 sip_endpoint.c .Module "mod-msg-print" registered
20:47:27.871 sip_transport. .Transport manager created.
20:47:27.871 pjsua_core.c .PJSUA state changed: NULL --> CREATED
| OnRegState: 200 OK
| OnRegState: 200 OK
Call hangs cant call in again
More testing. The watchdog detects a failure and restarts the addon.
Log with crash.
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: hangup
| timeout: 300.0
| parent_menu: *id001
| post_action: noop
| timeout: 300.0
| parent_menu: null
|
| Registering call with id 4008
| Add to state: 4008
| Incoming call from '<sip:4008@192.168.5.43>' to '<sip:6024@192.168.5.44;ob>' (parsed: '4008')
| Answer mode: LISTEN
| Calling webhook sip_call_webhook_id with data {'event': 'incoming_call', 'caller': '<sip:4008@192.168.5.43>', 'parsed_caller': '4008', 'sip_account': 2}
| Webhook response 200 b''
| Early
| Got "answer" command for 4008
| Trigger answer of call (if not established already)
| Call will be answered now.
| onCallMediaState call info state 3
| Connected media 1
| Call connecting...
| Call connected
| onCallRxReinvite
| onCallRxOffer
| onCallMediaState call info state 5
| Connected media 1
| Call is established.
| Calling webhook sip_call_webhook_id with data {'event': 'call_established', 'caller': '<sip:4008@192.168.5.43>', 'parsed_caller': '4008', 'sip_account': 2}
| Webhook response 200 b''
| Playing message: fan slaapkamer aan
| Calling home assistant service on domain script service turn_on with entity script.switch_fan_slaapkamer
| Service response 200 b'[{"entity_id":"script.switch_fan_slaapkamer","state":"on","attributes":{"last_triggered":"2023-02-02T19:56:11.604961+00:00","mode":"single","current":1,"friendly_name":"switch_fan_slaapkamer"},"last_changed":"2023-02-02T19:56:11.605125+00:00","last_updated":"2023-02-02T19:56:11.605125+00:00","context":{"id":"01GR9V6VEKHH19S2BF42D3YEQZ","parent_id":null,"user_id":"671e7a6fd39349a99ad434fac16ee36e"}}]'
| Playback done.
| Scheduled post action: hangup
| Hang-up.
| Call disconnected
| Calling webhook sip_call_webhook_id with data {'event': 'call_disconnected', 'caller': '<sip:4008@192.168.5.43>', 'parsed_caller': '4008', 'sip_account': 2}
| Webhook response 200 b''
| Remove from state: 4008
| &id001
| id: null
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: {}
| default_choice:
| id: null
| message: Unknown option
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: return
| timeout: 300.0
| parent_menu: *id001
| timeout_choice:
| id: null
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: hangup
| timeout: 300.0
| parent_menu: *id001
| post_action: noop
| timeout: 300.0
| parent_menu: null
|
| Registering call with id 4008
| Add to state: 4008
| Incoming call from '<sip:4008@192.168.5.43>' to '<sip:6024@192.168.5.44;ob>' (parsed: '4008')
| Answer mode: LISTEN
| Calling webhook sip_call_webhook_id with data {'event': 'incoming_call', 'caller': '<sip:4008@192.168.5.43>', 'parsed_caller': '4008', 'sip_account': 2}
| Webhook response 200 b''
python3: ../src/pjsip/sip_transport.c:841: pjsip_rx_data_free_cloned: Assertion `rdata' failed.
/run.sh: line 34: 227 Aborted (core dumped) python3 /ha-sip/main.py
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
2.4 test same issue.
python3: ../src/pjsip/sip_transport.c:841: pjsip_rx_data_free_cloned: Assertion `rdata' failed.
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: hangup
| timeout: 300.0
| parent_menu: *id001
| post_action: noop
| timeout: 300.0
| parent_menu: null
|
| 20:48:01.135488 [2] Registering call with id 4000
| 20:48:01.135938 [ ] Add to state: 4000
| 20:48:01.136320 [2] Incoming call from '<sip:4000@127.0.1.1>' to '<sip:6024@192.168.5.44;ob>' (parsed: '4000')
| 20:48:01.136475 [2] Answer mode: LISTEN
| 20:48:01.136692 [ ] Calling webhook lwrM6ZXTw5jn0fhnjGkY with data {'event': 'incoming_call', 'caller': '<sip:4000@127.0.1.1>', 'parsed_caller': '4000', 'sip_account': 2}
| 20:48:01.207537 [ ] Webhook response 200 b''
| 20:48:01.209674 [2] Early
| 20:48:01.334728 [ ] Got "answer" command for 4000
| 20:48:01.338001 [2] Trigger answer of call (if not established already)
| 20:48:01.341514 [2] Call will be answered now.
| 20:48:01.345042 [2] onCallMediaState call info state 3
| 20:48:01.346334 [2] Connected media 1
| 20:48:01.347474 [2] Call connecting...
| 20:48:01.352169 [2] Call connected
| 20:48:01.365070 [2] onCallRxReinvite
| 20:48:01.366325 [2] onCallRxOffer
| 20:48:01.374381 [2] onCallMediaState call info state 5
| 20:48:01.374753 [2] Connected media 1
| 20:48:02.356208 [2] Call is established.
| 20:48:02.356580 [ ] Calling webhook lwrM6ZXTw5jn0fhnjGkY with data {'event': 'call_established', 'caller': '<sip:4000@127.0.1.1>', 'parsed_caller': '4000', 'sip_account': 2}
| 20:48:02.395096 [ ] Webhook response 200 b''
| 20:48:02.397065 [2] Playing message: mute slaapkamer
| 20:48:03.062153 [2] Calling home assistant service on domain script service turn_on with entity script.switch_snapclient_slaapkamer_toggle
| 20:48:03.118114 [ ] Service response 200 b'[{"entity_id":"script.switch_snapclient_slaapkamer_toggle","state":"on","attributes":{"last_triggered":"2023-02-13T19:48:03.099409+00:00","mode":"single","current":1,"friendly_name":"switch_snapclient_slaapkamer_toggle"},"last_changed":"2023-02-13T19:48:03.099584+00:00","last_updated":"2023-02-13T19:48:03.099584+00:00","context":{"id":"01GS653VCSQV9DYW0SVJT9N91J","parent_id":null,"user_id":"671e7a6fd39349a99ad434fac16ee36e"}}]'
| 20:48:04.802075 [2] Playback done.
| 20:48:04.814429 [2] Scheduled post action: hangup
| 20:48:04.814626 [2] Hang-up.
| 20:48:04.816731 [2] Call disconnected
| 20:48:04.816997 [ ] Calling webhook lwrM6ZXTw5jn0fhnjGkY with data {'event': 'call_disconnected', 'caller': '<sip:4000@127.0.1.1>', 'parsed_caller': '4000', 'sip_account': 2}
| 20:48:04.852893 [ ] Webhook response 200 b''
| 20:48:04.855102 [ ] Remove from state: 4000
| &id001
| id: null
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: {}
| default_choice:
| id: null
| message: Unknown option
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: return
| timeout: 300.0
| parent_menu: *id001
| timeout_choice:
| id: null
| message: null
| audio_file: null
| language: en
| action: null
| choices_are_pin: false
| choices: null
| default_choice: null
| timeout_choice: null
| post_action: hangup
| timeout: 300.0
| parent_menu: *id001
| post_action: noop
| timeout: 300.0
| parent_menu: null
|
| 20:48:06.212794 [2] Registering call with id 4000
| 20:48:06.214655 [ ] Add to state: 4000
| 20:48:06.217484 [2] Incoming call from '<sip:4000@127.0.1.1>' to '<sip:6024@192.168.5.44;ob>' (parsed: '4000')
| 20:48:06.223082 [2] Answer mode: LISTEN
| 20:48:06.229987 [ ] Calling webhook lwrM6ZXTw5jn0fhnjGkY with data {'event': 'incoming_call', 'caller': '<sip:4000@127.0.1.1>', 'parsed_caller': '4000', 'sip_account': 2}
| 20:48:06.297060 [ ] Webhook response 200 b''
python3: ../src/pjsip/sip_transport.c:841: pjsip_rx_data_free_cloned: Assertion `rdata' failed.
/run.sh: line 36: 235 Aborted (core dumped) python3 /ha-sip/main.py
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Can you retest with 2.9 please? I also added some more error output in case of crashes, and that might be helpful to solve the problem
i cant i replaced the lot with asterisk extentions
I use my voip phone in my bedroom to control my bedroom devices. triggered by incoming number. And if i fire lots of commando after each other (you know monkey just press the buttons) the addon can crash after running several actions.
I use 2.1. (could not test this on my test environment with next because this requires lots of additional integration)
aterisk passon
addon log
part of the script used
full script