Unfortunately I’m not able to developing a Docker version. And afterwards it will not simple to invoke and make data check as it is with Hassio add-on.
But you can install and launch pjsua within a bash script and place a call using as inspiration the “run” file from add-on’s GitHub
I was able to install the integration and register Home Assistant to a SIP account. But I am having some issues setting up an automation. What is the easiest way to make a testcall? Any help is appreciated.
Hey guys! I need some help to get this working.
I run Hassio on a Synology Nas from the Community Package.
I have a Agfeo Phonesystem.
I configured everything in the System.
When i use the Windows App PhoneLiter i can call my Mobile Phone.
When i call the my Number it says: DSS Notifier is running.
But i cant make a phone call from Home Assistant.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[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...
-----------------------------------------------------------
Add-on: DSS VoIP Notifier
VoIP Notifier for Home Assistant
-----------------------------------------------------------
Add-on version: 3.4.2
You are running the latest version of this add-on.
System: null (amd64 / qemux86-64)
Home Assistant Core: 0.117.5
Home Assistant Supervisor: 2020.11.dev0603
-----------------------------------------------------------
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...
PJSUA_CUSTOM_OPTIONS = '--no-tcp --ip-addr=192.168.1.9'
[Info] Registering as SIP Client...
PJSUA_CUSTOM_OPTIONS = '--no-tcp --ip-addr=192.168.1.9'
-----------------------------------------------------------
SIP Client registered.
Call <sip:[email protected]>/VoIP phone number
to check system status.
You'll find logs in /share/dss_voip/dss_autoanswer.log
-----------------------------------------------------------
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri": "sip:[email protected]:5060", "message_tts": "Write here your message"}
Converting audio file 'http://192.168.1.9:8123/api/tts_proxy/3bb4cd06a7898fc0a33665f241cb48f2f2a192ac_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]:5060'...
This call will be terminated after '50' seconds.
15:57:37.820 os_core_unix.c !pjlib 2.9 for POSIX initialized
15:57:37.820 sip_endpoint.c .Creating endpoint instance...
15:57:37.820 pjlib .select() I/O Queue created (0x55d48aaa3c90)
15:57:37.820 sip_endpoint.c .Module "mod-msg-print" registered
15:57:37.820 sip_transport.c .Transport manager created.
15:57:37.820 pjsua_core.c .PJSUA state changed: NULL --> CREATED
15:57:37.829 pjsua_core.c .pjsua version 2.9 for Linux-4.4.59/x86_64 initialized
15:57:37.830 pjsua_app.c .Turning sound device -99 -99 ON
15:57:37.830 main.c Ready: Success
15:57:37.830 pjsua_app.c .......Call 0 state changed to CALLING
>>>>
Account list:
[ 0] <sip:192.168.1.9:5060>: does not register
Online status: Online
*[ 1] sip:[email protected]: does not register
Online status: Online
Buddy list:
[ 1] <?> sip:[email protected]: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:[email protected]:5060 [CALLING]
>>> 15:57:37.918 tsx0x55d48aaf8468 .......Temporary failure in sending Request msg INVITE/cseq=7543 (tdta0x55d48aaef768), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
15:57:38.135 pjsua_app.c .....Call 0 is DISCONNECTED [reason=480 (Temporarily Unavailable)]
15:57:38.135 pjsua_app_common.c .....
[DISCONNCTD] To: sip:[email protected]
Call time: 00h:00m:00s, 1st res in 305 ms, conn in 0ms
15:57:38.830 pjsua_app.c .Turning sound device -99 -99 OFF
No current call
[Info] Call ended...
[Info] Listening for messages via stdin service call...
Hi Hijnx.
I’m completely new in dockers and I don’t understand the procedure you suggest. Is there any doc or example you can share with me to try it and make this fantastic add-on working in hassbian?.
Thanks in advance.
Regards.
Also @hijinx I don’t think installing a docker to run pjsua will work out of the box.
In using this addon you trigger sending a voip measage by running the service hassio.addon_stdin
I can’t see that service being available without an addon infrastructure.
Sure, adding pjsua to your system via docker or via simply installing it as you normally would in your distro will enable you to send sip messages, but not using this method.
i want to play my already recorded file, without the need of a working tts (as a better available ex. for alarm system).
It works fine if the files are put in the CONFIG → WWW folder. Also in a subfolder if you want. The path for the plugin will be something like:
Hi @sdesalve or Ciao (?)
I know addons are just a wrapper / masked dockers
Do you think it is possible to use your scripts in HA Core?
I saw the scripts and they seem to be autocontained bash scripts.
The addon is really a great piece of work and addresses a bling spot in my HA set up. Thank you @sdesalve
I noticed that pjsua does not wait with playback until the call is connected but seems to start it immediately when executing the call? So the moment I pick up the phone it is usually already somewhere in the middle. Is that normal and are there any addition parameters one can set to hold it back until the connection was successfully established?
Also, I wonder whether the outcome (call answered / not answered) is fed back allowing one to build e.g. a trigger to call an alternative number in an non-answered case?