[asterisk-bugs] [Asterisk 0018603]: [patch] Get Real Channel of a Dahdi Call

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 4 09:22:09 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18603 
====================================================================== 
Reported By:                arjankroon
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   18603
Category:                   Channels/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                       SWP-2951 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-01-12 06:41 CST
Last Modified:              2011-03-04 09:22 CST
====================================================================== 
Summary:                    [patch] Get Real Channel of a Dahdi Call
Description: 
The channel name for DAHDI channels has changed in 1.8.
This is mentioned in
http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8-current

The old format was DAHDI/XX-Y where XX was the real channel number. 
It has changed to DAHDI/iZ/XXXXXXXXXX-YYY where XXXXXXXXXX is the
callerid. 
And Z is the number of the span in /etc/dahdi/system.conf

Our channel names look like this
DAHDI/i8/0517383600-229
DAHDI/i1/0031650545840-329
DAHDI/i4/0512515245-20f
DAHDI/i6/0517417488-1fb

But we want to know which channel number of these four channels is used.

Or is there a new VARIABLE where this real CHANNEL found.

With DAHDI SHOW CHANNELS you see the number of channels in Chan pseudo.



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017683 [patch] I could not find an easy way to...
====================================================================== 

---------------------------------------------------------------------- 
 (0132641) svnbot (reporter) - 2011-03-04 09:22
 https://issues.asterisk.org/view.php?id=18603#c132641 
---------------------------------------------------------------------- 
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         Checkin                                      
2011-03-04 09:22 svnbot         Note Added: 0132641                          
======================================================================




More information about the asterisk-bugs mailing list