This page is a
translated version of the page
SIP-telephony and the translation is 100% complete.
iRidium for SIP telephony
a set of tools for creating interfaces which enable audio- and videocalls between iRidium Client apps (i3 pro), IP phones and video intercom with SIP support
The documentation was updated on 03.12.2021
Description
iRidium for SIP telephony is a set of tools for creating interfaces of call panels working by the SIP protocol. iRidium can make calls and get audio- and videocalls from other call panels.
Driver may be used on iRidium server only for PUSH notifications.
The supported audiocodecs (it is recommended to deactivate the rest in the settings of the SIP server):
- G711(PCMU(m-law), PCMA(a-law));
- GSM;
- G722;
- H263;
- H263-1998;
- H264.
Tested hardware:
- Akuvox;
- Dahua;
- True IP(only for Russian developers);
- Mobotix;
- Urmet;
- CAME BPT;
- DoorBird;
- 2N;
- BasIP;
- GUINAZ;
- Fanvil.
Background mode is not supported (it is not possible to receive call when the app minimized or closed), but you can use push-notifications.
Licensing:
- use it for free in test mode of i3 pro (via iRidium Transfer)
- purchase any iRidium 3.x license, the "SIP Telephony" addon will be available there for free
Ready Templates
Ready interfaces for i3 pro to work as SIP intercom / intercom panel:
project, device |
functions
|
intercom (smartphone) intercom (tablet, PC) |
- keypad for calling
- audio and video calls
- receiving calls
- the "black list"
- call history
- server settings
- settings of audio-filters
|
simplified intercom (smartphone) simplified intercom (tablet, PC) |
- keypad for calling
- audio calls
- receiving calls
- the "black list"
- settings of audiofilters
|
intercom panel (smartphone) intercom panel (tablet, PC) |
- intercom call button
- receiving calls from the door station
- video from the camera (if any)
- you can add intercom
|
Mobotix intercom panel (smartphone) Mobotix intercom panel (tablet, PC) |
- intercom call button
- receiving call from the door station
- real time video from the camera
- door opening
- light switching
- you can add intercom
|
Equipment configuration and settings to connect iRidium to the SIP server and to make calls.
SIP server - it can be hardware or software. The server function is to commute calls between the connected subscribers.
SIP subscriber - it is iRidium on smart phones, tablets or PC, IP phone, video intercom. Subscribers can call each other via the server only.
Setting the SIP server
The SIP server (the PBX server) stores the list of subscribers which can call each other. It makes calls to subscribers possible. Via the SIP server you can set up voice connection between iRidium panels, hardware and software IP phones, video intercom in a flat, house or office.
Audio and videocalls can me sent both in the local network and via routers and the internet.
There are three types of SIP servers:
- software SIP server,
- hardware SIP server,
- built-in SIP server in video intercoms,
- cloud SIP server (Cloud PBX).
iRidium does not provide a ready SIP-server, that's why you'll have to use a ready solution.
Select a suitable SIP server and set several subscribers.
SIP server has the following settings:
- Host - server IP address in the local network, for cloud and remote servers it is domain name (Server domain, Realm),
- Port - standard 5060.
Each subscriber is a call panel or intercom and has the following settings:
- SIP ID (SIP number, login) - unique number or name used to identify a subscriber,
- Password - subscriber's password to protect from unauthorized access to the communication channel,
- Caller ID (Display Name, nickname) - any name that is displayed during a call for example, Jack Nicholson.
For successful connection it is very important to have identical settings of Host, Port, SIP number and password both on the SIP server and a SIP subscriber Identical Caller ID is not obligatory.
Free variants of SIP servers are given below. Check the terms and limits of free use.
SIP server |
Type |
Manual on settings
|
Linphone SIP Service |
cloud |
create accounts at linphone.org - each account has a login that you must use as a subscriber number. The server address is sip.linphone.org
|
Linphone Flexisip |
software (Linux, Mac OS, Windows, Android, iOS, BlackBerry) |
-
|
3CX Phone System |
to install on PC (Windows) cloud |
manual
|
Asterisk FreePBX |
to install on PC (Linux, Windows) hardware solution |
manual
|
FreePBX |
to install on PC (Linux) |
-
|
Elastix |
to install on PC (Linux) |
-
|
Yeastar |
cloud |
-
|
Zadarma |
cloud |
manual
|
Antisip |
cloud |
manual
|
Some intercoms have built-in SIP servers, for example, intercoms by Mobotix, Dahua, True IP.
Working in iRidium studio
Download the call panel interface and set it up in iRidium studio for connection to the SIP server.
Setting SIP Driver
1. In Project Device Panel indicate the properties of the SIP server and the subscriber's number which iRidium will be for the SIP driver.
- Name - the driver name. Do NOT change it in the ready interface
- Driver Type - the driver type
- Protocol - protocol to exchange data UDP/TCP;
- Host - the IP address or domain name of the SIP server
- Port - the port of connection to the SIP server. It is usually 5060, for Mobotix T24/T25: 5061
- Password - the subscriber's password to connect to the server
- Caller ID (Name) - the subscriber's name (it can be the same as SIP ID)
- SIP ID (Number) - the subscriber's number
- SIP server - Mobotix T26, Another;
- First RTP Port - the beginning of a range of ports of voice exchange. It is usually 40000, for Mobotix T24/T25: 7078
- Last RTP Port - the end of a range of ports of voice exchange. It is usually 41000, for Mobotix T24/T25: 9078. This UDP range must be forwarded on the router when working via the Internet
- Use SIP TONE - to generate SIP messages of tone dialing
- USE DTMF TONE - to generate standard messages of tone dialing They are sent in a voice stream (recommended).
- External IP - the external IP address of control panel. It is entered only if the external IP address of a remote SIP server used in the Host field. To fill in this field automatically when making calls via the internet use the instructions Deactivate the "Ban to connenct to public network" parameter in the subscriber settings of 3CX server;
- Codec PCMU, Codec PCMA, Codec GSM, Codec G722 - SIP audiocodecs. You can turn on one codec or all of them if you are not sure which codec supported by the other subscribers. Do not turn off all the audio-codecs
- Codec H263, Codec H263-1998, Codec H264 - SIP videocodecs. You can turn on one codec or both if you are not sure which codec supported by the other subscribers
- Sound correction and filtration. Correction modes must be switched during a call. Some modes can be switched on with the help of SIP driver commands (see the ready projects). Corrections alway depend on working conditions:
- Echo Cancellation - echo cancellation
- AutoGainControl - automatic control of amplification of the sound from a microphone. It helps to reduce workload, echo, abrupt volime changes and make the quality of the sound better, but it reduces the volume. 0 - the parameter is off, 1-31 - a range to control amplification. By default the value of this setting is 20. This sound processing is part of EchoCancel, that's why it works only if EchoCancel is on.
- Activation by voice. The app sends sound only when there is speech, it mutes the sound in the remaning time. The setting helps to get rid of extra noise during a call.
- Expires - a period of time when registration on a SIP server expires. A subscriber registers again automatically in a set period of time (in seconds). This function is very important when working with some SIP servers that periodically update the registration status.;
- VoiceMail - activation of voice mail. If i3 pro subscriber is busy, turned off or can't answer a call, the auto answer offers to leave a voice message, that will be stored on the SIP server. i3 pro subscriber can listen to the messages by calling a definite number. Check that the SIP server supports the voice mail function;
- Use Decline - send the DECLINE command together with CANCEL when the call is terminated (it is required for correct termination of a call when working with some panels, for example 2N);
- Preview Mode - a mode for preview. After you get an incoming call, a caller can only hear the calling sounds and he does not hear or see you until you answer the call by sending the ANSWER command. But you will get audio and video (if it is a video call) from the caller;
- Do Not Disturb - a “do not disturb” mode. If it is on, all incoming calls are declined.
2. The status of a call panle when it is successfully connected to the server: On Hook ... (SIP > Feedback > STATUS)
3. To use a call panel without changes, download the project on your control panel.
4. To add a call panel to your ready project, follow the instructions in the video.
Commands and feedback channels of the SIP driver
Ready interfaces for call panels use commands and messages of the SIP driver to make and receive calls. The processing of calls is performed by the JavaScript file. Without this file the visual interface will not work correctly.
The list of commands and feedback channels of the SIP driver which you can use when modifying JavaScript handlers and directly by assigning commands and channels to graphic items:
Commands:
- ANSWER - to answer an incoming call. Assign the command to the button
- Send Number: 0 - reply with the audio-call
- Send Number: 1 - reply with the video-call
- CALL - to make a call. The number is taken from Feedbacks > NUMBER, where it should be written in advance as a string. Assign the command to the button:
- Send Number: 0 - the audio-call
- Send Number: 1 - the video-call
- CANCEL - to cancel a call. Assign the command to the button, Send Number: 0
- SEND TONE - to send a tone value. Assign the command to the button, Send Number: 1-9, * = 10, # = 11
- REGISTER - to register on the SIP server. Assign the command to the button, Send Number: 0
- UNREGISTER - to disconnect from the SIP server. Assign the command to the button, Send Number: 0
- SET AUDIO VOLUME - to set the volume of loudspeakers (0-100%)
- SET ECHO CANCELLATION - to set the echo cancellation, on/off (1/0)
- SET MIC VOLUME - to set the microphone volume (0-100%)
- SET SPEECH SEND - enable / disable (1/0) the "Voice activation" setting;
- P2P CALL - make a direct call to the IP-address of another subscriber without using SIP-server:
- Send Number: 0 - audio call;
- Send Number: 1 - video call.
- TRANSFER CALL - transfers an incoming call to a selected number. A number, where a call is transferred is written in this command.
Feedback:
- AUDIO VOLUME - the volume of loudspeakers (0-100%)
- CODEC - the data type of sound and video: Payload Type (PT) see the full list here
- ECHO CANCELATION - the echo cancellation mode, on/off (1/0)
- FIRST RTP PORT - the first port of the RTP range
- INCOMING CALL - if there is an incoming call: 0 - no, 1 - yes
- INCOMING CALL NAME - caller name, text
- INCOMING CALL NUMBER - the caller’s name, text
- JITTER - (ms) the connection quality, the channel jitter. Values hopping for more than 30 ms can be the indicator of the unstable connection
- LAST RTP PORT - the last port of the RTP range
- MESSAGE ACCOUNT - ID of the subscriber's account for voice mail;
- MESSAGE LISTENED - number of listened voice messages;
- MESSAGE UNLISTENED - number of unlistened voice messages;
- MIC VOLUME - the microphone volume (0-100%)
- NUMBER - the subscriber's number. Values are written in this Feedback via the dialog window "Send to Project Token > Send Number" in the macros editor to be able to call the indicated subscriber at activation of the CALL command
- STATUS - the current connection status, text. Possible status:
- On Hook... - connected to the SIP server, ready for work
- Connected... - made a connection, getting ready to register
- Disconnected... - forced disconnection from the server (by the command to the driver)
- Failed... - an error at connection (unrelated to the SIP server)
- Trying... a call request is being processed
- Ringing... - the location of the user being called to is determined. The signal about the incoming call is sent
- Incoming Call... - the incoming call
- Talking... - the talk
- Not Found... - the subscriber being called to is not found, there is no such SIP number
- Not Acceptable... - the connection with the server is established but some parameters, such as the type of requested information, bandwidth and addressing type are not available
- Not Available... - the subscriber being called to is not available for calls
- Declined... - the subscriber being called does not want to take calls, without indicating the reason
- Request Pending... - the request is received when the server hasn’t finished processing the other request for this dialog
- Service Unavailable... - the server cannot process the call at the moment because of the overload or maintenance.
- USED DTMF TONE - use of DTMF dialing tone: 0 - not used, 1 - used;
- USED SIP TONE - use of SIP dialing tone: 0 - not used, 1 - used;
- WAITING MESSAGE - new voice messages for a subscriber: 0 - no new messages, 1 - there are unlistened messages.
Examples of Working with SIP in the Script
Outgoing Call to a Number
.Set() method of SIP driver is used. When 1 is sent to the "CALL" command, a video call is made. When 0 is sent, audio call is made. Before calling an outgoing number has to be set.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.SetFeedback("NUMBER", "4001"); //4001 - number to call
SIP.Set("CALL", 1); // 1 - videocall
Accepting an Incoming Call
It's the same as in an outgoing call, but the number doesn't have to be set.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.Set("ANSWER", 0); // 0 - audiocall
Cancelling an Incoming Call
Send 0 to the CANCEL command.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.Set("CANCEL", 0);
Directing an Incoming Call
A calling subscriber will be forwarded to call a selected number.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.Set("TRANSFER CALL", 103); // 103 - number to transfer
Call Using P2P Connection
Direct call to IP-address of the second subscriber without using SIP-server.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.SetFeedback("P2P CALL IP", “192.168.0.33”); // 192.168.0.33 - IP adress to p2p call
SIP.Set("P2P CALL", 0); // 0 - audiocall
Opening Intercom Lock via DTMF- or SIP-tone
DTMF- and SIP-tones are signals from pressing buttons sent via SIP protocol from a subscriber to a subscriber. Intercoms can identify these signals and do certain actions, for example, open a lock. To do it, a code for opening the door has to be set in the intercom, for example,123.
var SIP = IR.GetDevice("SIP"); // name of SIP driver
SIP.Set("SEND TONE", 1); // tone of '1' key
SIP.Set("SEND TONE", 2); // tone of '2' key
SIP.Set("SEND TONE", 3); // tone of '3' key
SIP.Set("SEND TONE", 11); // tone of '#' key
Use DTMF TONE or Use SIP TONE must have True value in the SIP driver.
Check that the SIP server and the intercom support sending and accepting DTMF- or SIP-tones.
A lock can be opened via DTMF- or SIP-tone only during connection with an outdoor panel.
Usually intercoms support alternative ways to open a lock - special HTTP-requests. They are more convenient as connection with an outdoor panel is not required, and a lock can be opened any time.
Setting Different Models of Video Intercoms
Recommended intercom - call panels. They can be connected to SIP servers as subscribers to make audio and video calls: