Love this addon
@sdesalve any chance you can add an option to pass our own .mp3 URL through to the call? instead of TTS ?
I would love to send pre recorded messages and some other things
Sure, you want to play only local files or alsmo a remote mp3?
You should be aware that any mp3 will be converted do a mono channel wav file for playback
PS: is there a documented option: sox_custom_options
You can try to mix an empty TTS file (“message_tts”: " ") with sox command line parameters…
Probably remote MP3 is best, then I could store local files in the internal web server and use that, or use external files!
I’ll give it a go but no idea how to try this…
How does it know when to end the call?
It doesn’t know when call ends… To avoid any line lock, call end after 20 seconds from pjsua command is executed.
You can make other calls by adding many of this to the sequence
- service: hassio.addon_stdin
data_template:
addon: 89275b70_dss_voip
input: {"call_sip_uri":"sip:xxxxxxx","message_tts":"Test message"}
could you make it a bit longer? I think many VOIP service charge by theminute, so 20 seconds or 59 is the same cost … maybe put the standard at 40?
Longer would be good, or even better make it a config option!!
I’m working on it …
Version 3.0.0 is out!
Added this in advanced config option:
Option max_call_time
(Optional)
Set maximum call duration in seconds. Accept value between 10 and 120 seconds. Default value if this option is not specified is 50 seconds.
The timer starts working after a call is initiated and is not related to the call status.
And added this option in add-in invocation:
Option audio_file_url
(Required if message_tts
is not specified)
Write here a valid URL of a MP3 file that will be played to the attendee. If nor message_tts
neither audio_file_url
are specified an error will raise.
Now you can change maximum call duration to fit your needs. Please be aware that maximum call duration timer start from the time you place the call, not when it’s connected.
Also now you can pass an URL of an mp3 file to be played to the attendees when they answer to call.
Thanks to @CountParadox and to @Klagio for their suggestions.
fam its perfect
{
"addon": "89275b70_dss_voip",
"input": {
"call_sip_uri": "sip:[email protected]",
"audio_file_url": "https://archive.org/download/testmp3testfile/mpthreetest.mp3","max_call_time":"120"
}
}
But the call ended after less than 120 seconds hmm
Max call time must be declared in add-on configuration… Like this way:
{
"sip_parameters": {
"caller_id_uri": "sip:[email protected]",
"realm": "*",
"username": "AuthenticationID",
"password": "AuthenticationPassword"
},
"max_call_time":"120"
}
Really do you think that will be useful the feature to choose max_call_duration for each call?
PS: in your video call end after around 50 seconds… The default value like stated in hassio-addons/dss_voip at master · sdesalve/hassio-addons · GitHub
I’m glad that my work likes to you!
oooh ! I see!
Yes, I think per call would be important.
Then if I am sending a shorter recording, I can end it sooner, or a longer one can end it later.
P.S. Will it just end when hung up on ?
Ok… I’ll add it in nexts future release !
ok
It should be… but it depends on pjsua executable works mode…
ahahhaah
Thanks !!
Same error with Infostrada SIP account!
Founded correct parameters for Dellmont/Betamax providers.
Without mandatory “pjsua_custom_options”: “–no-tcp” you’ll get an 408 error:
pjsua_app.c …Call 0 is DISCONNECTED [reason=408 (Request Timeout)]
FreeVoipDeal/Any other Dellmont/Betamax provider
{
"sip_parameters": {
"caller_id_uri": "sip:[email protected]",
"realm": "*",
"username": "username",
"password": "password"
},
"pjsua_custom_options": "--no-tcp"
}
Note: call_sip_uri in Hass.io service call must end with @sip.freevoipdeal.com. An example of URL: “sip:[email protected]”.
Option username_or_phonenumber can be your FreeVoipDeal username or any of authorized numbers.
Please note that “pjsua_custom_options”: “–no-tcp” is mandatory.
For a list of all Dellmont/Betamax provider and for get price comparison, please visit Voip-comparison.com
Work perfect!
Nice job.
Many thanks!
I send you … a coffee!!!
It works great, thanks! Took me a while to figure out the no-tcp option with Betamax, but I should have read your documentation better!