SIP as Peer-to-Peer distributed system


In SIP we have user-agents (clients and servers) and control-servers. The user-agents handle the signaling and media. The control servers handle only the SIP signaling. Using control-servers in peer-to-peer model serves the purpose of having more control over the sip cloud and doing some sort of translation on SIP message level. Having control means offering more services to the customers and getting more money (Business).

So how this model (Peer to Peer with control servers) looks like ?

As we see in the figure below the user-agent A sends its call (SIP control messages not the media) through its proxy (The proxy which is responsible for user A). You can call it the home proxy or the outgoing proxy or the mom proxy (for fun).

Remember i can ask my mom to do something for me at home but it is not suitable to ask my neighbor to do it for me. You got it !!! More control by the home proxy.

So the SIP as peer-to-peer model is not pure peer-to-peer model for signaling but it is pure peer-to-peer model for media.

DNS lookup: Each proxy has the IP addresses of  its own registered users in its local database. SIP registration process is done before SIP call establishment. When the local proxy wants to route a call (SIP message) depending on the R-URI (Requested URI) it asks the DNS server about the IP address of the targeted domain and forward the call to the IP address returned from DNS server which is the IP address of the Ingoing proxy.

More Information: What does ”Peer-to-Peer Networking” mean?

Aliases in VOIP Systems


Alias(General term): Not the real name. For example My real name is “Binan” as it is written in the civil registry. but you can call me “Beta” (alias) as people used to call. We see this in VOIP world and it is very useful when we don’t want to publish our real names. This gives very clever way to get this way of mapping between the real names and the aliases in the communication systems. The network nodes can do some sort of translation depending on some rules stored in the local database.


For example SIP proxy can store multiple SIP addresses for the same user: # Original-URI # Alias-URI # Alias-URI

The sip proxy does the translation of Alias-URI to Original-URI. This happens only by the proxy who is responsible for user (local user). The mapping between Alias-URI and Original-URI is stored in database. Both the username and the domain name in the URI can be aliased.

In OpenSIPS SIP server:

  • The alias’s module :
  • Database table name (default): dbaliases
  • The lookup is done on the R-URI (Requested URI).

Performance is better if memory caching is supported.

More Information