Bug 84981 - Voice support
Summary: Voice support
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 10:39 UTC by Aleksander Morgado
Modified: 2015-12-02 19:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aleksander Morgado 2014-10-14 10:39:30 UTC
Originally reported at:
  https://bugzilla.gnome.org/show_bug.cgi?id=671598
Please refer to the original bug report if more details are needed.

ModemManager could expose a new "Voice" interface which would allow to make/receive phone calls.

Some modems (like the ZTE MF112) expose a sound device via a TTY. If an incoming call is accepted via the AT channel (with ATA after receiving a RING), or if an outgoing call is made (ATD#number), there would a possibility to directly use the sound device like:
  pacat --channels=1 --format=ulaw --rate=8000 < /dev/ttyUSB2
  parec --channels=1 --format=ulaw --rate=8000 > /dev/ttyUSB2
  also posible with 'aplay' and 'arecord'

Other modems (e.g. in actual mobile phones) may not even need any handling of the audio device; instead just dialing or accepting the call would enable the audio device.

A new generic ModemManager "Voice" interface can be developed, exposing:
 * Voice capabilities: e.g. whether an audio device is needed or not, or whether dial-in or dial-out or both are supported.
 * Audio format: khz, 8-bit/16-bit/24-bit etc, encoding (PCM, raw, etc).
 * Audio device: Linux device file, if any, otherwise maybe MM has to create a device node and proxy the traffic, in which case the device node would be here.
 * Call start time in seconds since the epoch.
 * Called number.

Would also be good to check other telephony APIs, like Android/Ofono.

For devices requiring the use of an audio device, a new ModemManager-provided gstreamer plugin may also be needed.
Comment 1 Aleksander Morgado 2014-10-14 10:45:39 UTC
I've spent some time trying to play with Voice support in the QMI devices as well, but none of my modems support Voice 2.0 service. Only my Qualcomm e396 seems to properly report Voice; but 1.0, for which we don't have details :/
Comment 2 Riccardo Vangelisti 2015-04-20 09:19:24 UTC
(In reply to Aleksander Morgado from comment #0)
> Originally reported at:
> [...]
> A new generic ModemManager "Voice" interface can be developed, exposing:
>  * Voice capabilities: e.g. whether an audio device is needed or not, or
> whether dial-in or dial-out or both are supported.
>  * Audio format: khz, 8-bit/16-bit/24-bit etc, encoding (PCM, raw, etc).
>  * Audio device: Linux device file, if any, otherwise maybe MM has to create
> a device node and proxy the traffic, in which case the device node would be
> here.
>  * Call start time in seconds since the epoch.
>  * Called number.
> 
> Would also be good to check other telephony APIs, like Android/Ofono.
> 
> [...]

Hi Aleksander,
I have an Huawei MU709S-2 HSDPA modem with voice call support on PCM audio device.
This modem can handle voice and data call using standard AT commands via USB serial port.
I'd like to integrate voice capabilities into ModemManager core.

Here's a proposal of API implementation:

Endpoint:
    org.freedesktop.ModemManager1.Call

Initialization AT strings:
    AT+CRC=1    <- retrieve information about voice or data call
    AT+CLIP=1   <- enable remote number identification

Methods:
    - Start (start new call - ATD XXXXXX; )
    - Answer (answer an incoming call - ATA )
    - Stop (stop active call - ATH )

Signals:
    - Incoming (incoming call - +CRING: VOICE )
    - Accepted (voice call accepted by remote - OK )
    - Terminated (voice call terminated by remote - NO CARRIER )
    - Refused ( voice call refused by or busy remote - BUSY )
    - Error ( generic error - NO DIALTONE )

Properties:
    - State (Incoming, Accepted, Terminated, Refused, Error, Inactive)
    - CallerID (the remote number)
    - AudioMethod ( maybe /dev/ttyUSB2 or "analog" if no voip is supported )

Do you have any suggestions about my proposal ? What's the right way to integrate this interface into MM core ?

I was wondering if you would give me some advice.
Thanks !
Comment 3 Aleksander Morgado 2015-04-20 09:25:38 UTC
> Do you have any suggestions about my proposal ? What's the right way to
> integrate this interface into MM core ?
> 
> I was wondering if you would give me some advice.
> Thanks !

The way to go would be to write a new interface file, e.g. "org.freedesktop.ModemManager1.Modem.Voice.xml" under the "introspection/" directory in the sources. If you do that with your suggested API, then just send a git patch to the ModemManager mailing list so that we can discuss the API there.
Comment 4 Riccardo Vangelisti 2015-04-20 13:24:27 UTC
(In reply to Aleksander Morgado from comment #3)
> The way to go would be to write a new interface file, e.g.
> "org.freedesktop.ModemManager1.Modem.Voice.xml" under the "introspection/"
> directory in the sources. If you do that with your suggested API, then just
> send a git patch to the ModemManager mailing list so that we can discuss the
> API there.

As you request I sent a patch to mailinglist with a simple review of signals.
 ( http://lists.freedesktop.org/archives/modemmanager-devel/2015-April/001879.html )
Comment 5 Aleksander Morgado 2015-12-02 19:40:18 UTC
Flagging as fixed, we merged the Voice API some time ago already.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.