sdesalve / hassio-addons

MIT License
87 stars 21 forks source link

FreePBX configuration issues #5

Closed tiagofreire-pt closed 4 years ago

tiagofreire-pt commented 4 years ago

Hi.

I'm trying to use my FreePBX server on LAN to make the HA calls.

Service: hassio.addon_stdin
addon: 89275b70_dss_voip
input: {"call_sip_uri":"sip:1001@192.168.10.70:5160","message_tts":"test test this is a test 123 321."}

Config:

{
  "sip_parameters": {
    "caller_id_uri": "sip:4_number_extension@192.168.10.70:5160",
    "realm": "*",
    "username": "4_number_extension",
    "password": "theawesomepassword"
  }
}

Log:

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: DSS VoIP Notifier
 VoIP Notifier for HomeAssistant
-----------------------------------------------------------
 Add-on version: 3.1.0
 You are running the latest version of this add-on.
 System: HassOS 3.7  (amd64 / qemux86-64)
 Home Assistant version: 0.103.0
 Supervisor version: 192
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Info] Starting addon...
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri": "sip:1001@192.168.10.70:5160", "message_tts": "test test this is a test 123 321."}
Converting audio file 'https://192.168.10.61:8123/api/tts_proxy/4da8840745fdaef146b764f92762b5605f3205b1_en_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:1001@192.168.10.70:5160'...
16:53:36.963         os_core_unix.c !pjlib 2.8 for POSIX initialized
16:53:36.964         sip_endpoint.c  .Creating endpoint instance...
16:53:36.965                  pjlib  .select() I/O Queue created (0x55df19808a70)
16:53:36.965         sip_endpoint.c  .Module "mod-msg-print" registered
16:53:36.965        sip_transport.c  .Transport manager created.
16:53:36.965           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
16:53:36.990           pjsua_core.c  .pjsua version 2.8 for Linux-4.19.88/x86_64 initialized
16:53:36.995            pjsua_app.c  .Turning sound device -99 -99 ON
16:53:36.996                 main.c  Ready: Success
16:53:36.997            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.7:5060>: does not register
       Online status: Online
  [ 1] <sip:172.30.33.7:5060;transport=TCP>: does not register
       Online status: Online
 *[ 2] sip:1002@192.168.10.70:5160: does not register
       Online status: Online
Buddy list:
 [ 1] <?>  sip:1001@192.168.10.70:5160
+=============================================================================+
|       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:1001@192.168.10.70:5160 [CALLING]
>>> 16:53:37.035            pjsua_app.c  .....Call 0 state changed to CONNECTING
16:53:37.039            pjsua_app.c  .....Call 0 state changed to CONFIRMED
16:53:50.121            pjsua_app.c  ......Call 0 is DISCONNECTED [reason=200 (Normal call clearing)]
16:53:50.121     pjsua_app_common.c  ......
  [DISCONNCTD] To: sip:1001@192.168.10.70;tag=as7a3f5f75

    Call time: 00h:00m:13s, 1st res in 39 ms, conn in 43ms
    #0 audio PCMU @8kHz, sendrecv, peer=192.168.10.70:18026
       SRTP status: Not active Crypto-suite: 
       RX pt=0, last update:00h:00m:03.604s ago
          total 647pkt 103.5KB (129.4KB +IP hdr) @avg=63.4Kbps/79.3Kbps
          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.977   4.125   2.000   0.793
       TX pt=0, ptime=20, last update:00h:00m:03.002s ago
          total 552pkt 88.3KB (110.4KB +IP hdr) @avg=54.1Kbps/67.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.375   0.938   1.500   0.375   0.562
       RTT msec      :   1.388   1.777   2.166   2.166   0.389
16:53:51.122            pjsua_app.c  .Turning sound device -99 -99 OFF
No current call
[Info] Call ended...
[Info] Listening for messages via stdin service call...

There is no call received on 1001 extension.

sdesalve commented 4 years ago

If you open this URL you can ear anything?

https://192.168.10.61:8123/api/tts_proxy/4da8840745fdaef146b764f92762b5605f3205b1_en_-_google_translate.mp3

Have you tried to configure an SSL cert and remote access with DuckDNS?

As I can view call seems to be correctly placed...

You have 1 active call Current call id=0 to sip:1001@192.168.10.70:5160 [CALLING]

16:53:37.035 pjsua_app.c .....Call 0 state changed to CONNECTING 16:53:37.039 pjsua_app.c .....Call 0 state changed to CONFIRMED 16:53:50.121 pjsua_app.c ......Call 0 is DISCONNECTED [reason=200 (Normal call clearing)]

Please try to play this mp3 file to the attendee with audio_file_url option https://github.com/sdesalve/hassio-addons/tree/master/dss_voip#option-audio_file_url-required-if-message_tts-is-not-specified

http://www.aoakley.com/articles/stereo-test.mp3

sdesalve commented 4 years ago

Try also to disable TCP transport like a Betamax

https://github.com/sdesalve/hassio-addons/tree/master/dss_voip#freevoipdealany-other-dellmontbetamax-provider-1