# Voice call using AT commands

**URL:** <https://forum.legato.io/t/voice-call-using-at-commands/4082>\
**Category:** Uncategorized\
**Created:** [February 5, 2019, 10:21am UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082 "2019-02-05T10:21:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sahithi](https://forum.legato.io/u/Sahithi)\
**Post date:** [February 5, 2019, 10:21am UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/1 "2019-02-05T10:21:21Z")

</div>

Hi,  
I am using mangoh red 7502 module.And I am trying to write Voice Call program using AT commands . Program is running but unable to make a call .I tried using/without using bindings in .adef but unable to solve the problem.I am attaching the screenshot of my program and result as well.Should any changes be made in this program.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/c459ca6d97db34eb5a229f2118cd63d316344eca.png)

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [February 5, 2019, 2:11pm UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/2 "2019-02-05T14:11:05Z")

</div>

Hi @Sahithi,

this is quite strange to use AT commands from a Legato app.  
Although it’s possible, the Legato Service APIs are there to make things easier and more reliable: [Platform Services - Legato Docs](https://docs.legato.io/latest/legatoServices.html)

In your case you might want to look at [Voice Call Service - Legato Docs](https://docs.legato.io/latest/c_le_voicecall.html#c_le_voicecall_outgoing)

---

<div class="post-metadata">

**Author:** ![Sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sahithi](https://forum.legato.io/u/Sahithi)\
**Post date:** [February 6, 2019, 4:25am UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/3 "2019-02-06T04:25:01Z")

</div>

We are using Legato 16 version .I already tried to use Legato Service APIs but we are unable to include these files-  
#include “mdc\_interface.h”  
#include “le\_audio\_interface.h”  
#include “le\_voicecall\_interface.h”. We included bindings as well.  
That’s why i am trying to use AT commands in the system function.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/66cd0c765959041f2ab3af3b0a1e61006d8b11e6.png)

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.legato.io/u/davidc)\
**Post date:** [February 6, 2019, 9:59am UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/4 "2019-02-06T09:59:02Z")

</div>

Hiya,

I can confirm that voice calls work (DTMF in, playback .wav files back) on a WP85 using legato 16 … I’ve done it a few times.

But … I suspect that you haven’t got your development environment set up correctly. You **don’t** need to include the individual header files - all you need to include at the top of any legato file are:

```auto
#include "legato.h"
#include "interfaces.h"

```

`interfaces.h` is built by the legato build system and contains the appropriate header files for any of the defined bindings.

ciao, Dave

---

<div class="post-metadata">

**Author:** ![Sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@Sahithi](https://forum.legato.io/u/Sahithi)\
**Post date:** [February 6, 2019, 12:49pm UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/5 "2019-02-06T12:49:51Z")

</div>

1.I have installed Legato16.10.4 on my host(Windows10).I have installed Legato application Developer studio version-5.3.1.I heve mangoh red board with me it has WP7502 chip on it . i am able to run some programs like serial read/write,sms etc.When i tried to run the voicecall program with below header files, but it is showing error.  
#include “mdc\_interface.h”  
#include “le\_audio\_interface.h”  
#include “le\_voicecall\_interface.h”.  
If the header files are removed the APIs are not working .So please kindly guide me with my problem.  
2.I am also unable to run NTP APIs as well.I tried NTP through UDP , it is not showing any error but it is not giving any reply. I used the URL “[1.ro.pool.ntp.org](http://1.ro.pool.ntp.org)” and port no:123.

> ntp date -p [1.ro.pool.ntp.org](http://1.ro.pool.ntp.org)  
> The above command is also not working .  
> Please help me with this as well.

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [February 11, 2019, 2:47pm UTC](https://forum.legato.io/t/voice-call-using-at-commands/4082/6 "2019-02-11T14:47:35Z")

</div>

On 16.10, I’m not sure that the `interfaces.h` is available.

One thing though is that you should be including `le_mdc_interface.h`, and not `mdc_interface.h`.  
I very very highly recommend solving your building issue instead of going the AT command route.

PS: Also it would be best to switch a more recent version of Legato.  
Release 16 is available for your module: [https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-release-16/](https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-release-16/)  
It has Legato 18.06.1 .
