Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of integrating Minimodem with Asterisk for telephony #28

Open
ab012 opened this issue Aug 6, 2017 · 3 comments
Open

Possibility of integrating Minimodem with Asterisk for telephony #28

ab012 opened this issue Aug 6, 2017 · 3 comments

Comments

@ab012
Copy link

ab012 commented Aug 6, 2017

Hello,

Firstly, thanks very much for creating and maintaining the Minimodem project. Minimodem is very useful for emulating a TTY/TDD device (Telecommunications Device for the Deaf and Hard of Hearing) and encoding/decoding Baudot messages.

I am wondering if it is possible to integrate Minimodem with the Asterisk Open-Source PBX? I would like to use it to support TTY/TDD calls with an Asterisk server.

Currently, I was able to accomplish the following: I can pre-generate Baudot sound prompts using Minimodem or Cisco TTY WAV Maker, and play these pre-recorded prompts using the "BackGround" and "PlayBack" commands in the Dialplan ("extensions.conf"). I can take a Baudot voicemail from a caller, then pull the voicemail sound file from Asterisk's voicemail directory, and decode it back to text using Minimodem.

However, what I would really like to do is to be able to generate Baudot messages to callers dynamically and on-the-fly in Asterisk -- for example, a Dialplan command that would let me supply a message string (potentially with variables) and encode it to Baudot for a TTY caller. I would also like to be able to have Asterisk be a real-time "gateway" between Baudot and a textual messaging medium -- for example, with XMPP. In this way, one could communicate with a TTY caller/callee by typing messages into a XMPP client that would be translated to Baudot, and Baudot messages would be translated to text and passed to the XMPP client. This would involve integration between Asterisk, Minimodem, and XMPP server software. It would also be nice to be able to interpret Baudot numbers as "extensions" in Asterisk just like DTMF tones, so that the Dialplan can be seamlessly navigated using either DTMF tones or Baudot tones.

Is this possible with the current implementations of Minimodem and Asterisk? Asterisk and Minimodem both have support for Alsa (the Advanced Linux Sound Architecture) -- although, from what I understand, Minimodem can only use the "default" Alsa device, and Asterisk uses Alsa as a "console channel driver" (with a limit of only one device for the Asterisk installation, and intended for pickup/hangup/etc. commands to be issued via the Asterisk command-line interface). Would Alsa be the best mechanism to accomplish this with the currently-existing support? What would probably be even better is if there were a way to pass the call's RTP stream directly to Minimodem. What is the recommended implementation?

Otherwise, could this capability please be developed? This kind of functionality would probably have great potential for helping to support telephony for the Deaf and Hard-of-Hearing community.

Thank you.

@rechner
Copy link

rechner commented Apr 6, 2018

A possibility worth persuing for this might be to use PJSIP with a PulseAudio or ALSA loopback device to marry the audio streams, and Asterisk's REST interface to tie into control of the dialplan.

@nkeck720
Copy link

nkeck720 commented Apr 6, 2018

I'm not sure how you would plan on doing this, but in software where I use minimodem I open a pipe to it and redirect the messages it produces on stderr to null, like this:

#include <stdio.h>
 ...
 /* can be modified to also provide input, if necessary */
 FILE* modemout = popen("minimodem --tx --tx-carrier 1200", "w");
 /* write out to the line */
 fprintf(modemout, "Testing...\n");

This would likely suffice for applications that don't really care about latency because it requires interprocess communication. As far as I can tell in regards to joining the streams, as long as the two audio streams eventually get out to ALSA (using pulse, osspd, whatever) they mix just fine, but YMMV.

@InterLinked1
Copy link

Hello,

Firstly, thanks very much for creating and maintaining the Minimodem project. Minimodem is very useful for emulating a TTY/TDD device (Telecommunications Device for the Deaf and Hard of Hearing) and encoding/decoding Baudot messages.

I am wondering if it is possible to integrate Minimodem with the Asterisk Open-Source PBX? I would like to use it to support TTY/TDD calls with an Asterisk server.

Currently, I was able to accomplish the following: I can pre-generate Baudot sound prompts using Minimodem or Cisco TTY WAV Maker, and play these pre-recorded prompts using the "BackGround" and "PlayBack" commands in the Dialplan ("extensions.conf"). I can take a Baudot voicemail from a caller, then pull the voicemail sound file from Asterisk's voicemail directory, and decode it back to text using Minimodem.

However, what I would really like to do is to be able to generate Baudot messages to callers dynamically and on-the-fly in Asterisk -- for example, a Dialplan command that would let me supply a message string (potentially with variables) and encode it to Baudot for a TTY caller. I would also like to be able to have Asterisk be a real-time "gateway" between Baudot and a textual messaging medium -- for example, with XMPP. In this way, one could communicate with a TTY caller/callee by typing messages into a XMPP client that would be translated to Baudot, and Baudot messages would be translated to text and passed to the XMPP client. This would involve integration between Asterisk, Minimodem, and XMPP server software. It would also be nice to be able to interpret Baudot numbers as "extensions" in Asterisk just like DTMF tones, so that the Dialplan can be seamlessly navigated using either DTMF tones or Baudot tones.

Is this possible with the current implementations of Minimodem and Asterisk? Asterisk and Minimodem both have support for Alsa (the Advanced Linux Sound Architecture) -- although, from what I understand, Minimodem can only use the "default" Alsa device, and Asterisk uses Alsa as a "console channel driver" (with a limit of only one device for the Asterisk installation, and intended for pickup/hangup/etc. commands to be issued via the Asterisk command-line interface). Would Alsa be the best mechanism to accomplish this with the currently-existing support? What would probably be even better is if there were a way to pass the call's RTP stream directly to Minimodem. What is the recommended implementation?

Otherwise, could this capability please be developed? This kind of functionality would probably have great potential for helping to support telephony for the Deaf and Hard-of-Hearing community.

Thank you.

Asterisk does have TTY support built in, but it's DAHDI only so if you are not using it right with a channel bank it's no good.

FWIW, I have the opposite issue it seems - currently I can generate TTY from Asterisk using a bunch of sound files. I just wrote a subroutine wrapper that plays the proper files. It all works fine in-band: it's only 45.45 baud.

I still need to think about channel-agnostic RX, and minimodem might be a good way to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants