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.
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.
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.
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 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.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].
[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 SIP line configured above: