Listeners in Yate

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
Line 22: Line 22:
 
Here is an example to set a default listener and a UDP listener in ysipchan.conf.
 
Here is an example to set a default listener and a UDP listener in ysipchan.conf.
  
  [listener general]
+
  [listener your_listener_name]
addr=x.y.z.w
+
  type=udp
+
  addr=x.x.x.x
[listener my_listener_name]
+
  port=5060
port=5060
+
addr=a.b.c.d
+
  
 
The default listener it is set in section [listener general] and will build a UDP listener that will have the parameters used only for UDP.
 
The default listener it is set in section [listener general] and will build a UDP listener that will have the parameters used only for UDP.
  
 
In a routing module: parameter oconnection_id it can be used to set on which IP to send outbound call legs for routing.
 
In a routing module: parameter oconnection_id it can be used to set on which IP to send outbound call legs for routing.
We will choose the general listener to set on which IP to send outbound call legs and sip channel like this:
+
We will choose the listener created above to set on which IP to send outbound call legs and create a sip channel like this:
 
   
 
   
 
regexroute.conf
 
regexroute.conf
Line 38: Line 36:
 
  [default]
 
  [default]
 
  ; Set on which IP to send outbound call legs
 
  ; Set on which IP to send outbound call legs
  .*=;oconnection_id=general
+
  .*=;oconnection_id=your_listener_name
 
  ; call an sip channel
 
  ; call an sip channel
 
   extension=sip/sip:user@ip:port.
 
   extension=sip/sip:user@ip:port.

Revision as of 16:28, 23 October 2012

Using the default configuration from ysipchan.conf file, Yate will behave as a SIP server, that will listen on all interface. A set of listeners can be set so that Yate will listen to that interfaces.

In Yate the advantage is that you can set on which interface he will listen and that it is done configuring your own listeners by creating sections like [listener your_listener_name] that will have the IP address, port and the type of the listener. If the type is invalid or is not set the an UDP listener will be build by default.

Parameters that can be set for each listener that is configured in a section:

  • type: the type values allowed:
- udp - build a UDP listener
- tcp - build a TCP listener
- tls - build a TLS listener ( that is a encrypted TCP)
  • enable: Enable or disable this listener
  • default:used only for UDP to specify if this is the default transport to use when none specified
  • udp_force_bind: UDP only, if is set Yate will try to use a random port if failed to bind on configured one
  • addr: is the IP address to bind to
  • port: is the port to bind to.Defaults to 5060 for UDP and TCP, 5061 for TLS listeners
  • rtp_localip: the IP address to bind local RTP to
  • backlog: the maximum length of the queue of pending connections.This parameter is ignored for UDP listeners.
  • sslcontext: SSL context if this is an encrypted connection. Required for TLS listeners.
  • thread: the listener thread priority. Can be one of: lowest, low, normal, high, highest.

Here is an example to set a default listener and a UDP listener in ysipchan.conf.

[listener your_listener_name]
 type=udp
 addr=x.x.x.x
 port=5060

The default listener it is set in section [listener general] and will build a UDP listener that will have the parameters used only for UDP.

In a routing module: parameter oconnection_id it can be used to set on which IP to send outbound call legs for routing. We will choose the listener created above to set on which IP to send outbound call legs and create a sip channel like this:

regexroute.conf

[default]
; Set on which IP to send outbound call legs
.*=;oconnection_id=your_listener_name
; call an sip channel
 extension=sip/sip:user@ip:port.
Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers