Voice Call

The Voice Call Sample App

This sample app demonstrates the usage of the voicecall service along with a few other services and APIs to establish voice communication using an activated SIM card. It also allows for some of the basic functionalities that are expected from such an application, namely the ability to redial, place calls on hold as well as un-hold, hangup and so on. It uses:

  • Voice Call Service service with .adef bindings and related .cdef requires, provides, and sources sections.
  • Audio service with .adef bindings and related .cdef requires, provides, and sources sections.

The voiceCallApp is a sample application designed to demonstrate the functions provided by the c_voicecall. This sample app provides two executables, one for the service and another one for the controller. You can find:

  • An .adef file:
    • voiceCallApp.adef to define the executables, processes, requires, bindings, and externals.
  • An .sdef file:
    • voiceCallApp.sdef to define the commands, and the system structure
  • Two .cdef files:
    • Component.cdef for the service component
    • Component.cdef for the controller
Note
The app is built along with a complete system using the .sdef in order to use the command line tools to control the application.

Go to the sample code.

Install the sample app:

$ cd apps/sample/voiceCallApp
$ mksys -t wp76xx voiceCallApp.sdef
$ app install voiceCallApp.wp76xx.update <ip address>

where ip address is the address of your target device.

If you're not using a Sierra Wireless WP76xx module, replace wp76xx with the appropriate identifier for your target.

Note
The voiceCallApp has only been tested on WP76xx.

Usage

Note
Since the voiceCallApp depends on the voiceCallService, the voiceCallService must be manually started before using the app. To start the voiceCallService, use the following command:
app start voiceCallService

To use the app to initiate a voice call, replace Phone Number with the desired number you wish to call and run the following command:

voice call <Phone Number>

To use the app to answer an incomming call, run the following command:

voice answer

End a call by doing:

voice hangup
Note
For more information on specific commands, read the following section taken from the app's help.
"NAME:\n"
" voice - Used to perform voice call operations.\n"
"\n"
"PREREQUISITES:\n"
" SIM is inserted, registered on the network, and is in ready state. Type cm sim in order to see state.\n"
"\n"
" voiceCallService is running. voiceCallService can be started using app start voiceCallService.\n"
"\n"
"DESCRIPTION:\n"
" voice call <Destination Number>\n"
" Initiates a voice call to <Destination Number>. <Destination Number> is assumed to be valid and\n"
" registered on the network.\n"
"\n"
" voice answer\n"
" Answers an incoming voice call. LE_VOICECALL_EVENT_INCOMING indicates that there is an incoming call.\n"
"\n"
" voice redial\n"
" Initiates a voice call to the last dialed number.\n"
"\n"
" voice hangup\n"
" Ends an active voice call. If there is an incoming call, it rejects the call. If a number is being\n"
" dialed, it ends the outgoing call.\n"
"\n"
" voice hold\n"
" Places an active call on hold and plays music for the other side of the call whilst disconnecting all\n"
" audio input and output from the mic the speaker respectively. By default, an included piano.wav file\n"
" will be played. This can be changed by specifying a new .wav file. Please refer to voice wav <path>.\n"
"\n"
" voice unhold\n"
" Unholds a call which has been placed on hold. This will reconnect all audio input and output back to\n"
" to the mic and the speaker respectively and stop the music.\n"
"\n"
" voice wav <path>\n"
" Changes the audio file played while placing a call on hold to the new file specified by <path>. <path>\n"
" is assumed to be an absolute path. The format of the file specified must be WAV.\n"
"\n"
" voice wav default\n"
" Changes the audio file played while placing a call on hold to the default piano.wav included with the app.\n"
"\n"