have you tried to change local network DNS? It’s HassOS that fail to reach Alpinelinux repositories
Nice feature to have in a pbx/home automation system!
Unfortunately PjSua can’t recognize and manage dial tone…
But I think can be developed with PjSIP libs and AppDaemon app… But is not in my plans for next future…
Thanks for your appreciation
It would be doing something different to integrate than using this add-on. The PBX dial plan would connect directly to HA via scripts. (That’s how i remember doing it the last time a few years ago last time i ran my own Pbx and was using Indigo home auto setup).
Something like: dial 731 to turn a group of lights on, 732 to turn them off etc, sends appropriate triggers to HA
If anyone uses a Fritzbox, here is a link to an in-depth description on how to setup the add-on and the Fritzbox, see https://github.com/swa72/home-assistant#dss-voip-notifier Best, Stefan.
I would be interested in the other side: use PjSua to call a number and send DTFM tones. I reckon that “DSS VoIP Notifier” currently lacks the parameters to pass thru, right?
You need this?
You can also play an MP3 with DTFM tones but you audio file will start before attendee pickup call…
What about having another option, other than ´message_tts
and audio_file_url
, say play_dtfm
and pass the string to PjSua’s #
or *
commands?
Of course, recoding an mp3 and playing that would be an alternative.
https://www.pjsip.org/pjsua.htm#cmdline see Media Options section and use it with option-pjsua_custom_options-optional
Thanks, maybe I don’t fully understand: I cannot run one service call in HA without option-pjsua_custom_options-optional
and another one with option-pjsua_custom_options-optional
, right? Or is there any way to pass custom options to i.e.
input: {"call_sip_uri":"sip:[email protected]","message_tts":"Write here your message"}
You’re right. You can’t run with different option-pjsua_custom_options at each run.
You need to try with MP3 files. Is there any online service that you can use to generate on the fly DTFM sounds? I’ve found https://www.audiocheck.net/audiocheck_dtmf.php but doensn’t accept GET method to pass text tones to be generated
If you’ll find a such free service you can use it with audio_file_url
Ok, I’ve used https://www.audiocheck.net/audiocheck_dtmf.php to create an audio file in WAV format and https://online-audio-converter.com to convert it to mp3. I’ve put the file to my \config\www
folder and called the service with
input: {"call_sip_uri":"sip:**[email protected]","audio_file_url":"https://xxxx.duckdns.org/local/open_door_short.mp3"}
Worked nicely except … how do I hang up ?
Never mind, here we go
input: {"call_sip_uri":"sip:**[email protected]","audio_file_url":"https://xxx.duckdns.org/local/open_door_short.mp3", "call_duration":"6"}
is not necessary to convert… My addon (the sox executable to be honest) will convert any audio file to correct wav file needed to be used with pjSua
PS: to open an electric locked door you can always use a ESPHome + Wemos D1 + Relay and avoid to rely on your SIP doorbell
Yeah, I know. But I have the SIP stuff in place and lost the key to the compartment Plus, it just works: someone rings the doorbell -> phones ring -> two way audio to the door -> trigger the door buzzer. But now I can remotely open the door (or via siri, alexa and what have you).
Ok, discovered a drawback. If the receiver picks up the phone too late, he may only hear the final part of the text (or nothing at all ) Any workaround other then writing some loooooong prefix to the text?
with tts I increase call_duration… My addon will play in loop the message… for your scenario I don’t know what appens to your sip doorbell that ear a partial DTFM code before a full DTFM code
Well in that case my use-case wasn’t DTFM, just playing a message. I haven’t had the idea to simply increase call duration and thus have the message repeated. You’re a genius
DNS is working but the requested version from the installer is not available: