SIP Router

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Configure a SIP line)
 
(18 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
Yate can be used as a SIP Router that is a SIP Softswitch with his features like establishing, modifying and finalizing a session, registering and redirect just to mention a few. The implementation of SIP it is done using a VoIP SIP driver based on [[YASS]] library.
  
 +
== Yate - SIP router ==
  
 +
Yate is a B2BUA (back-to-back user agent) that receives calls on SIP and sends them through SIP.
  
== What's SIP? ==
 
  
'''SIP''' comes from '''S'''ession '''I'''nitiation '''P'''rotocol. The Session Initiation Protocol is a signaling protocol developed and standardized by the Internet Enginneering Task Force (IETF).  
+
[[File:sip-router-b2bua.png]]
  
What does this definition mean in our case? This means it is used to initiate and maintain sessions in a network to provide VoIP communication between two or more points. Such points could be one phone and one pc for example or more computers located in various places in case of a multi-conference, phisycaly connected in such a way that VoIP communication to be possible.
+
== Protocols used in session communication in Yate - SIP Router ==
  
 +
There are various protocols used to carry data over a real time multimedia session in numerous formats like voice, video or text messages.
  
 +
SIP doesn't offer any other services besides the session configuration related ones, that is why is being used along with protocols specialized on other tasks like the:
 +
* '''R'''eal-time '''T'''ransport '''P'''rotocol ('''RTP''') for data transporting and Quality of Service;
 +
* '''S'''ession '''D'''escription '''P'''rotocol ('''SDP''') for describing multimedia sessions and others.
  
== Yate as a SIP Router ==
+
This way SIP can provide complete functionality to the users but despite all this collaboration with other protocols it does not depend on them.
  
There are various protocols used to carry data over a real time multimedia session in numerous formats like voice, video or text messages.
+
== Yate features if used as SIP router==
  
SIP works along with them, helping the endpoints in a communication to agree about the session characteristics.  
+
* Besides ''establishing'', ''modifying'' and ''finalizing'' a session, SIP can also be used to invite participants to an already existing one.
  
SIP doesn't offer any other services besides the session configuration related ones,  that is why is being used along with protocols specialized on other tasks like the:
+
* SIP '''secure''' uses TLS protocol for securing the signalling. This will stop man in the middle attacks and hide the called identity. Data security protocols such as SRTP rely upon a separate key management system to securely establish encryption and/or authentication keys. TLS will protect the SDP message.
* '''R'''eal-time '''T'''ransport Protocol ('''RTP''') for data transporting and Quality of Service;
+
* Session Description Protocol (SDP) for describing multimedia sessions and others.
+
  
This way SIP can provide complete functionality to the users but despite all this collaboration with other protocols it does not depend on them.
+
* SUBSCRIBE - Allow SIP clients to subscribe to specific events
 +
 
 +
* NOTIFY - Notify SIP clients when an event's state changed
 +
 
 +
* '''Registration''' allows a SIP endpoint to register with a SIP registrar so other SIP endpoints can find it. Logging into an instant message client and then showing up that is online is an example of registration.
 +
 
 +
* If '''forward_sdp''' is set in Yate enables the entire SDP to be passed unchanged.
 +
 
 +
==How to configure SIP Router in Yate ==
 +
 
 +
This are the configuration files for SIP:
 +
 
 +
* ysipchan.conf the main file for configuring SIP methods
 +
* sipfeatures.conf configures some SIP features
 +
* sip_cnam_lnp.conf controls how CNAM and LNP queries are performed
 +
 
 +
For configuring users, gateways no matter the protocol used, other files are used as regfile.conf or regexroute.conf.
 +
 
 +
Using the default configuration from '''ysipchan.conf''' file, Yate will behave as a SIP server, that will listen on all interfaces or you can configure your own listeners. In Yate you can build UDP, TCP, TLS listeners.
 +
 
 +
=== SIP Routing in Yate ===
 +
 
 +
====Route to a SIP channel====
 +
 
 +
From a [[Routing|routing module]] (e.g regexroute.conf) you can call an sip channel like this:
 +
 
 +
;extension match rule=sip/sip:user@ip:port
 +
^100$=sip/sip:user@ip:port
 +
 
 +
==== Route to a SIP line====
 +
 
 +
===== Configure a SIP line=====
 +
 
 +
From [[Accfile|accfile.conf]] you can configure a SIP line. In this case Yate registers to a remote server.<br>
 +
 
 +
This is an example:
 +
 
 +
Configure a SIP line called [test_sip].
 +
 
 +
accfile.conf
 +
[test_sip]
 +
enabled=yes
 +
protocol=sip
 +
username=me
 +
description=Test SIP account
 +
interval=600
 +
authname=metoo
 +
password=1234
 +
domain=somewhere.org
 +
registrar=10.0.0.1:5060
 +
outbound=10.0.0.1:5061
 +
localaddress=192.168.0.1:5062
 +
 
 +
=====Route to the configured line=====
 +
 
 +
Route a call to the [[Accfile|SIP line]] configured above:
  
As a '''SIP router''' Yate supports this protocol and its features like registering, proxy and redirect, through its own library that implements them, this being called [[YaSS|YASS – Yet Another SIP Stack]].  
+
regexroute.conf
  
In the following lines are described some more features that an implementation of SIP permits.
+
^100$=line/100;line=test_sip
  
Besides establishing, modifying and finalizing a session, SIP can also be used to invite participants to an already existing one. Also a type of media can be added or removed from a session. Like stated in the RFC document 3261 which represents the last published standard for SIP, the protocol supports name mapping and redirection services and users can maintain a single externally visible identifier regardless of their network location. The call forwarding SIP provides to the implementing servers is accompanied by the possibility of negociating the terminal type and capabilities and selecting it. This way a caller is given a choice about how to reach the party, via Internet telephony, an answering service, etc.
 
  
The security of communication services always was considered important so SIP provides a suite of security services like user authentication, denial-of-service prevention, integrity protection, and others.
+
'''See also'''
  
SIP addresses users using an e-mail like easy-to-understand addressing system.
+
* [[SIP in Yate]]
 +
* [[Routing| Routing in Yate]]
 +
* [[Accfile| Accfile module]]
 +
* [[Regular expressions|Regular expressions Route Module]]

Latest revision as of 17:00, 13 May 2013

Yate can be used as a SIP Router that is a SIP Softswitch with his features like establishing, modifying and finalizing a session, registering and redirect just to mention a few. The implementation of SIP it is done using a VoIP SIP driver based on YASS library.

Contents

[edit] Yate - SIP router

Yate is a B2BUA (back-to-back user agent) that receives calls on SIP and sends them through SIP.


Sip-router-b2bua.png

[edit] Protocols used in session communication in Yate - SIP Router

There are various protocols used to carry data over a real time multimedia session in numerous formats like voice, video or text messages.

SIP doesn't offer any other services besides the session configuration related ones, that is why is being used along with protocols specialized on other tasks like the:

  • Real-time Transport Protocol (RTP) for data transporting and Quality of Service;
  • Session Description Protocol (SDP) for describing multimedia sessions and others.

This way SIP can provide complete functionality to the users but despite all this collaboration with other protocols it does not depend on them.

[edit] Yate features if used as SIP router

  • Besides establishing, modifying and finalizing a session, SIP can also be used to invite participants to an already existing one.
  • SIP secure uses TLS protocol for securing the signalling. This will stop man in the middle attacks and hide the called identity. Data security protocols such as SRTP rely upon a separate key management system to securely establish encryption and/or authentication keys. TLS will protect the SDP message.
  • SUBSCRIBE - Allow SIP clients to subscribe to specific events
  • NOTIFY - Notify SIP clients when an event's state changed
  • Registration allows a SIP endpoint to register with a SIP registrar so other SIP endpoints can find it. Logging into an instant message client and then showing up that is online is an example of registration.
  • If forward_sdp is set in Yate enables the entire SDP to be passed unchanged.

[edit] How to configure SIP Router in Yate

This are the configuration files for SIP:

  • ysipchan.conf the main file for configuring SIP methods
  • sipfeatures.conf configures some SIP features
  • sip_cnam_lnp.conf controls how CNAM and LNP queries are performed

For configuring users, gateways no matter the protocol used, other files are used as regfile.conf or regexroute.conf.

Using the default configuration from ysipchan.conf file, Yate will behave as a SIP server, that will listen on all interfaces or you can configure your own listeners. In Yate you can build UDP, TCP, TLS listeners.

[edit] SIP Routing in Yate

[edit] Route to a SIP channel

From a routing module (e.g regexroute.conf) you can call an sip channel like this:

;extension match rule=sip/sip:user@ip:port
^100$=sip/sip:user@ip:port

[edit] Route to a SIP line

[edit] Configure a SIP line

From accfile.conf you can configure a SIP line. In this case Yate registers to a remote server.

This is an example:

Configure a SIP line called [test_sip].

accfile.conf

[test_sip]
enabled=yes
protocol=sip
username=me
description=Test SIP account
interval=600
authname=metoo
password=1234
domain=somewhere.org
registrar=10.0.0.1:5060
outbound=10.0.0.1:5061
localaddress=192.168.0.1:5062
[edit] Route to the configured line

Route a call to the SIP line configured above:

regexroute.conf

^100$=line/100;line=test_sip


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers