Analog

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Example of analog.conf)
(Configuration)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
This module manage analog line signaling and data transfer.
+
This module manages analog line signaling and data transfer.
  
 
The analog signaling types supported by Yate are FXO(Foreign Exchange Office) and FXS(Foreign Exchange Station).
 
The analog signaling types supported by Yate are FXO(Foreign Exchange Office) and FXS(Foreign Exchange Station).
Line 109: Line 109:
 
  ; Each section except for 'general' configures a group of lines or an individual line
 
  ; Each section except for 'general' configures a group of lines or an individual line
 
  ; Each section named 'line group-name/circuit-code' or
 
  ; Each section named 'line group-name/circuit-code' or
  ; 'line group-name/fxo/circuit-code' configure a line belonging to group
+
  ; 'line group-name/fxo/circuit-code' configure a line belonging to group
  ; <group-name> or <group-name/fxo> and using the circuit with code
+
  ; <group-name> or <group-name/fxo> and using the circuit with code
  ; <circuit-code> in that group. The 'fxo' part means that the line is the FXO
+
  ; <circuit-code> in that group. The 'fxo' part means that the line is the FXO
  ; listening the FXS end of a monitored line (<group-name>'s type must be monitor)
+
  ; listening the FXS end of a monitored line (<group-name>'s type must be monitor)
 
  ; For each [group-name] section the configuration file is searched for
 
  ; For each [group-name] section the configuration file is searched for
  ; [line group-name/circuit-code] or [line group-name/fxo/circuit-code] sections
+
  ; [line group-name/circuit-code] or [line group-name/fxo/circuit-code] sections
 
  ;
 
  ;
 
  ; NOTES:
 
  ; NOTES:
Line 128: Line 128:
 
  ;
 
  ;
 
  ; Calls can be routed by setting the group name or line address as destination
 
  ; Calls can be routed by setting the group name or line address as destination
  ; ^123$=analog/office-fxs/3
+
  ; ^123$=analog/office-fxs/3
  ; ^012$=analog/office-fxs
+
  ; ^012$=analog/office-fxs
  ; ^13\(*.)$=analog/office-fxo/\1
+
  ; ^13\(*.)$=analog/office-fxo/\1
  ; ^013$=analog/office-fxo
+
  ; ^013$=analog/office-fxo;
;
+
 
  ; When routing, the recorders will set the type, format and callsource parameters
 
  ; When routing, the recorders will set the type, format and callsource parameters
 
  ; The 'type' parameter will have the value 'record', the 'format' parameter is the
 
  ; The 'type' parameter will have the value 'record', the 'format' parameter is the
  ; format of the data source (usually alaw or mulaw) and 'callsource' parameter
+
  ; format of the data source (usually alaw or mulaw) and 'callsource' parameter
  ; will have the value 'fxs' or 'fxo' which indicates the call initiator (this is
+
  ; will have the value 'fxs' or 'fxo' which indicates the call initiator (this is
  ; the end of the monitored line, not he recorder's one)
+
  ; the end of the monitored line, not he recorder's one)
 
  ;
 
  ;
  ;[default]
+
  ; [default]
 
  ; ${type}^record$=goto record
 
  ; ${type}^record$=goto record
 
  ;
 
  ;
  ;[record]
+
  ; [record]
  ; .*=wave/record//tmp/${caller}_${called}_$(++$recidx).${format}
+
  ; .*=wave/record//tmp/${caller}_${called}_$(++$recidx).${format}
 
  ;
 
  ;
  ; [$once]
+
  ; [$once]
  ; recidx=0
+
  ; recidx=0
 
  ;
 
  ;
 
  ; In this example, a recorder is routed to wavefile to be recorded in a file name given
 
  ; In this example, a recorder is routed to wavefile to be recorded in a file name given
  ; by caller, called, incremented value of the 'recidx' variable and the data format
+
  ; by caller, called, incremented value of the 'recidx' variable and the data format
 
   
 
   
 
  [general]
 
  [general]
Line 155: Line 154:
 
   
 
   
 
  ; echocancel: boolean: Automatically enable or disable individual line echo
 
  ; echocancel: boolean: Automatically enable or disable individual line echo
  ; canceller on call begin/end
+
  ; canceller on call begin/end
 
  ; If missing or invalid, no automatic echo canceller operation will be done
 
  ; If missing or invalid, no automatic echo canceller operation will be done
 
  ; This parameter can be overridden in group and line sections
 
  ; This parameter can be overridden in group and line sections
Line 162: Line 161:
 
   
 
   
 
  ; call-ended-target: string: Target to play when an FXS line is disconnected and
 
  ; call-ended-target: string: Target to play when an FXS line is disconnected and
  ; the FXO is still off hook
+
  ; the FXO is still off hook
 
  ; This option is used to set an announcement to the FXO to tell it that the call
 
  ; This option is used to set an announcement to the FXO to tell it that the call
  ; was ended by its peer
+
  ; was ended by its peer
 
  ; This parameter is applied on reload and can be overridden in group sections
 
  ; This parameter is applied on reload and can be overridden in group sections
 
  ; Defaults to tone/busy
 
  ; Defaults to tone/busy
Line 170: Line 169:
 
   
 
   
 
  ; outoforder-target: string: Target to play when an FXS line is disconnected and
 
  ; outoforder-target: string: Target to play when an FXS line is disconnected and
  ; the FXO is off hook for a long period of time
+
  ; the FXO is off hook for a long period of time
 
  ; This tone is played after the call ended tone
 
  ; This tone is played after the call ended tone
 
  ; This parameter is applied on reload and can be overridden in group sections
 
  ; This parameter is applied on reload and can be overridden in group sections
 
  ; Defaults to tone/outoforder
 
  ; Defaults to tone/outoforder
 
  ;outoforder-target=tone/outoforder
 
  ;outoforder-target=tone/outoforder
 +
 +
; lang: string: Language for tones played by the analog module
 +
; This parameter is added to the call.preroute message dispatched by an FXS line
 +
; This parameter is applied on reload and can be overridden in group sections
 +
;lang=
 
   
 
   
 
  ; call-ended-playtime: integer: The time to play the call-ended-target prompt on an FXS line
 
  ; call-ended-playtime: integer: The time to play the call-ended-target prompt on an FXS line
Line 184: Line 188:
 
  ; ring-timeout: integer: The time allowed to ellapse between rings on incoming calls on FXO lines
 
  ; ring-timeout: integer: The time allowed to ellapse between rings on incoming calls on FXO lines
 
  ; This timer can be used when there is no way to know when the remote FXS closes an unaswered
 
  ; This timer can be used when there is no way to know when the remote FXS closes an unaswered
  ; call (no line polarity changes)
+
  ; call (no line polarity changes)
 
  ; This timer can also be used to configure the FXO lines belonging to recorder (monitor) groups
 
  ; This timer can also be used to configure the FXO lines belonging to recorder (monitor) groups
 
  ; If used, incoming unaswered calls or recorders will be terminated when this time ellapsed
 
  ; If used, incoming unaswered calls or recorders will be terminated when this time ellapsed
Line 192: Line 196:
 
   
 
   
 
  ; alarm-timeout: integer: The time allowed for an active call to remain alive with its line
 
  ; alarm-timeout: integer: The time allowed for an active call to remain alive with its line
  ; in alarm (out of order)
+
  ; in alarm (out of order)
 
  ; A T1 line can detect link failures and notify the upper layer
 
  ; A T1 line can detect link failures and notify the upper layer
 
  ; When notified on line failure, active unanswered calls are terminated immediately.
 
  ; When notified on line failure, active unanswered calls are terminated immediately.
  ; Answered calls are allowed to persist for the given period
+
  ; Answered calls are allowed to persist for the given period
 
  ; Set to 0 to disable this timer. Defaults to 30000
 
  ; Set to 0 to disable this timer. Defaults to 30000
  ;alarm-timeout=30000  
+
  ;alarm-timeout=30000
+
 
   
 
   
 
  ;[group-name]
 
  ;[group-name]
  ; This section is used to configure a group of analog lines  
+
  ; This section is used to configure a group of analog lines
 
   
 
   
 
  ; enable: boolean: This option is used to create or remove a group of analog lines
 
  ; enable: boolean: This option is used to create or remove a group of analog lines
Line 209: Line 212:
 
   
 
   
 
  ; type: string: Group type. This is the type of the local end of all analog lines
 
  ; type: string: Group type. This is the type of the local end of all analog lines
  ; belonging to this group
+
  ; belonging to this group
 
  ; Allowed values:
 
  ; Allowed values:
  ; FXO:     The line is a telephone set linked to a telephone exchange
+
  ; FXO: The line is a telephone set linked to a telephone exchange
  ; FXS:     The line is a telephone exchange linked to a telephone set
+
  ; FXS: The line is a telephone exchange linked to a telephone set
  ; monitor: This group contains line monitors (recorders)
+
  ; monitor: This group contains line monitors (recorders)
 
  ; This option is required on creation
 
  ; This option is required on creation
 
  ;type=
 
  ;type=
Line 221: Line 224:
 
  ; Multiple spans may be specified by simply separating them with a comma (',') character
 
  ; Multiple spans may be specified by simply separating them with a comma (',') character
 
  ; This option is required on creation if group's type is not monitor
 
  ; This option is required on creation if group's type is not monitor
  ;spans=  
+
  ;spans=
 
   
 
   
 
  ; fxs,fxo: string: Specify the span(s) containing the analog channel(s) used by
 
  ; fxs,fxo: string: Specify the span(s) containing the analog channel(s) used by
  ; the FXS and FXO lines belonging to monitors
+
  ; the FXS and FXO lines belonging to monitors
 
  ; The value of this option must be a section name specified in a telephony module
 
  ; The value of this option must be a section name specified in a telephony module
 
  ; Multiple spans may be specified by simply separating them with a comma (',') character
 
  ; Multiple spans may be specified by simply separating them with a comma (',') character
 
  ; This option is required on creation if group's type is monitor
 
  ; This option is required on creation if group's type is monitor
 
  ;fxs=
 
  ;fxs=
  ;fxo=  
+
  ;fxo=
 
   
 
   
 
  ; useallcircuits: boolean: Create lines for all circuits belonging to this group
 
  ; useallcircuits: boolean: Create lines for all circuits belonging to this group
Line 236: Line 239:
 
  ; Use line sections to override group parameters
 
  ; Use line sections to override group parameters
 
  ; Defaults to enable
 
  ; Defaults to enable
  ;useallcircuits=enable  
+
  ;useallcircuits=enable
 
   
 
   
 
  ; delaydial: integer: Delay sending number on FXO lines
 
  ; delaydial: integer: Delay sending number on FXO lines
Line 242: Line 245:
 
  ; Defaults to 2000 if missing or invalid
 
  ; Defaults to 2000 if missing or invalid
 
  ; Set to 0 to send number just after receiving the confirmation of hook off
 
  ; Set to 0 to send number just after receiving the confirmation of hook off
  ; operation completion
+
  ; operation completion
 
  ; This parameter can be overridden in line sections and in the routing process
 
  ; This parameter can be overridden in line sections and in the routing process
 
  ; Ignored if type is not FXO
 
  ; Ignored if type is not FXO
Line 248: Line 251:
 
   
 
   
 
  ; dtmfinband: boolean: Enable to send the DTMF data in band on analog lines belonging
 
  ; dtmfinband: boolean: Enable to send the DTMF data in band on analog lines belonging
  ; to this group
+
  ; to this group
 
  ; If disabled, the DTMF will be sent through the line's hardware if possible
 
  ; If disabled, the DTMF will be sent through the line's hardware if possible
 
  ; This parameter just set the order to try sending the DTMFs: if disabled and the line
 
  ; This parameter just set the order to try sending the DTMFs: if disabled and the line
  ; fails to send the DTMF through the hardware, it will send it in band
+
  ; fails to send the DTMF through the hardware, it will send it in band
 
  ; This parameter can be overridden in line sections
 
  ; This parameter can be overridden in line sections
 
  ; Defaults to disable
 
  ; Defaults to disable
  ;dtmfinband=disable  
+
  ;dtmfinband=disable
 
   
 
   
 
  ; answer-on-polarity: boolean: This parameter is used by an FXO line to wait for line
 
  ; answer-on-polarity: boolean: This parameter is used by an FXO line to wait for line
  ; polarity change as a signal that an outgoing call was answered by the remote end
+
  ; polarity change as a signal that an outgoing call was answered by the remote end
 
  ; If disabled, the call will be considerred answered as soon as the destination
 
  ; If disabled, the call will be considerred answered as soon as the destination
  ; number is sent (even if the number is empty)
+
  ; number is sent (even if the number is empty)
 
  ; Care must be taken when setting this option to yes: the telephone exchange (FXS) might
 
  ; Care must be taken when setting this option to yes: the telephone exchange (FXS) might
  ; not be able to change line polarity on answer or the hardware might not be able to
+
  ; not be able to change line polarity on answer or the hardware might not be able to
  ; detect such an event: the outgoing calls will never be answered
+
  ; detect such an event: the outgoing calls will never be answered
 
  ; This parameter can be overridden in line sections
 
  ; This parameter can be overridden in line sections
 
  ; Defaults to no
 
  ; Defaults to no
  ;answer-on-polarity=no  
+
  ;answer-on-polarity=no
 
   
 
   
 
  ; hangup-on-polarity: boolean: This parameter is used by an FXO line to handle line
 
  ; hangup-on-polarity: boolean: This parameter is used by an FXO line to handle line
  ; polarity change as a signal that a call was terminated by the remote end (on hook)
+
  ; polarity change as a signal that a call was terminated by the remote end (on hook)
 
  ; For outgoing calls on lines with answer-on-polarity enabled the first polarity change
 
  ; For outgoing calls on lines with answer-on-polarity enabled the first polarity change
  ; will be treated as an off hook (answer) event and a second one will be considerred
+
  ; will be treated as an off hook (answer) event and a second one will be considerred
  ; an on hook (hang up) event
+
  ; an on hook (hang up) event
 
  ; For outgoing calls on lines with answer-on-polarity disabled or for incoming calls,
 
  ; For outgoing calls on lines with answer-on-polarity disabled or for incoming calls,
  ; if this parameter is enabled the line polarity change will be treated as an
+
  ; if this parameter is enabled the line polarity change will be treated as an
  ; on hook (hang up) event
+
  ; on hook (hang up) event
 
  ; This parameter can be overridden in line sections
 
  ; This parameter can be overridden in line sections
 
  ; Defaults to no
 
  ; Defaults to no
  ;hangup-on-polarity=no  
+
  ;hangup-on-polarity=no
 
   
 
   
 
  ; callsetup: string: This parameter is used to detect (FXO) or send (FXS) line
 
  ; callsetup: string: This parameter is used to detect (FXO) or send (FXS) line
  ; setup data (such as caller id)
+
  ; setup data (such as caller id)
 
  ; Allowed values:
 
  ; Allowed values:
  ; after: send/detect call setup after the first ring and before the second one
+
  ; after: send/detect call setup after the first ring and before the second one
  ; before: send/detect call setup before the first ring
+
  ; before: send/detect call setup before the first ring
  ; none:   No call setup detect or send
+
  ; none: No call setup detect or send
 
  ; This parameter can be overridden in line sections
 
  ; This parameter can be overridden in line sections
 
  ; Defaults to after if missing or invalid
 
  ; Defaults to after if missing or invalid
 
  ;callsetup=after
 
  ;callsetup=after
 +
 +
; ringback: boolean: Offer a ringback tone even if not provided by peer channel
 +
; This requires ringback tone generation support from the analog circuit driver
 +
;ringback=no
 
   
 
   
 
  ; debuglevel: integer: The debug level of this group
 
  ; debuglevel: integer: The debug level of this group
Line 294: Line 301:
 
  ; NOTE: If 0, no debug messages will be printed out from this group or lines belonging to it
 
  ; NOTE: If 0, no debug messages will be printed out from this group or lines belonging to it
 
  ;debuglevel=
 
  ;debuglevel=
 
 
   
 
   
 
  ;[line group-name/circuit-code] or
 
  ;[line group-name/circuit-code] or
Line 309: Line 315:
 
  ; out-of-service: boolean: This option is used to put a line in out of service or in service state
 
  ; out-of-service: boolean: This option is used to put a line in out of service or in service state
 
  ; When out of service, no calls can be done through the line and any active call
 
  ; When out of service, no calls can be done through the line and any active call
  ; on this line will be terminated
+
  ; on this line will be terminated
 
  ; Applied on reload
 
  ; Applied on reload
 
  ; Defaults to no
 
  ; Defaults to no
 
  ;out-of-service=no
 
  ;out-of-service=no
+
 
 +
[[Category:Analog]] [[Category:FXS/FXO]]
 +
 
 
===Example of analog.conf===
 
===Example of analog.conf===
  

Latest revision as of 10:04, 21 June 2018

This module manages analog line signaling and data transfer.

The analog signaling types supported by Yate are FXO(Foreign Exchange Office) and FXS(Foreign Exchange Station).

This module is used to monitor analog lines(recorders).

For recorders (monitor groups), 2 lines must be configured: an FXO line listening the FXS end of monitored line and an FXS one listening the FXO end of the monitored line.

When recording, the first channel is the caller and the second one is the called. The configuration file is analog.conf.

Note: In Yate's terminology, FXS/FXO designates the local (Yate) end of the line, not the remote one.

Contents

[edit] Module layout

Each line encapsulates a signaling circuit which is the interface to the hardware driver used to send/receive events (signaling) and data (audio).

Two analog signaling types are supported:

  • FXO: Foreign Exchange Office - the local end of the line is a telephone set linked to a telephone exchange
  • FXS: Foreign Exchange Station - the local end of the line is a telephone exchange linked to a telephone set

Similar lines can be gathered together into the same group having a given signaling type and parameters.

Each monitor (recorder) group has the type set to FXS and owns an additional group containing the FXO lines.

On creation the analog group requests the signalling circuits to be created by another module. Only that module will have any particular knowledge about the link between the logical circuit code within the group and any other channel number assigned by the hardware driver. Logical circuit codes are assigned in ascending order, once they are created by the spans given in the spans, fxs or fxo group settings.

For each circuit the configuration file is searched for a section named [line <group-name>/<circuit-code>]. If not found, the line is created/reloaded using the group's parameters. If found, the first check is if the line is disabled and destroy/don't create it if so. If a line section is found and the line is enabled the section is searched for line parameters (some group parameters can be overridden in line sections) and created/reloaded.

If useallcircuits is disabled only lines explicitly declared in configuration will be created.

Notes:

  • A group may own circuits from different cards (even from different manufacturers).
  • The circuits belonging to a group may not overlap with physical channels defined by the hardware driver.
  • Due to the fact that circuit codes are created in the ascending order given by the spans listed in the spans, fxs or fxo group settings, if one span fails to be created the whole group will fail. The reason is the fact that there is no way to find out how many circuits the span would create (this is configured in the module handling the circuit creation request).
  • At the time of this writing only the #zapcard# module will answer to such request.

[edit] Additional commands

From rmanager:

status analog groups
Show all analog line groups and their status
status analog lines
Show all lines and their status
status analog recorders
Show all active recorders and their status

[edit] Message handlers

  • call.execute make an outgoing call
  • engine.status show the status of module, channels, recorders, groups, lines
  • call.drop drop (terminate) a channel or a recorder
  • engine.halt remove all groups and call endpoints. Stop worker threads

[edit] Routing

Outgoing calls can be routed by setting the group or line destination. Monitor endpoints will set the type, format and callsource parameters of the call.route message. The 'type' parameter will have the value 'record', the 'format' parameter is the format of the data source (usually alaw or mulaw) and 'callsource' parameter will have the value 'fxs' or 'fxo' which indicates the call initiator (this is the end of the monitored line, not he recorder's one). The following group and line parameters can be overridden when routing calls to the analog module: delaydial

Here are some examples of routing rules based on the configuration file presented in the Configuration section of this documentation:

Call using the line 1 in the group named 'office-fxo':

^3020$=analog/office-fxo/1 

Call using the first free (not busy or out of service) line in the group named 'office-fxs':

^3020\(.*\)$=analog/wpfxs;called=\1 

Call using a specific line in the group 'office-fxo':

^3011\([0-9]\)\(.*\)$=analog/wpfxo/\1;called=\2

Call using the line office-fxo/25 and delaying number dialing by 1000ms:

^301225\(.*\)$=analog/wpfxo/25;called=\1;delaydial=1000

Note: Calls will fail if the line is busy (in use) or out of service.

Record a call using the caller, called parameters and the value of a defined variable as filename. E.g. a call from 123 to an unknown number (and being the 2nd recorded call) will be routed to wave/record//tmp/123_unknown_2.au. The first channel will be the voice of 123 and the second one the other's voice.

[default]
${type}^record$=goto record

[record]
.*=wave/record//tmp/${caller}_${called}_$(++$recidx).au

[$once]
recidx=0

[edit] Prerouting

Incoming calls must be pre-routed. The reason is the absence of the called party number (and, possible, the caller party number). Here is an example of how to preroute incoming calls:

[contexts]
; Set called
${address}^office-fxo/\(.*\)$=;called=$(add,201000,\1)
; Set called to off-hook for incoming calls on FXS line: the caller will dial the number
${address}^office-fxs/\(.*\)$=;called=off-hook
; Don't set the caller if already there
${caller}.=return
; Set caller
${address}^office-fxo/\(.*\)$=;caller=$(add,211000,\1)
${address}^office-fxs/\(.*\)$=;caller=$(add,212000,\1)

[edit] Configuration

Configuration file: analog.conf

; This file keep the analog channel configuration
; Each section except for 'general' configures a group of lines or an individual line
; Each section named 'line group-name/circuit-code' or
; 'line group-name/fxo/circuit-code' configure a line belonging to group
; <group-name> or <group-name/fxo> and using the circuit with code
; <circuit-code> in that group. The 'fxo' part means that the line is the FXO
; listening the FXS end of a monitored line (<group-name>'s type must be monitor)
; For each [group-name] section the configuration file is searched for
; [line group-name/circuit-code] or [line group-name/fxo/circuit-code] sections
;
; NOTES:
;
; - Avoid use of the slash ('/') character in group names
; - Lines belonging to the same group always have the same type
; - For recorders (monitor groups), 2 lines must be configured: an FXO line listening
;   the FXS end of monitored line and an FXS one listening the FXO end of the
;   monitored line.
; - When recording, the first channel is the caller and the second one is the called
;
; ROUTING:
;
; Calls can be routed by setting the group name or line address as destination
; ^123$=analog/office-fxs/3
; ^012$=analog/office-fxs
; ^13\(*.)$=analog/office-fxo/\1
; ^013$=analog/office-fxo;
; When routing, the recorders will set the type, format and callsource parameters
; The 'type' parameter will have the value 'record', the 'format' parameter is the
; format of the data source (usually alaw or mulaw) and 'callsource' parameter
; will have the value 'fxs' or 'fxo' which indicates the call initiator (this is
; the end of the monitored line, not he recorder's one)
;
; [default]
; ${type}^record$=goto record
;
; [record]
; .*=wave/record//tmp/${caller}_${called}_$(++$recidx).${format}
;
; [$once]
; recidx=0
;
; In this example, a recorder is routed to wavefile to be recorded in a file name given
; by caller, called, incremented value of the 'recidx' variable and the data format

[general]
; This section keep general settings for the analog module

; echocancel: boolean: Automatically enable or disable individual line echo
; canceller on call begin/end
; If missing or invalid, no automatic echo canceller operation will be done
; This parameter can be overridden in group and line sections
; The hardware driver must support this feature
;echocancel=

; call-ended-target: string: Target to play when an FXS line is disconnected and
; the FXO is still off hook
; This option is used to set an announcement to the FXO to tell it that the call
; was ended by its peer
; This parameter is applied on reload and can be overridden in group sections
; Defaults to tone/busy
;call-ended-target=tone/busy

; outoforder-target: string: Target to play when an FXS line is disconnected and
; the FXO is off hook for a long period of time
; This tone is played after the call ended tone
; This parameter is applied on reload and can be overridden in group sections
; Defaults to tone/outoforder
;outoforder-target=tone/outoforder

; lang: string: Language for tones played by the analog module
; This parameter is added to the call.preroute message dispatched by an FXS line
; This parameter is applied on reload and can be overridden in group sections
;lang=

; call-ended-playtime: integer: The time to play the call-ended-target prompt on an FXS line
; After that, the outoforder-target will be played until the user closes (set on hook) the line
; This parameter can be overridden in group sections
; Defaults to 2000
;call-ended-playtime=

; ring-timeout: integer: The time allowed to ellapse between rings on incoming calls on FXO lines
; This timer can be used when there is no way to know when the remote FXS closes an unaswered
; call (no line polarity changes)
; This timer can also be used to configure the FXO lines belonging to recorder (monitor) groups
; If used, incoming unaswered calls or recorders will be terminated when this time ellapsed
; This parameter can be overridden in group and line sections
; Set to 0 to disable this timer. Defaults to 10000
;ring-timeout=

; alarm-timeout: integer: The time allowed for an active call to remain alive with its line
; in alarm (out of order)
; A T1 line can detect link failures and notify the upper layer
; When notified on line failure, active unanswered calls are terminated immediately.
; Answered calls are allowed to persist for the given period
; Set to 0 to disable this timer. Defaults to 30000
;alarm-timeout=30000

;[group-name]
; This section is used to configure a group of analog lines

; enable: boolean: This option is used to create or remove a group of analog lines
; Applied on reload
; Defaults to yes
;enable=yes

; type: string: Group type. This is the type of the local end of all analog lines
; belonging to this group
; Allowed values:
; FXO: The line is a telephone set linked to a telephone exchange
; FXS: The line is a telephone exchange linked to a telephone set
; monitor: This group contains line monitors (recorders)
; This option is required on creation
;type=

; spans: string: Specify the span(s) containing the analog channel(s)
; The value of this option must be a section name specified in a telephony module
; Multiple spans may be specified by simply separating them with a comma (',') character
; This option is required on creation if group's type is not monitor
;spans=

; fxs,fxo: string: Specify the span(s) containing the analog channel(s) used by
; the FXS and FXO lines belonging to monitors
; The value of this option must be a section name specified in a telephony module
; Multiple spans may be specified by simply separating them with a comma (',') character
; This option is required on creation if group's type is monitor
;fxs=
;fxo=

; useallcircuits: boolean: Create lines for all circuits belonging to this group
; This parameter is processed only when creating lines
; If disabled, only lines declared in existing sections with will be created
; Use line sections to override group parameters
; Defaults to enable
;useallcircuits=enable

; delaydial: integer: Delay sending number on FXO lines
; This option is used to delay sending the called number (if any)
; Defaults to 2000 if missing or invalid
; Set to 0 to send number just after receiving the confirmation of hook off
; operation completion
; This parameter can be overridden in line sections and in the routing process
; Ignored if type is not FXO
;delaydial=2000

; dtmfinband: boolean: Enable to send the DTMF data in band on analog lines belonging
; to this group
; If disabled, the DTMF will be sent through the line's hardware if possible
; This parameter just set the order to try sending the DTMFs: if disabled and the line
; fails to send the DTMF through the hardware, it will send it in band
; This parameter can be overridden in line sections
; Defaults to disable
;dtmfinband=disable

; answer-on-polarity: boolean: This parameter is used by an FXO line to wait for line
; polarity change as a signal that an outgoing call was answered by the remote end
; If disabled, the call will be considerred answered as soon as the destination
; number is sent (even if the number is empty)
; Care must be taken when setting this option to yes: the telephone exchange (FXS) might
; not be able to change line polarity on answer or the hardware might not be able to
; detect such an event: the outgoing calls will never be answered
; This parameter can be overridden in line sections
; Defaults to no
;answer-on-polarity=no

; hangup-on-polarity: boolean: This parameter is used by an FXO line to handle line
; polarity change as a signal that a call was terminated by the remote end (on hook)
; For outgoing calls on lines with answer-on-polarity enabled the first polarity change
; will be treated as an off hook (answer) event and a second one will be considerred
; an on hook (hang up) event
; For outgoing calls on lines with answer-on-polarity disabled or for incoming calls,
; if this parameter is enabled the line polarity change will be treated as an
; on hook (hang up) event
; This parameter can be overridden in line sections
; Defaults to no
;hangup-on-polarity=no

; callsetup: string: This parameter is used to detect (FXO) or send (FXS) line
; setup data (such as caller id)
; Allowed values:
; after: send/detect call setup after the first ring and before the second one
; before: send/detect call setup before the first ring
; none: No call setup detect or send
; This parameter can be overridden in line sections
; Defaults to after if missing or invalid
;callsetup=after

; ringback: boolean: Offer a ringback tone even if not provided by peer channel
; This requires ringback tone generation support from the analog circuit driver
;ringback=no

; debuglevel: integer: The debug level of this group
; Applied on reload
; Defaults to the current debug level if missing or invalid
; NOTE: If 0, no debug messages will be printed out from this group or lines belonging to it
;debuglevel=

;[line group-name/circuit-code] or
;[line group-name/fxo/circuit-code]
; This section is used to configure an analog line belonging to a group of lines
; The line address (group-name/circuit-code) will be used to route a call to it

; enable: boolean: This option is used to create or remove an analog line
; When removed, any active call on this line will remain (the line will be destroyed on termination)
; Applied on reload
; Defaults to yes
;enable=yes

; out-of-service: boolean: This option is used to put a line in out of service or in service state
; When out of service, no calls can be done through the line and any active call
; on this line will be terminated
; Applied on reload
; Defaults to no
;out-of-service=no

[edit] Example of analog.conf

The example below configures a machine with 3 cards:

  • A digital card 4 spans configured to use TDM Voice signaling. span1 and span3 are configured as FXO and span2 and span4 are configured as FXS
  • An analog card with 2 FXS ports (span-fxs) and 2 FXO ports (spanfxo)

All span names must be configured in the driver module (e.g. zapcard).

[montest]
; Configure a monitor (recorder) group with circuits defined in the
;  span1 and span2 spans 
; This group will not be created on startup (enable=no)
; After starting Yate, the group can be created by setting enable=yes
;   and reloading Yate
enable=no
type=monitor
fxs=span2
fxo=span1

[office-fxo]
; Configure a group of FXO lines with circuits defined in span3 and span-fxo sections
type=FXO
spans=span3,span-fxo

[office-fxs]
; Configure a group of FXS lines with circuits defined in span4 and span-fxs sections
type=FXS
spans=span4,span-fxs

[line office-fxo/1]
; Disable (don't create or destroy if already created) the line attached to the
;  circuit 1 of group office-fxo
enable=no

[line office-fxs/2]
; Put out of service the line attached to the circuit 2 of group office-fxs
; This will end any active call and deny any new call on this line
out-of-service=yes


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers