sdesalve / hassio-addons

MIT License
85 stars 21 forks source link

echo: write error: Broken pipe #58

Closed ferrarid61 closed 1 year ago

ferrarid61 commented 1 year ago

Hello, sometima the integration fails woth this log Any iedas ? Thanks

This call will be terminated after '50' seconds. 16:44:33.869 os_core_unix.c !pjlib 2.11.1 for POSIX initialized ./run: line 337: echo: write error: Broken pipe ./run: line 337: echo: write error: Broken pipe ./run: line 337: 515 Exit 1 ( sleep $MAX_CALL_TIME_VALUE; echo h; sleep 0.5; echo q ) 516 Segmentation fault (core dumped) | ( pjsua --app-log-level=3 --config-file '/share/dss_voip/dss_pjsua.conf' $CALL_SIP_URI_VALUE 2> /share/dss_voip/dss_pjsua.log ) [Error] pjsua Exit code: 139

sdesalve commented 1 year ago

Only some times? Maybe between 2 close calls?

Please post

Addon configuration Details about your Lan and your Hassio FULL ADDON LOGS

fiolux commented 1 year ago

I have the same issue. Sometimes it just does not work.

Configuration: DSS VoIP Notifier Current version: 4.0.0 caller_id_uri: sip:homeassistant@fritz.box:5060 realm: "*" username: homeassistant password: XXXXXX

Both HA and the Fritzbox are in the same LAN connected by switch (no Wifi).

Home Assistant 2022.11.4 Supervisor 2022.11.2 Operating System 9.3 Frontend 20221108.0 - latest

Log of a successful and two unsuccessful ones: Starting SIP Client and calling 'sip:**777@fritz.box:5060'... This call will be terminated after '10' seconds. 20:04:47.454 os_core_unix.c !pjlib 2.11.1 for POSIX initialized 20:04:47.458 sip_endpoint.c .Creating endpoint instance... 20:04:47.458 pjlib .select() I/O Queue created (0x7f973a3100) 20:04:47.458 sip_endpoint.c .Module "mod-msg-print" registered 20:04:47.458 sip_transport.c .Transport manager created. 20:04:47.458 pjsua_core.c .PJSUA state changed: NULL --> CREATED 20:04:47.484 pjsua_core.c .pjsua version 2.11.1 for Linux-5.15.61/aarch64 initialized 20:04:47.493 pjsua_app.c .Turning sound device -99 -99 ON 20:04:47.493 main.c Ready: Success 20:04:47.497 pjsua_app.c .......Call 0 state changed to CALLING

