Skip to main content

Sip

The HSYCO SIP I/O Server allows HSYCO to control standard VoIP client software (also called soft-phones), in order to integrate telephony features in HSYCO applications.

Using the SIP I/O Server, you will be able to use the audio capabilities of the HSYCO Server to implement a speakerphone with all calling features being controlled by HSYCO itself. This phone mode is particularly useful when HSYCO is running on a touch screen equipped with a microphone and speaker, and a kiosk mode Web browser, to create customized door-entry control panels with audio/video capabilities.

The SIP I/O Server also works as a basic IVR (interactive voice response) system, allowing HSYCO to interact with users via the standard telephony system through the use of voice and DTMF tones input on the phone’s keypad.

VoIP Applications

The SIP I/O Server currently works with the Linphone Voice Over IP software phone, on Linux systems only. Linphone must be installed and properly configured on the Linux system that runs the HSYCO Server.

The current version of the SIP I/O Server has been tested with Linphone 3.5.2.

note

Linphone is a free software that you can use and distribute, currently licensed under the GNU GPL v2 license. You should verify with the Linphone owner that your intended use of this software is compliant with the license, or obtain a proprietary license of the software. Check www.linphone.org for additional information.

Linphone Installation

From the Linux command-line shell, install the software with the command:

sudo apt-get install linphone

After the installation, run Linphone for the hsyco user, and configure the audio devices and levels. This configuration will be used when Linphone is run as a daemon process and called by HSYCO.

This script:

#!/bin/bash
ps axuw|awk '/[ ]linphonec$/ {print $2}'|xargs -r kill -9
linphonec

must be copied in the /usr/local/bin/ folder and set as executable.

Finally, if you are using the the PulseAudio system, ensure that the user that will run Linphone is added to the pulse-access group, while if you are using the ALSA audio system, the user that will run Linphone should be added to the audio group instead.

HSYCO Configuration

The VoIP client can be configured to work as a stand-alone client, or registered to a VoIP PBX system.

You can define only one HSYCO SIP I/O Server in System Settings.

Add a SIP I/O Server in the I/O Servers section of the Settings and set its parameters:

Communication

Stand-alone Client Configuration

Leave all the communication parameters blank.

Registered Client Configuration

  • IP Address: host name or IP address of the VoIP PBX system
  • IP Port: TCP/IP port to use, leave blank to use default port 5060
  • User: username for the PBX account you are using
  • Password: password for the PBX account you are using.

High Availability

  • Shutdown when inactive: defaults to true.

Options

IDDefaultValuesDescription
userhsycousernamethe operating system’s user name that will be used to run the Linphone application, either locally or on a remote server
hostremote host name or addressthe hostname or IP address of the remote server where Linphone is installed
passwordpasswordthis option is required when host is defined. It is the password for the remote user
modephonephonephone mode
ivrivr mode

Remote System Configuration

When Linphone is run on a remote system, HSYCO will use the SSH protocol to execute the remote call. The remote system should be configured to accept the SSH connection from the HSYCO server using the username and password defined in the I/O Server’s options.

If you also need to control the display backlight or execute generic operating system’s commands, the remote user name defined with the user option in the SIP I/O Server configuration must be allowed to execute sudo commands without asking for a password.

For example, if the user is hsyco, you could add the line:

hsyco   ALL=(ALL:ALL) NOPASSWD: ALL

at the end of the /etc/sudoers file (Use the visudo command to edit the /etc/sudoers file).

Datapoints

IDValueR/WDescription
connectiononlineRconnection established
offlineRHSYCO can’t connect to the VoIP client application
registration0Rthe SIP client is not registered (note that this event is not guaranteed to reflect unregistration conditions caused by the SIP server)
1Rthe SIP client is registered to a SIP server
modephoneRthe I/O Server is in phone mode
ivrRthe I/O Server is in IVR mode
call<SIP URI string>Ra call is being established or is in progress with the remote party identified by the value of this data-point
Wstart a call to a remote party
answerWanswer an incoming call
hangupWhangup a call
<empty string>Rno call is currently being established or in progress
call.refused<SIP URI string>Ran incoming call is refused because another call is already in progress
statusringRreceiving an incoming call, not yet answered
dialRdialing a call, not yet answered
activeRincoming or outbound call in progress
hangupRno call is currently in progress
transfer<SIP URI string>Wblind transfer an active or incoming call to a remote party
mute0Run-mute command sent successfully
Wun-mute the microphone
1Rmute command sent successfully
Wmute the microphone (note that when a call is terminated, the mute status is reset)
autoanswer0Rautoanswer is disabled
Wdisable autoanswer mode
1Rautoanswer is enabled
Wenable autoanswer mode
volumeoffRvolume off command sent successfully
Wturn off the speaker
1 - 20Rvolume command sent successfully
Wset the speaker volume
dtmf0 - 9 # *RDTMF tone received
Wsend DTMF tones (you can send one or more tones with the same command)
generic<string>Wsend a generic command to the Linphone application
play.file<filename>Wonly in IVR mode, play back a file to an active call. The file pathname must be relative to HSYCO’s root directory
play.voice.<voice><text>Wonly in IVR mode, use the TTS engine to play back a text message, using the voice set with <voice>
backlit0Rbacklight off command sent successfully
Wturn off the display’s backlight
1Rbacklight on command sent successfully
Wturn on the display’s backlight
exec<command>Wexecute a generic operating system’s command

The SIP protocol uses a standard URI format to identify the calling and called parties, like:

sip:user@host

where user is the username and host is the remote host name or IP address.

The SIP I/O Server will automatically remove or imply the sip: prefix from data-point values. @host will also be removed or implied if host is an exact match of the I/O Server IP parameter.

When an incoming call is ringing or an outbound call is being dialed, the SIP I/O Server also generates a PBX event and calls the PBXCallEvent() Java callback method. When the phone is ringing the event will be

PBX <remote URI> = <local URI>

and the Java callback:

PBXCallEvent(`<ID>`, `<remote URI>`, `<local URI>`)

When an outbound call is established, the event will be:

PBX <local URI>  = <remote URI>

and the Java callback:

PBXCallEvent(`<ID>`, `<local URI>`, `<remote URI>`)
note

Note that, if the SIP I/O Server is configured as a stand-alone client, the <local URI> is replaced with the I/O Server’s ID.

Release Notes

3.5.1

  • improved compatibility with latest versions of linphone

3.3.0

  • improved performance of the SSH connection to remote servers
  • support of password-based authentication

3.2.1

  • text-to-speech performance improvements

3.2.0

  • initial release