DAHDI Dial 9 Receiving Setup Acknowledge

I have a Toshiba PBX connected via a QSIG PRI to Asterisk. I can make calls from the Toshiba to Asterisk and internal calls from Asterisk to the Toshiba. What I can’t do is make an call with an outside destination from Asterisk to the Toshiba. The Toshiba is looking for 9 to grab an outside line then it expects to see the 10 digits. In the FreePBX dial plan I use 9|. which sends 9 plus the 10 digit number.

Using Wireshark to look at the QSIG commands coming from a Sangoma wanpipemon trace I see the following for an Asterisk to Toshiba internal call.

Asterisk -> SETUP
Toshiba -> CONNECT

However when trying to dial 9 + number I received the following

Asterisk -> SETUP

Looking at tools.ietf.org/html/rfc4497 I see the following

On receipt of a QSIG SETUP message containing no Sending complete
information element and a number in the Called party number
information element that the gateway cannot determine to be complete,
the gateway SHALL send back a QSIG SETUP ACKNOWLEDGE message, start
QSIG timer T302, and await further number digits.

Otherwise, the gateway SHALL wait for more digits
to arrive in QSIG INFORMATION messages.

Looking in the chan_dahdi.c code I see

case PRI_EVENT_SETUP_ACK: chanpos = pri_find_principle(pri, e->setup_ack.channel); if (chanpos < 0) { ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n", PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span); } else { chanpos = pri_fixup_principle(pri, chanpos, e->setup_ack.call); if (chanpos > -1) { ast_mutex_lock(&pri->pvts[chanpos]->lock); pri->pvts[chanpos]->setup_ack = 1; /* Send any queued digits */ for (x = 0;x < strlen(pri->pvts[chanpos]->dialdest); x++) { ast_debug(1, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]); pri_information(pri->pri, pri->pvts[chanpos]->call, pri->pvts[chanpos]->dialdest[x]); } ast_mutex_unlock(&pri->pvts[chanpos]->lock); } else ast_log(LOG_WARNING, "Unable to move channel %d!\n", e->setup_ack.channel); } break;

How do I get Asterisk to queue these digits so DAHDI can send them in response to the SETUP ACKNOWLEDGE message. What should be happening is Asterisk sends 9 via the SETUP message, waits for the SETUP ACKNOWLEDGE, then send the 10 digits number via a INFORMATION message.

I think you mean: how do I make the downstream system consume all the digits queued to it? Although my knowledge in this area is SS7, and is somewhat hazy, from long ago, I think the recipient is expected, in SS7 terms, to accept any partioning of digits between, IAM, SAM and FAM as well as accepting them all in an IFAM.

If Asterisk supports forced segregation of the 9 digit, I would assume you would do it with a dialing pause character, but I always assumed that only really worked when all digits were DTMF.

Although I’m digging up an old topic and I’m sure the original author has long since sorted out the issue, I just wanted to make a quick post for anyone else that may have this issue in the future. I just had the exact same problem with our Toshiba-Asterisk integration after doing an upgrade of the Toshiba’s software (after running for a long time without issues before). In the end I needed to power cycle the Toshiba system for calls to go through to the outside from Asterisk .