sdesalve / hassio-addons

MIT License
85 stars 21 forks source link

Audio/TTS begins before the call is answered #74

Closed benblb closed 1 year ago

benblb commented 1 year ago

Hello, this is a great add-on and I got it working quickly. I'm having an issue where my audio file/TTS begins before I answer the call leading to me missing information. Do you have thoughts on how to fix this? I'm doing a simple local call via Aterisk (i.e. all within my network).

You have 1 active call
Current call id=0 to sip:500@10.0.1.46 [CALLING]
>>> 15:40:04.697            pjsua_app.c  SIP TCP transport is connected to 10.0.1.46:5060
15:40:04.871            pjsua_app.c  .....Call 0 state changed to EARLY (183 Session Progress)
15:40:04.879     pjsua_app_common.c  .......
  [EARLY] To: sip:500@10.0.1.46;tag=dc7729dd-9630-4e3b-9d20-44deeeca279b
    Call time: 00h:00m:00s, 1st res in 184 ms, conn in 0ms
    #0 audio PCMU @8kHz, sendrecv, peer=-
       SRTP status: Not active Crypto-suite: 
       RX pt=0, last update:00h:00m:00.000s ago
          total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
          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.000   0.000   0.000   0.000
       TX pt=0, ptime=20, last update:never
          total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
          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     :   0.000   0.000   0.000   0.000   0.000
       RTT msec      :   0.000   0.000   0.000   0.000   0.000
15:40:13.000            pjsua_app.c  .....Call 0 state changed to CONNECTING
15:40:13.001            pjsua_app.c  .....Call 0 state changed to CONFIRMED
15:40:13.013     pjsua_app_common.c  ........
  [CONFIRMED] To: sip:500@10.0.1.46;tag=dc7729dd-9630-4e3b-9d20-44deeeca279b
    Call time: 00h:00m:00s, 1st res in 184 ms, conn in 8314ms
    #0 audio PCMU @8kHz, sendrecv, peer=172.30.32.1:16200
       SRTP status: Not active Crypto-suite: 
       RX pt=0, last update:00h:00m:00.001s ago
          total 1pkt 160B (200B +IP hdr) @avg=157bps/196bps
          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.001   0.000   0.000   0.000   0.000
       TX pt=0, ptime=20, last update:00h:00m:03.126s ago
          total 407pkt 65.1KB (81.4KB +IP hdr) @avg=64.0Kbps/80.0Kbps
          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     :   0.625   0.625   0.625   0.625   0.000
       RTT msec      :   1.358   1.358   1.358   1.358   0.000
15:40:16.462     pjsua_app_common.c  ........
  [CONFIRMED] To: sip:500@10.0.1.46;tag=dc7729dd-9630-4e3b-9d20-44deeeca279b
    Call time: 00h:00m:03s, 1st res in 184 ms, conn in 8314ms
    #0 audio PCMU @8kHz, sendrecv, peer=-
       SRTP status: Not active Crypto-suite: 
       RX pt=0, last update:00h:00m:00.000s ago
          total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
          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.000   0.000   0.000   0.000
       TX pt=0, ptime=20, last update:never
          total 172pkt 27.5KB (34.4KB +IP hdr) @avg=63.8Kbps/79.7Kbps
          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     :   0.000   0.000   0.000   0.000   0.000
       RTT msec      :   0.000   0.000   0.000   0.000   0.000
15:40:16.468     pjsua_app_common.c  ........
  [DISCONNCTD] To: sip:500@10.0.1.46;tag=dc7729dd-9630-4e3b-9d20-44deeeca279b
    Call time: 00h:00m:03s, 1st res in 184 ms, conn in 8314ms
    #0 audio PCMU @8kHz, sendrecv, peer=-
       SRTP status: Not active Crypto-suite: 
       RX pt=0, last update:00h:00m:00.001s ago
          total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
          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.000   0.000   0.000   0.000
       TX pt=0, ptime=20, last update:never
          total 1pkt 160B (200B +IP hdr) @avg=213.3Kbps/266.6Kbps
          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     :   0.000   0.000   0.000   0.000   0.000
       RTT msec      :   0.000   0.000   0.000   0.000   0.000
15:40:16.468            pjsua_app.c  ......Call 0 is DISCONNECTED [reason=200 (Normal call clearing)]
15:40:17.467            pjsua_app.c  .Turning sound device -99 -99 OFF
No current call
>>> 15:41:36.534                timer.c  .Dumping timer heap:
15:41:36.534                timer.c  .  Cur size: 0 entries, max: 3070
sdesalve commented 1 year ago

It's how pjSua will work... Make short audio and it will be repeated I'm loop