Actual DAHDI Channel Number

Home » Asterisk Users » Actual DAHDI Channel Number
Asterisk Users 2 Comments

Hi

I want to know actual DAHDI channel number (pseudo), which received the call or dialed the call. Where as when Asterisk receives a call on DAHDI
channel, it shows channel as “DAHDI/i5/112-15”
Is there any way / configuration to change this behavior and get actual channel number? Earlier we used to get this.

I am using Asterisk 1.8.11 and Dahdi 2.4

Thanks & Regards, Amit Patkar

2 thoughts on - Actual DAHDI Channel Number

  • You can use the AMI action DAHDIShowChannels to get the current channel mapping.

    There is an AMI event that you can look for:
    Event: DAHDIChannel Channel: name Uniqueid: id DAHDISpan: 5
    DAHDIChannel: 23

    It is generated whenever a call is assigned to a B channel or a call moves to a different B channel.

    There is also the CHANNEL() dialplan function:
    CHANNEL(dahdi_channel)
    CHANNEL(dahdi_span)
    CHANNEL(dahdi_type)

    The DAHDIChannel event and CHANNEL() function are mentioned in the UPGRADE.txt file.

    Richard

  • I put ${CHANNEL(dahdi_span)} to know the span and ${CHANNEL(dahdi_channel)}
    for actual channel number in incoming context of PRI. For outbound I normally use M flag in Dial() to call a macro and check the above variables in that macro.

    –Satish Barot