Account list: [ 0] : does not register Online status: Online [ 1] <sip:192.168.0.100:5060;transport=TCP>: does not register Online status: Online *[ 2] sip:homeassistant@fritz.box:5060: does not register Online status: Online Buddy list: [ 1] <?> sip:**777@fritz.box:5060 +=============================================================================+ Call Commands: Buddy, IM & Presence: Account:
m Make new call +b Add new buddy . +a Add new accnt
M Make multiple calls -b Delete buddy -a Delete accnt.
a Answer call i Send IM !a Modify accnt.
h Hangup call (ha=all) s Subscribe presence rr (Re-)register
H Hold call u Unsubscribe presence ru Unregister
v re-inVite (release hold) t ToGgle Online status > Cycle next ac.
U send UPDATE T Set online status < Cycle prev ac.
],[ Select next/prev call +--------------------------+-------------------+
x Xfer call Media Commands: Status & Config:
X Xfer with Replaces
# Send RFC 2833 DTMF cl List ports d Dump status
* Send DTMF with INFO cc Connect port dd Dump detailed
dq Dump curr. call quality cd Disconnect port dc Dump config
V Adjust audio Volume f Save config
S Send arbitrary REQUEST Cp Codec priorities

+-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 1 active call Current call id=0 to sip:777@fritz.box:5060 [CALLING] 20:04:47.507 pjsua_app.c SIP TCP transport is connected to 192.168.0.254:5060 20:04:47.580 pjsua_app.c .....Call 0 state changed to EARLY (183 Session Progress) 20:04:57.436 pjsua_app_common.c ... [EARLY] To: sip:777@fritz.box;tag=801795B9312078FB Call time: 00h:00m:00s, 1st res in 87 ms, conn in 0ms

0 audio G722 @16kHz, sendrecv, peer=192.168.0.254:7078

SRTP status: Not active Crypto-suite: RX pt=9, last update:00h:00m:00.002s ago total 492pkt 78.7KB (98.4KB +IP hdr) @avg=63.9Kbps/79.8Kbps pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%) (msec) min avg max last dev loss period: 0.000 0.000 0.000 0.000 0.000 jitter : 0.000 0.130 1.375 0.000 0.263 TX pt=9, ptime=20, last update:00h:00m:00.310s ago total 321pkt 51.3KB (64.2KB +IP hdr) @avg=41.6Kbps/52.1Kbps pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%) (msec) min avg max last dev loss period: 0.000 0.000 0.000 0.000 0.000 jitter : 2.875 3.750 4.875 2.875 0.835 RTT msec : 0.823 0.879 0.991 0.991 0.079 20:04:57.436 pjsua_app.c .Call 0 is DISCONNECTED [reason=487 (Request Terminated)] 20:04:58.437 pjsua_app.c ..Turning sound device -99 -99 OFF 20:04:59.446 timer.c .Dumping timer heap: 20:04:59.446 timer.c . Cur size: 0 entries, max: 3070 [Info] Call ended... [Info] Listening for messages via stdin service call... [Info] Received messages {"call_sip_uri":"sip:777@fritz.box:5060","message_tts":"Ring Ring","call_duration":"10"} CALL_DURATION = '10' Converting audio file Audio succesfully converted... Starting SIP Client and calling 'sip:777@fritz.box:5060'... This call will be terminated after '10' seconds. 20:33:59.160 os_core_unix.c !pjlib 2.11.1 for POSIX initialized ./run: line 337: echo: write error: Broken pipe ./run: line 337: echo: write error: Broken pipe ./run: line 337: 1284 Exit 1 ( sleep $MAX_CALL_TIME_VALUE; echo h; sleep 0.5; echo q ) 1285 Segmentation fault (core dumped) | ( pjsua --app-log-level=3 --config-file '/share/dss_voip/dss_pjsua.conf' $CALL_SIP_URI_VALUE 2> /share/dss_voip/dss_pjsua.log ) [Error] pjsua Exit code: 139 [Info] Call ended... [Info] Listening for messages via stdin service call... [Info] Received messages {"call_sip_uri":"sip:777@fritz.box:5060","message_tts":"Ring Ring","call_duration":"10"} CALL_DURATION = '10' Converting audio file Audio succesfully converted... Starting SIP Client and calling 'sip:777@fritz.box:5060'... This call will be terminated after '10' seconds. 20:34:35.558 os_core_unix.c !pjlib 2.11.1 for POSIX initialized ./run: line 337: echo: write error: Broken pipe ./run: line 337: echo: write error: Broken pipe ./run: line 337: 1324 Exit 1 ( sleep $MAX_CALL_TIME_VALUE; echo h; sleep 0.5; echo q ) 1325 Segmentation fault (core dumped) | ( pjsua --app-log-level=3 --config-file '/share/dss_voip/dss_pjsua.conf' $CALL_SIP_URI_VALUE 2> /share/dss_voip/dss_pjsua.log ) [Error] pjsua Exit code: 139 [Info] Call ended...

sdesalve commented 1 year ago

Only some times? Maybe between 2 close calls?

have you tried to restart whole host machine?

try to add

--no-tcp --ip-addr=192.168.178.[write Here IP of HASSIO]

to pjsua_custom_options

fiolux commented 1 year ago

Hi Salvatore, thanks for your quick answeer.

This happens once in a while. I was never able to reproduce it willingly.

I added the "--no-tcp" to the pjsua_custom_options and will monitor the issue. The IP address was already there, I just forgot to post it.

sdesalve commented 1 year ago

It was pjsua executable that crash

Try these suggested solutions in this URL https://pjsip.pjsip.narkive.com/QDV0hnwf/segmentation-fault

Run without echo canceller --ec-tail=0

Refer to pjsua man page to find correct options that need to be added to your pjsua_custom_options