[asterisk-users] Calling out on a group of DAHDI lines

Richard Mudgett rmudgett at digium.com
Tue Oct 9 10:48:13 CDT 2012


> Asterisk 1.8
> 
> (a) We will have a group of 4 analog lines into a Digium card that
> will
> be used for local calls.  What is the best way to use those lines as
> a
> pool for outbound calls?  Can I use ChanIsAvail(), listing those 4
> channels, and then use the first one returned?

There are lots of things documented in chan_dahdi.conf.sample.  The
following option will assign channels 1-4 to group 1.

; Logical groups can be assigned to allow outgoing roll-over.  Groups range
; from 0 to 63, and multiple groups can be specified. By default the
; channel is not a member of any group.
;
; Note that an explicit empty value for 'group' is invalid, and will not
; override a previous non-empty one. The same applies to callgroup and
; pickupgroup as well.
;
group=1
channel = 1-4

Then you can dial from that group of channels:

same => n,Dial(DAHDI/g1/5551212)

	/*
	 * data is ---v
	 * Dial(DAHDI/pseudo[/extension[/options]])
	 * Dial(DAHDI/<channel#>[c|r<cadance#>|d][/extension[/options]])
	 * Dial(DAHDI/<subdir>!<channel#>[c|r<cadance#>|d][/extension[/options]])
	 * Dial(DAHDI/i<span>[/extension[/options]])
	 * Dial(DAHDI/[i<span>-](g|G|r|R)<group#(0-63)>[c|r<cadance#>|d][/extension[/options]])
	 *
	 * i - ISDN span channel restriction.
	 *     Used by CC to ensure that the CC recall goes out the same span.
	 *     Also to make ISDN channel names dialable when the sequence number
	 *     is stripped off.  (Used by DTMF attended transfer feature.)
	 *
	 * g - channel group allocation search forward
	 * G - channel group allocation search backward
	 * r - channel group allocation round robin search forward
	 * R - channel group allocation round robin search backward
	 *
	 * c - Wait for DTMF digit to confirm answer
	 * r<cadance#> - Set distintive ring cadance number
	 * d - Force bearer capability for ISDN/SS7 call to digital.
	 */

> (b) For emergency calls, I want to be able to force one of these
> lines
> available if all are in use.  Will SoftHangup() do that?  If so, do I
> need to Wait() after a SoftHangup() before trying to use it?

SoftHangup() should do what you want for this.  You need to have a wait
so the soft hangup will have a chance to be recognized.

I would also suggest that if you use g1 in your normal dial, you should use the
highest channel as your emergency line.  That channel will be the last used
by the group so an emergency call will be least likely to kick off an established
call.

Another approach is to attempt to dial the emergency call normally.  If the first
attempt fails, then kick an established call.

Richard



More information about the asterisk-users mailing list