You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
res_telos_1a2: Add workaround optimized for local FXS stations.
For lines served by analog Digium cards, regardless of the technology
behind the FXO port used, the fxodevice option (formerly just 'device')
does not work. This seems to be due to the high resistance of the line,
which prevents audio from passing through from an FXO port to the line.
In reality, the whole premise of using an FXO port the way we are is
completely non-standard and outside the scope of what should work, so
it's not surprising this can be undefined or varying behavior.
However, if the line itself is served by the system, as is likely in
the case of a Digium analog card, we don't need to use an FXO port in
order to bridge in music on hold; we can simply have Asterisk generate
it towards the caller. That is what the new 'fxsdevice' option does;
it queues hold on the channel along with the configured music on hold
class. This also results in better quality, since it eliminates an
additional analog connection and the volume is normal loudness.
UpgradeNote: The 'device' option has been renamed to 'fxodevice',
and this change is not backwards-compatible. The change was made
because, with the addition of the 'fxsdevice' option, having an
option simply named 'device' is somewhat ambiguous.
Additionally, the serial device no longer has a default, which ensures
the module does not load if it is not needed by the user.
Copy file name to clipboardExpand all lines: configs/samples/res_telos_1a2.conf.sample
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,16 @@
2
2
; Configuration file for Asterisk resource module for Telos 1A2 Module Interface
3
3
4
4
;[general]
5
-
;device = /dev/ttyS0 ; Serial device to use (at 1200 baud). Default is /dev/ttyS0
5
+
;device = /dev/ttyS0 ; Serial device to use (at 1200 baud). There is no default (however, on most systems, the default serial port is /dev/ttyS0)
6
6
7
7
;[line1]
8
8
;line = 1 ; 1A2 line number
9
-
;device = DAHDI/1 ; FXO device that can be used to access this line
9
+
;fxodevice = DAHDI/1 ; FXO device that can be used to access this line. The line does not need to be served by Asterisk. Music on hold volume is rather low by default with this option.
10
10
;moh_class = default ; Music on hold class, to play music on hold when this 1A2 line is on hold (via the FXO device). There is no default.
11
11
;hold_context = 1a2hold ; Dialplan context to execute for 1A2 lines on hold. Extension s will be executed at priority 1. If moh_class is also specified, hold_context takes precedence.
12
+
; hold_context can only be used with 'fxodevice', not 'fxsdevice'.
12
13
13
14
;[line2]
14
15
;line = 2
15
-
;device = DAHDI/2
16
+
;fxsdevice = DAHDI/22 ; FXS device that services this line. Music on hold volume and quality is better using fxsdevice as compared to fxodevice; however, the line must be on this system.
ast_channel_unlock(t->moh_chan); /* Was returned locked and reference bumped */
348
417
ast_verb(5, "%s (%s) for 1A2 line %d\n", !ast_strlen_zero(t->hold_context) ? "Launched hold dialplan" : "Started music on hold", S_OR(t->hold_context, t->moh_class), t->lineno);
constchar*fxschannel=S_OR(t->fxs_activechan, S_OR(t->fxsdevice, "")); /* If we have an active FXS channel, use that as it's more specific, otherwise just the device itself */
0 commit comments