arnonym / ha-plugins

Home-Assistant SIP Gateway
Apache License 2.0
157 stars 19 forks source link

Monkey test on my voip phone fails #21

Closed Bram-diederik closed 1 year ago

Bram-diederik commented 1 year ago

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

exten => 4012,1,Log(NOTICE, switch fan slaapkamer)
exten => 4012,n,Set(CALLERID(NUM)=4012)
exten => 4012,n,Dial(PJSIP/6011)
exten => 4012,n,Hangup()

addon log


|   timeout: 300.0
|   parent_menu: *id001
| timeout_choice:
|   id: null
|   message: 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 4012
| Incoming call  from  '<sip:4012@192.168.5.14>' to '<sip:6011@192.168.5.20;ob>' (parsed: '4012')
| Answer mode: LISTEN
| Calling webhook sip_call_webhook_id with data {'event': 'incoming_call', 'caller': '<sip:4012@192.168.5.14>', 'parsed_caller': '4012'}
| Webhook response 200 b''
| Early
| Got "answer" command for 4012
| 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:4012@192.168.5.14>', 'parsed_caller': '4012'}
| Webhook response 200 b''
| Playing message: fan slaapkamer uit
| 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":"2022-11-07T15:42:31.484147+00:00","mode":"single","current":1,"friendly_name":"switch_fan_slaapkamer"},"last_changed":"2022-11-07T15:42:31.484282+00:00","last_updated":"2022-11-07T15:42:31.484282+00:00","context":{"id":"01GH9C3V1TEJ6TNXYKBM4ECV8R","parent_id":null,"user_id":"42ed58e0d09f4f77b4beb6c2469e4e65"}}]'
| Playback done.
| Scheduled post action: noop
| onCallRxReinvite
| onCallRxOffer
| onCallMediaState call info state 5
| Connected media 1
| Call disconnected
| Calling webhook sip_call_webhook_id with data {'event': 'call_disconnected', 'caller': '<sip:4012@192.168.5.14>', 'parsed_caller': '4012'}
| Webhook response 200 b''
| &id001
| id: null
| message: null
| language: en
| action: null
| choices_are_pin: false
| choices: {}
| default_choice:
|   id: null
|   message: Unknown option
|   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
|   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 4012
| Incoming call  from  '<sip:4012@192.168.5.14>' to '<sip:6011@192.168.5.20;ob>' (parsed: '4012')
| Answer mode: LISTEN
| Calling webhook sip_call_webhook_id with data {'event': 'incoming_call', 'caller': '<sip:4012@192.168.5.14>', 'parsed_caller': '4012'}
| Webhook response 200 b''
python3: ../src/pjsip/sip_transport.c:842: pjsip_rx_data_free_cloned: Assertion `rdata' failed.
/run.sh: line 34:   225 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

part of the script used


      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4012' }}"
          - condition: state
            entity_id: switch.calex_smart_plug_nl_socket_1
            state: "on"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4012"
                timeout: 10
                menu:
                  message: fan slaapkamer uit
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.switch_fan_slaapkamer
                  post_action: hangup
            enabled: true
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4012' }}"
          - condition: state
            entity_id: switch.calex_smart_plug_nl_socket_1
            state: "off"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4012"
                timeout: 10
                menu:
                  message: fan slaapkamer aan
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.switch_fan_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4012"
            enabled: false
    default: []
    enabled: true
mode: single

full script


alias: asterisk_controller
description: lokaal inkomende calls om HA te bedienen
trigger:
  - platform: webhook
    webhook_id: sip_call_webhook_id
condition:
  - alias: incomming call
    condition: template
    value_template: " {{ trigger.json.event == 'incoming_call' }} "
    enabled: true
  - alias: incomming call
    condition: template
    value_template: " {{ trigger.json.parsed_caller != '5555' }} "
    enabled: true
action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4000' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4000"
                timeout: 10
                menu:
                  message: mute slaapkamer
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.switch_snapclient_slaapkamer_toggle
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4000"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4001' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4001"
                timeout: 10
                menu:
                  message: unmute slaapkamer
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.unmute_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4001"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4002' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4002"
                timeout: 10
                menu:
                  message: brams chillere nummers
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.cast_brams_chillere_nummers_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4002"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4003' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4003"
                timeout: 10
                menu:
                  message: brams lekkere nummers
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.cast_brams_lekker_nummers_slaapkamer
                post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4003"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4004' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4004"
                timeout: 10
                menu:
                  message: reggae
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.cast_slaapkamer_reggae
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4004"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4005' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4005"
                timeout: 10
                menu:
                  message: soul and jazz
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.cast_slaapkamer_soul_n_jazz
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4005"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4006' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4006"
                timeout: 10
                menu:
                  message: arrow rock fm
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.cast_slaapkamer_arrow_rock_fm
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4006"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4007' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4007"
                timeout: 10
                menu:
                  message: nieuws en weer
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.anp_nieuws
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4007"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4008' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4008"
                timeout: 10
                menu:
                  message: volume omhoog
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.volume_slaapkamer_up
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4008"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4009' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4009"
                timeout: 10
                menu:
                  message: volume omlaag
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.volume_slaapkamer_down
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4009"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4010' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4010"
                timeout: 10
                menu:
                  message: cast spotify
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.snapcast_spotify_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4010"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4011' }}"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4011"
                timeout: 10
                menu:
                  message: cast mpd
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.snapcast_mpd_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4011"
            enabled: false
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4012' }}"
          - condition: state
            entity_id: switch.calex_smart_plug_nl_socket_1
            state: "on"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4012"
                timeout: 10
                menu:
                  message: fan slaapkamer uit
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.switch_fan_slaapkamer
                  post_action: hangup
            enabled: true
      - conditions:
          - condition: template
            value_template: "{{ trigger.json.parsed_caller == '4012' }}"
          - condition: state
            entity_id: switch.calex_smart_plug_nl_socket_1
            state: "off"
        sequence:
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: answer
                number: "4012"
                timeout: 10
                menu:
                  message: fan slaapkamer aan
                  action:
                    domain: script
                    service: turn_on
                    entity_id: script.switch_fan_slaapkamer
                  post_action: hangup
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
            enabled: false
          - service: hassio.addon_stdin
            data_template:
              addon: c7744bff_ha-sip
              input:
                command: hangup
                number: "4012"
            enabled: false
    default: []
    enabled: true
mode: single
Bram-diederik commented 1 year ago

Note: my failover ha-sip home assistant is now fully featured. I can fully test the next plugin.

arnonym commented 1 year ago

I've updated the underlying SIP library to the latest available version. Can you please check if this is still a problem?

Bram-diederik commented 1 year ago

Surething.

Bram-diederik commented 1 year ago

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

Bram-diederik commented 1 year ago

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
Bram-diederik commented 1 year ago

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
arnonym commented 1 year ago

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

Bram-diederik commented 1 year ago

i cant i replaced the lot with asterisk extentions