Use Fritz!Box for outbound Calls

Is that still of interesst to someone? I had issues with a libray on raspberry, but I do have a working docker image (subscribe to mqtt, call a number when triggert, hang up after 20 seconds) that I could share after polishing.

I would be interested. Is it possible to call different numbers depending on what happens in MQTT? And would it also be possible to pass a payload that get’s converted to audio and is spoken when the call is picked up?

Hi Daniel,

welcome back :slight_smile:

Basically its a small python script subscribing to mqtt and using pjsua to call a number given as part of the mqtt message. I’m using a sipgate account for that, but fritzbox as you proposed above works fine, too.
For a long time I had trouble as on arm the library crashes (if i recall it then simily didn’t hang up but keept ringing). That’s on true when running on intel, but maybe there is a workaround.

I’ll share a minimized version, probably use some hotel time for that next week.

Yes, pjsua allows to play mp3 / wav files, so you could have an optional filename as part of the mqtt message. I did not test it and don’t know if there are implications (e.g. do you need a sound device in the docker container for that? Does that have additional dependencies?).

Cheers,
Alex

Hi,

pls have a look - I’m interessted in feedback.

Alex

I gave it a try, but was unsucessful. I’m not that good with Docker, so I don’t know how to debug it. I’m using your triggerTestCall script, where I had to add single quotes around the number. Without those $NUMBER was sent to MQTT.
So now the payload does look ok to me, but nothing happens. What I see in the supervisor log is:

Traceback (most recent call last):
  File "/usr/local/bin/mqtt2sip.py", line 13, in <module>
    import pjsua as pj
  File "/usr/local/lib/python2.7/dist-packages/pjsua.py", line 59, in <module>
    import _pjsua
ImportError: libpjsua.so.2: cannot open shared object file: No such file or directory

So I guess there already was a problem while building the container.