[asterisk-bugs] [Asterisk 0017683]: [patch] I could not find an easy way to access DAHDI channel and span number from the dialplan.
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Mar 4 09:28:23 CST 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17683
======================================================================
Reported By: mrwho
Assigned To: rmudgett
======================================================================
Project: Asterisk
Issue ID: 17683
Category: Channels/chan_dahdi
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: SVN
JIRA: SWP-2859
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 274530
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-07-22 05:52 CDT
Last Modified: 2011-03-04 09:28 CST
======================================================================
Summary: [patch] I could not find an easy way to access
DAHDI channel and span number from the dialplan.
Description:
I could not find an easy way to access from the dialplan the span and the
PRI channel being used by an Asterisk channel. As a quick solution I
patched chan_dahdi so that it will populate - if applicable - two
variables:
PRI_CHANNEL: the PRI channel number
PRI_SPAN: the PRI span number
These variables can then be used in the dialplan. The patch it's pretty
simple, even if I don't know how much it could be needed by others.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0018603 [patch] Get Real Channel of a Dahdi Call
======================================================================
----------------------------------------------------------------------
(0132642) svnbot (reporter) - 2011-03-04 09:28
https://issues.asterisk.org/view.php?id=17683#c132642
----------------------------------------------------------------------
Repository: asterisk
Revision: 309446
_U trunk/
U trunk/UPGRADE-1.8.txt
U trunk/channels/chan_dahdi.c
U trunk/channels/sig_pri.c
U trunk/channels/sig_pri.h
U trunk/funcs/func_channel.c
------------------------------------------------------------------------
r309446 | rmudgett | 2011-03-04 09:28:21 -0600 (Fri, 04 Mar 2011) | 53
lines
Merged revisions 309445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r309445 | rmudgett | 2011-03-04 09:22:04 -0600 (Fri, 04 Mar 2011) | 46
lines
Get real channel of a DAHDI call.
Starting with Asterisk v1.8, the DAHDI channel name format was changed
for
ISDN calls to: DAHDI/i<span>/<number>[:<subaddress>]-<sequence-number>
There were several reasons that the channel name had to change.
1) Call completion requires a device state for ISDN phones. The generic
device state uses the channel name.
2) Calls do not necessarily have B channels. Calls placed on hold by an
ISDN phone do not have B channels.
3) The B channel a call initially requests may not be the B channel the
call ultimately uses. Changes to the internal implementation of the
Asterisk master channel list caused deadlock problems for chan_dahdi if
it
needed to change the channel name. Chan_dahdi no longer changes the
channel name.
4) DTMF attended transfers now work with ISDN phones because the channel
name is "dialable" like the chan_sip channel names.
For various reasons, some people need to know which B channel a DAHDI
call
is using.
* Added CHANNEL(dahdi_span), CHANNEL(dahdi_channel), and
CHANNEL(dahdi_type) so the dialplan can determine the B channel
currently
in use by the channel. Use CHANNEL(no_media_path) to determine if the
channel even has a B channel.
* Added AMI event DAHDIChannel to associate a DAHDI channel with an
Asterisk channel so AMI applications can passively determine the B
channel
currently in use. Calls with "no-media" as the DAHDIChannel do not have
an associated B channel. No-media calls are either on hold or
call-waiting.
(closes issue https://issues.asterisk.org/view.php?id=17683)
Reported by: mrwho
Tested by: rmudgett
(closes issue https://issues.asterisk.org/view.php?id=18603)
Reported by: arjankroon
Patches:
issue17683_18603_v1.8_v2.patch uploaded by rmudgett (license 664)
Tested by: stever28, rmudgett
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=309446
Issue History
Date Modified Username Field Change
======================================================================
2011-03-04 09:28 svnbot Checkin
2011-03-04 09:28 svnbot Note Added: 0132642
======================================================================
More information about the asterisk-bugs
mailing list