# Voip Service API For Legato .... \[Linphone\]

**URL:** <https://forum.legato.io/t/voip-service-api-for-legato-linphone/240>\
**Category:** Legato Application Framework\
**Created:** [July 11, 2016, 7:05am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240 "2016-07-11T07:05:08Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [July 11, 2016, 7:05am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/1 "2016-07-11T07:05:08Z")

</div>

Greetings folks i have built a working voip stack based on linphone for legato+mangoh … using belle-sip mediastreamer2 and linphone … the idea would be to implement this as a service API not a standalone program …

i have added a legato shell audiofilter [driver] to mediastreamer to use the le\_audio bits it fires up 2 threads one for read one fro write and using recorder/player diverts the audio to/from speaker/mic [possibly other streams] …

when done the console phone will be ported to a service api le\_voip… if there is any interest or feed back it will be welcomed.

Greg

---

<div class="post-metadata">

**Author:** ![achuang](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/achuang/32/132_2.png) [@achuang](https://forum.legato.io/u/achuang)\
**Post date:** [September 20, 2016, 12:47am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/2 "2016-09-20T00:47:42Z")

</div>

Hi Greg, I apologize for not getting back to you earlier. We definitely would like to hear about your voip service. Is the intention to eventually contribute back to the Legato community? Are you planning to commercialize this product?

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [September 26, 2016, 6:16am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/3 "2016-09-26T06:16:50Z")

</div>

This is a pure opensource project … the end product is a commercial product that will have a legato abstraction layer. the problem i am having at the moment is that its not possible to read and write from the PCM simultaneously a playback/record is required for VOIP to work … the cli can make / receive calls but cannot process audio due to this limitation.

Greg

---

<div class="post-metadata">

**Author:** ![tpensel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/tpensel/32/94_2.png) [@tpensel](https://forum.legato.io/u/tpensel)\
**Post date:** [September 27, 2016, 7:55am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/4 "2016-09-27T07:55:40Z")

</div>

Hi Greg,  
Why do you say you’re not able to read and write from the PCM simultaneously? It should be possible.

Tristan

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [September 27, 2016, 8:46am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/5 "2016-09-27T08:46:15Z")

</div>

Agree it should be possible 😃

i am using the WP8 …

> **[Audio - Legato Docs](http://docs.legato.io/latest/platformConstraintsAudio.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

"Other audio features and constraints:

DTMF decoding works only on MdmVoice Rx stream. DTMF’s reception handler must be installed before call initiation.  
File Playback/Recording: WAVE, AMR Narrowband and AMR Wideband formats are supported.  
Samples insertion/extraction: PCM samples using configuration of channel number, sampling rate and sampling resolution.  
Several file playbacks can be activated simultaneously but not several file recordings. Playback and recording can’t be performed simultaneously. This also applies to samples insertion/extraction."

---

<div class="post-metadata">

**Author:** ![tpensel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/tpensel/32/94_2.png) [@tpensel](https://forum.legato.io/u/tpensel)\
**Post date:** [September 28, 2016, 9:48am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/6 "2016-09-28T09:48:51Z")

</div>

Hi Greg,  
I’m afraid our documentation is quite outdated. 😕  
Actually, it should be possible on WP85 if you start the playback before the recording.  
Please let me know.  
Kr,  
Tristan

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [March 14, 2017, 6:46pm UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/7 "2017-03-14T18:46:23Z")

</div>

This will be a priority once the first WP board goes to market… In a few weeks

---

<div class="post-metadata">

**Author:** ![achuang](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/achuang/32/132_2.png) [@achuang](https://forum.legato.io/u/achuang)\
**Post date:** [June 14, 2017, 9:15am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/8 "2017-06-14T09:15:04Z")

</div>

Hi Greg,

It was nice meeting you F2F today. Please give Tristan’s explanation a try and let us know how it goes.

Thanks,  
Alan

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [June 29, 2017, 9:37pm UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/9 "2017-06-29T21:37:28Z")

</div>

Been non stop since i got back will do great meeting you and the team

---

<div class="post-metadata">

**Author:** ![selberg](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/selberg/32/271_2.png) [@selberg](https://forum.legato.io/u/selberg)\
**Post date:** [November 16, 2017, 3:38pm UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/10 "2017-11-16T15:38:51Z")

</div>

Have you released this as open source yet? I’m very interested in this project.

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [November 23, 2017, 11:02am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/11 "2017-11-23T11:02:51Z")

</div>

I have got a build of it into the rootfs have not tested it much the problem has been audio support does not fully function i am now planing on running it via a USB sound card i am back on this project now.

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [November 23, 2017, 12:12pm UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/12 "2017-11-23T12:12:28Z")

</div>

Blockquote  
root@swi-mdm9x15:~# /lib/ld-linux.so.3 --list /usr/bin/linphonec  
liblinphone.so.9 =\> /usr/lib/liblinphone.so.9 (0xb6ed3000)  
libbctoolbox.so.1 =\> /usr/lib/libbctoolbox.so.1 (0x43440000)  
libortp.so.13 =\> /usr/lib/libortp.so.13 (0x432f0000)  
libmediastreamer\_base.so.10 =\> /usr/lib/libmediastreamer\_base.so.10 (0xb6ebb000)  
libc.so.6 =\> /lib/libc.so.6 (0x43108000)  
libbellesip.so.0 =\> /usr/lib/libbellesip.so.0 (0xb6c1d000)  
libmediastreamer\_voip.so.10 =\> /usr/lib/libmediastreamer\_voip.so.10 (0xb6bae000)  
libxml2.so.2 =\> /usr/lib/libxml2.so.2 (0xb6a87000)  
libbelr.so.1 =\> /usr/lib/libbelr.so.1 (0xb6a20000)  
libbzrtp.so.0 =\> /usr/lib/libbzrtp.so.0 (0xb6a08000)  
libz.so.1 =\> /lib/libz.so.1 (0xb69ee000)  
libsqlite3.so.0 =\> /usr/lib/libsqlite3.so.0 (0x43578000)  
libstdc++.so.6 =\> /usr/lib/libstdc++.so.6 (0x43680000)  
libm.so.6 =\> /lib/libm.so.6 (0x43470000)  
libgcc\_s.so.1 =\> /lib/libgcc\_s.so.1 (0x43638000)  
libpthread.so.0 =\> /lib/libpthread.so.0 (0x43240000)  
librt.so.1 =\> /lib/librt.so.1 (0x43560000)  
libdl.so.2 =\> /lib/libdl.so.2 (0x432e0000)  
libpolarssl.so.7 =\> /usr/lib/libpolarssl.so.7 (0x43268000)  
/lib/ld-linux.so.3 (0x430d8000)  
libantlr3c.so.1 =\> /usr/lib/libantlr3c.so.1 (0xb69d0000)  
libsrtp.so.1 =\> /usr/lib/libsrtp.so.1 (0xb69b3000)  
libgsm.so =\> /usr/lib/libgsm.so (0xb69a4000)  
libopus.so.0 =\> /usr/lib/libopus.so.0 (0xb695b000)  
libspeex.so.1 =\> /usr/lib/libspeex.so.1 (0xb693e000)  
libspeexdsp.so.1 =\> /usr/lib/libspeexdsp.so.1 (0xb6924000)  
libasound.so.2 =\> /usr/lib/libasound.so.2 (0xb6860000)  
libavcodec.so.53 =\> /usr/lib/libavcodec.so.53 (0xb5de5000)  
libavutil.so.51 =\> /usr/lib/libavutil.so.51 (0xb5dc0000)  
libswscale.so.2 =\> /usr/lib/libswscale.so.2 (0xb5d97000)  
libtheora.so.0 =\> /usr/lib/libtheora.so.0 (0xb5d4d000)  
libvpx.so.1 =\> /usr/lib/libvpx.so.1 (0xb5bd0000)  
libtheoraenc.so.1 =\> /usr/lib/libtheoraenc.so.1 (0xb5b93000)  
libtheoradec.so.1 =\> /usr/lib/libtheoradec.so.1 (0xb5b79000)  
libogg.so.0 =\> /usr/lib/libogg.so.0 (0xb5b6c000)

```
linphonec> help
Commands are:
---------------------------
      help	Print commands help.
    answer	Answer a call
autoanswer	Show/set auto-answer mode
      call	Call a SIP uri or number
     calls	Show all the current calls with their id and status.
 call-logs	Calls history
    camera	Send camera output for current call.
      chat	Chat with a SIP uri
conference	Create and manage an audio conference.
  duration	Print duration in seconds of the last call.
  firewall	Set firewall policy
    friend	Manage friends
      ipv6	Use IPV6
      mute	Mute microphone and suspend voice transmission.
       nat	Set nat address
     pause	pause a call
      play	play a wav file
playbackga	Adjust playback gain.
     proxy	Manage proxies
    record	record to a wav file
    resume	resume a call
 soundcard	Manage soundcards
      stun	Set stun server address
 terminate	Terminate a call
  transfer	Transfer a call to a specified destination.
    unmute	Unmute microphone and resume voice transmission.
    webcam	Manage webcams
      quit	Exit linphonec
---------------------------
Type 'help <command>' for more details or
     'help advanced' to list additional commands.
linphonec>
…

```

0 New

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [November 24, 2017, 4:21pm UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/13 "2017-11-24T16:21:12Z")

</div>

The build repositories for what we doing is in

[https://bitbucket.org/account/user/combcommunications/projects/CV4](https://bitbucket.org/account/user/combcommunications/projects/CV4)

Clone

[https://bitbucket.org/combcommunications/yocto](https://bitbucket.org/combcommunications/yocto)

all the others are submodules or look at the commit logs the linphone software yocto layer is from linphone.

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [November 25, 2017, 6:45am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/14 "2017-11-25T06:45:18Z")

</div>

For some or other reason it does not like building the kernel i had to use the code from the sierra tarball ill look into it and make it work.

---

<div class="post-metadata">

**Author:** ![jeremynz](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@jeremynz](https://forum.legato.io/u/jeremynz)\
**Post date:** [July 25, 2018, 1:34am UTC](https://forum.legato.io/t/voip-service-api-for-legato-linphone/240/15 "2018-07-25T01:34:09Z")

</div>

Hi,

Those links above don’t seem to work.

Is the source code for the VoIP service available?
