[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:22:07 CST 2011


The following issue has been ASSIGNED. 
====================================================================== 
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:                     assigned
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:              
====================================================================== 
Date Submitted:             2010-07-22 05:52 CDT
Last Modified:              2011-03-04 09:22 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
====================================================================== 

---------------------------------------------------------------------- 
 (0132640) svnbot (reporter) - 2011-03-04 09:22
 https://issues.asterisk.org/view.php?id=17683#c132640 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 309445

U   branches/1.8/UPGRADE.txt
U   branches/1.8/channels/chan_dahdi.c
U   branches/1.8/channels/sig_pri.c
U   branches/1.8/channels/sig_pri.h
U   branches/1.8/funcs/func_channel.c

------------------------------------------------------------------------
r309445 | rmudgett | 2011-03-04 09:22:06 -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=309445 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-04 09:22 svnbot         Note Added: 0132640                          
2011-03-04 09:22 svnbot         Status                   ready for testing =>
assigned
======================================================================




More information about the asterisk-bugs mailing list