This page presents some technical details of VoIP (voice over IP, videoconferencing) related to Ekiga software.
What is SIP?
SIP stands for Session Initiation Protocol. It is defined by RFC3261 and provides a method for registering with VoIP service (or 'Dial-tone') providers and initiating/receiving VoIP calls.
Once a 'call' is created, the audio (and optionally video) is sent directly between caller and callee, although it is possible to use SIP proxies - where the call is routed through the proxy.
The audio/video is encoded/compressed using a codec. Different codecs are available within Ekiga, and each provides a compromise between audio quality and bandwidth required.
A SIP number normally looks like an email address, for example, email@example.com. The part before the '@' represents the user, and the part after represents the service provider.
The user part may be either numeric or alphanumeric, depending on the provider. For example, Ekiga.net uses alphanumeric usernames, but each has a numerical alias to enable dialing from a standard telephone key pad.
To dial a number on an application (such as Ekiga), just enter the SIP number.
With a telephone keypad it is not possible to enter alphanumerical characters, so it is not possible to enter the provider portion. To make calls to other providers, the user can use a peering prefix.
Another problem is that unlike a normal telephone, the full 'user' part of the number must be entered before the call is placed and the number can be any number of digits. In this case, the '#' can be used to indicate that the number is complete. Another solution is to set up a dialplan (which interprets numbers as they are typed).
In order to differentiate a SIP number from an email address, the 'sip:' URI should be used, for example sip:firstname.lastname@example.org.
How contact presence (online, offline) works in SIP
The ekiga.net SIP proxy (kamailio) has a table with SIP addresses, their state, and the users who are subscribed to an address.
If the user eugen for example wants to know the user yannick's state, then:
- eugen's Ekiga client sends to ekiga.net a SUBSCRIBE sip:email@example.com
- ekiga.net adds eugen as subscriber for yannick
- ekiga.net sends a NOTIFY to eugen's Ekiga client containing yannick's current state
- each time yannick changes state (or when he registers), his Ekiga client sends to ekiga.net a PUBLISH sip:firstname.lastname@example.org with his new state
- upon reception, kamailio sends to eugen's Ekiga client (and to all of yannick's subscribers) a NOTIFY with the yannick's updated state
- PUBLISH and SUBSCRIBE (as well as REGISTER) are subject to an expiry period. This is why, even if yannick's Ekiga client does not change state for 500 seconds, it will still send a PUBLISH sip:email@example.com to ekiga.net
- if after 10 - 15 minutes ekiga.net does not receive any PUBLISH sip:firstname.lastname@example.org from yannick's Ekiga client, then it marks yannick as offline in its table, and sends to eugen's Ekiga client (and to all of yannick's subscribers) a NOTIFY with yannick's offline message. The same applies for SUBSCRIBE
ENUM enum allows you to associate your real phone number to a SIP or H.323 address and to be callable by other users using that phone number. Otherwise said, it is a method to provide a unified numbering system between the public switched telephone network (PSTN) and various VoIP providers. It is supported by some (but not all) service providers.
Technicaly speaking, Enum is a mapping of telephone numbers in E.164 format to domain names using a Domain Name System (DNS)-based architecture, specified in RFC3761. As official implementation using the e164.arpa domain is slow to progress, you can use Enum mechanisms with non-official but free registra like e164.org owned by enthusiastic people willing to test the Enum system (the Internet Telephony Users Association, a non-profit association). View the Enum implementations around the world
ENUM works by acting as a look up service. A recipient registers their PSTN number with e164.org (or other ENUM registra) where they can provide a VoIP number, email address and URL.
- Provider registered number: Some providers automatically register the numbers that they provide to their users, in which case you don't need to do anything - it will just work.
- Registering your own PSTN number: You can register an account at e164.org's public ENUM with your PSTN number in international format (ie. +33 123 45 67 89). You can now add your email, your instant messaging account and your (Ekiga.net) VoIP number to this account. Most registrars require some form of authentication to prevent prevent people registering PSTN numbers which aren't theirs. e164.org does this by placing a call to the PSTN in question so that they can confirm that the real owner is the one attempting to register.
- Calling an ENUM: When a caller places a call to a registered phone number, the dialtone provider (PSTN or VoIP) does an ENUM lookup to find out whether the call can be placed via VoIP or PSTN, and then places the call using the cheapest route. If a dialtone provider does not use ENUM, it is often possible to use a peering code (VoIP) or an access number (PSTN) to link to one which does.
Calling from PSTN network
- Using a phone provider that has ENUM lookup: The caller just dials the telephone number. Their provider will check automatically if this phone number exists in the ENUM directories and decides whether to route the call via VoIP. If the phone number is not found in the ENUM directories, the provider will use the PSTN to place the call.
- Using a phone provider that has no ENUM lookup: The caller will need to call via a phone service that links to an ENUM look up service. SIP Broker offers (via sponsors) access phone numbers to connect to its service from the PSTN. If the phone number does not exist within the ENUM directories the call is terminated. For example, in France you may call 01-72-09-04-04 to reach SIPBroker and then dial *673 500# to call the ekiga's echo test.
Calling from a VoIP Network
Some VoIP service providers automatically do ENUM lookup on all numbers dialled, in which case the call will be routed via the best/cheapest route.
Unfortunately Ekiga.net has no automatic ENUM lookup, the user can use another network to do the ENUM lookup. This can be done via SipBroker, to place an ENUM call add *013 (the Sip Broker/ENUM server prefix) to the start of phone number. The current Sip Broker behaviour queries 5 ENUM roots: e164.arpa (the only one official, see RFC3761), e164.org, e164.info, e164.televolution.net, and enum.org.
Peering is the term given to agreement between VoIP Service Providers which enables the users of one service to call users of another.
This is usually implemented by dialing a special prefix number and then the number of the recipient (on the 'other' service).
The prefix numbers
Each provider has its own list of prefix and its own agreements with other PSTN and VoIP providers. Some of these prefixes are standardised to be the same on multiple dialtone providers.
- Peter is calling his friend Mark.
- Mark's phone number is +33 123 45 67 89 (International telephone format).
- Mark's phone provider is Provider M.
- Peter uses Provider A to call Mark.
- The call should go then from Provider A's network to Provider M's network.
- To do this, Peter needs to dial the prefix of Provider M : *789 telling Provider A to switch the call to Provider M.
- So Peter had to dial : *789 33 123 45 67 89 to call Mark
Now, Peter uses his cell phone using then Provider B.
- For Provider B, the prefix for Provider M is *456
- So, from his cell phone, Peter has to dial *456 33 123 45 67 89 to call his friend Mark.
The global prefix numbers
However, a global solution exists, unifying all providers and giving each one an unique prefix
So, Peter, from whatever telephone provider he wants to use, can call his friend Mark either using the global prefix of Provider M. For example *123 33 123 45 67 89.
If you want to call someone on the same network, you do not of course need to add the prefix.
A list of all global prefixes is available of the SipBroker's White page.